Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* payloader */
- static GstFlowReturn
- gst_rtp_text_pay_handle_buffer (GstBaseRTPPayload* payload, GstBuffer* buffer) {
- GstBuffer* out;
- guint8* p;
- GST_DEBUG("pushing %d", GST_BUFFER_SIZE(buffer));
- out = gst_rtp_buffer_new_allocate(GST_BUFFER_SIZE(buffer), 0, 0);
- p = gst_rtp_buffer_get_payload(out);
- memcpy(p, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer));
- return gst_basertppayload_push(payload, out);
- }
- /* depayloader */
- static GstBuffer *
- gst_rtp_text_depay_process (GstBaseRTPDepayload *depay, GstBuffer *buf)
- {
- GstBuffer* out;
- out = gst_rtp_buffer_get_payload_buffer(buf);
- return out;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement