appsrc and GMainloop problem

Deepak Jain jain1982 at gmail.com
Mon Aug 26 06:03:26 PDT 2013


OK...i removed "codec_data" parameter from caps.
But still I dont know why I am getting same no decoder context error like:

0:00:09.504370712 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegcodecmap.c:2398:gst_ffmpeg_caps_with_codecid: have codec data of
size 53
0:00:09.504388937 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegcodecmap.c:2088:gst_ffmpeg_caps_to_pixfmt: converting caps
video/x-h264, width=(int)320, height=(int)240, parsed=(boolean)true,
stream-format=(string)avc, alignment=(string)au,
pixel-aspect-ratio=(fraction)4/3,
codec_data=(buffer)014d400dffe10025674d400dec80a0fd8750808080a000007d200017701c00002b160002b079351807c50a448001000568ebec6c80
0:00:09.504452406 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegcodecmap.c:2118:gst_ffmpeg_caps_to_pixfmt: setting
pixel-aspect-ratio 3/4 = 0.750000
0:00:09.504476042 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:781:gst_ffmpegdec_setcaps:<mydecoder> forcing 25/1 framerate
0:00:09.504492294 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:793:gst_ffmpegdec_setcaps:<mydecoder> sink caps have
pixel-aspect-ratio of 4:3
0:00:09.504509792 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:811:gst_ffmpegdec_setcaps:<mydecoder> Using framerate from
codec
0:00:09.504522619 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:818:gst_ffmpegdec_setcaps:<mydecoder> trying to enable
direct rendering
0:00:09.504537396 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:821:gst_ffmpegdec_setcaps:<mydecoder> disable direct
rendering setup for H264
0:00:09.548427471 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:895:gst_ffmpegdec_setcaps:<mydecoder:sink> clipping to
320x240
0:00:09.548465407 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:904:gst_ffmpegdec_setcaps:<mydecoder:sink> final clipping to
320x240
0:00:09.548480556 10014  0xb384f80 DEBUG               GST_CAPS
gstpad.c:2741:gst_pad_set_caps:<mydecoder:sink> caps 0xb376a00
video/x-h264, width=(int)320, height=(int)240, parsed=(boolean)true,
stream-format=(string)avc, alignment=(string)au,
pixel-aspect-ratio=(fraction)4/3,
codec_data=(buffer)014d400dffe10025674d400dec80a0fd8750808080a000007d200017701c00002b160002b079351807c50a448001000568ebec6c80
0:00:09.548699885 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:2549:gst_ffmpegdec_chain:<mydecoder> received DISCONT
0:00:09.548723745 10014  0xb384f80 ERROR                 ffmpeg
gstffmpegdec.c:2341:gst_ffmpegdec_frame:<mydecoder> no codec context
0:00:09.549552644 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:2566:gst_ffmpegdec_chain:<mydecoder> waiting for keyframe
0:00:09.549607984 10014  0xb384f80 DEBUG                 ffmpeg
gstffmpegdec.c:2571:gst_ffmpegdec_chain:<mydecoder> got keyframe
0:00:09.549626379 10014  0xb384f80 ERROR                 ffmpeg
gstffmpegdec.c:2341:gst_ffmpegdec_frame:<mydecoder> no codec context

As I can see from logs, everything is setting perfectly but still no codec
context.
Is it something related to DISCONT?

Thanks for all your help Tim.

Amy be I am very close..just a couple of steps away from actual playback:(




On Mon, Aug 26, 2013 at 3:39 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> 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
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130826/f87b2b99/attachment-0001.html>


More information about the gstreamer-devel mailing list