appsrc and GMainloop problem
Tim-Philipp Müller
t.i.m at zen.co.uk
Mon Aug 26 03:09:15 PDT 2013
On Mon, 2013-08-26 at 12:58 +0530, Deepak Jain wrote:
> On appsrc, I am setting Caps as :
>
> GstBuffer* buf = gst_buffer_new_and_alloc(extradatalen);
> memcpy(GST_BUFFER_DATA(buf), extradata, extradatalen);
> GstCaps* caps = gst_caps_new_simple ("video/x-h264",
> "codec_data", GST_TYPE_BUFFER, buf,
> "stream-format", G_TYPE_STRING, "byte-stream",
> "width", G_TYPE_INT, <Width>,
> "height", G_TYPE_INT, <Height>,
> "pixel-aspect-ratio", GST_TYPE_FRACTION, <PixelAspectRatioX>,
> <PixelAspectRatio>,
> "framerate", GST_TYPE_FRACTION, <RateValue>, <RateScale>,
> NULL);
With H.264 in byte-stream format, you should not have codec_data in the
caps. Instead, the SPS/PPS should be sent as data in the stream (note:
in proper byte-stream format of course).
The parser might just assume it's AVC when it sees codec_data.
Cheers
-Tim
More information about the gstreamer-devel
mailing list