Commit 1e55d0d7 authored by Luis de Bethencourt's avatar Luis de Bethencourt Committed by Tim-Philipp Müller

rtph265pay: Copy metadata in the payloader, but only the relevant ones

The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
parent 8611645a
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <gst/rtp/gstrtpbuffer.h> #include <gst/rtp/gstrtpbuffer.h>
#include <gst/pbutils/pbutils.h> #include <gst/pbutils/pbutils.h>
#include <gst/video/video.h>
/* Included to not duplicate gst_rtp_h265_add_vps_sps_pps () */ /* Included to not duplicate gst_rtp_h265_add_vps_sps_pps () */
#include "gstrtph265depay.h" #include "gstrtph265depay.h"
...@@ -1027,6 +1028,8 @@ gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload, ...@@ -1027,6 +1028,8 @@ gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload,
GST_BUFFER_DTS (outbuf) = dts; GST_BUFFER_DTS (outbuf) = dts;
/* insert payload memory block */ /* insert payload memory block */
gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265pay), outbuf, paybuf,
g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
outbuf = gst_buffer_append (outbuf, paybuf); outbuf = gst_buffer_append (outbuf, paybuf);
list = gst_buffer_list_new (); list = gst_buffer_list_new ();
...@@ -1094,14 +1097,13 @@ gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload, ...@@ -1094,14 +1097,13 @@ gst_rtp_h265_pay_payload_nal (GstRTPBasePayload * basepayload,
gst_rtp_buffer_unmap (&rtp); gst_rtp_buffer_unmap (&rtp);
/* insert payload memory block */ /* insert payload memory block */
gst_buffer_append (outbuf, gst_rtp_copy_meta (GST_ELEMENT_CAST (rtph265pay), outbuf, paybuf,
gst_buffer_copy_region (paybuf, GST_BUFFER_COPY_MEMORY, pos, g_quark_from_static_string (GST_META_TAG_VIDEO_STR));
limitedSize)); gst_buffer_copy_into (outbuf, paybuf, GST_BUFFER_COPY_MEMORY, pos,
limitedSize);
/* add the buffer to the buffer list */ /* add the buffer to the buffer list */
gst_buffer_list_add (list, outbuf); gst_buffer_list_add (list, outbuf);
size -= limitedSize; size -= limitedSize;
pos += limitedSize; pos += limitedSize;
ii++; ii++;
...@@ -1210,7 +1212,7 @@ gst_rtp_h265_pay_handle_buffer (GstRTPBasePayload * basepayload, ...@@ -1210,7 +1212,7 @@ gst_rtp_h265_pay_handle_buffer (GstRTPBasePayload * basepayload,
end_of_au = TRUE; end_of_au = TRUE;
} }
paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_MEMORY, offset, paybuf = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offset,
nal_len); nal_len);
ret = ret =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment