Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. /* payloader */
  2.  
  3. static GstFlowReturn
  4. gst_rtp_text_pay_handle_buffer (GstBaseRTPPayload* payload, GstBuffer* buffer) {
  5.     GstBuffer* out;
  6.     guint8* p;
  7.  
  8.     GST_DEBUG("pushing %d", GST_BUFFER_SIZE(buffer));
  9.  
  10.     out = gst_rtp_buffer_new_allocate(GST_BUFFER_SIZE(buffer), 0, 0);
  11.     p = gst_rtp_buffer_get_payload(out);
  12.     memcpy(p, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer));
  13.  
  14.     return gst_basertppayload_push(payload, out);
  15. }
  16.  
  17. /* depayloader */
  18.  
  19. static GstBuffer *
  20. gst_rtp_text_depay_process (GstBaseRTPDepayload *depay, GstBuffer *buf)
  21. {
  22.   GstBuffer* out;
  23.   out = gst_rtp_buffer_get_payload_buffer(buf);
  24.   return out;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement