<div dir="ltr"><div>OK...i removed "codec_data" parameter from caps.</div><div>But still I dont know why I am getting same no decoder context error like:</div><div> </div><div>0:00:09.504370712 10014 0xb384f80 DEBUG ffmpeg gstffmpegcodecmap.c:2398:gst_ffmpeg_caps_with_codecid: have codec data of size 53<br>
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<br>
0:00:09.504452406 10014 0xb384f80 DEBUG ffmpeg gstffmpegcodecmap.c:2118:gst_ffmpeg_caps_to_pixfmt: setting pixel-aspect-ratio 3/4 = 0.750000<br>0:00:09.504476042 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:781:gst_ffmpegdec_setcaps:<mydecoder> forcing 25/1 framerate<br>
0:00:09.504492294 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:793:gst_ffmpegdec_setcaps:<mydecoder> sink caps have pixel-aspect-ratio of 4:3<br>0:00:09.504509792 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:811:gst_ffmpegdec_setcaps:<mydecoder> Using framerate from codec<br>
0:00:09.504522619 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:818:gst_ffmpegdec_setcaps:<mydecoder> trying to enable direct rendering<br>0:00:09.504537396 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:821:gst_ffmpegdec_setcaps:<mydecoder> disable direct rendering setup for H264<br>
0:00:09.548427471 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:895:gst_ffmpegdec_setcaps:<mydecoder:sink> clipping to 320x240<br>0:00:09.548465407 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:904:gst_ffmpegdec_setcaps:<mydecoder:sink> final clipping to 320x240<br>
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<br>
<font color="#ff0000">0:00:09.548699885 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:2549:gst_ffmpegdec_chain:<mydecoder> received DISCONT<br></font><font color="#ff0000"><font color="#ff0000"></font>0:00:09.548723745 10014 0xb384f80 ERROR ffmpeg gstffmpegdec.c:2341:gst_ffmpegdec_frame:<mydecoder> no codec context</font><br>
0:00:09.549552644 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:2566:gst_ffmpegdec_chain:<mydecoder> waiting for keyframe<br>0:00:09.549607984 10014 0xb384f80 DEBUG ffmpeg gstffmpegdec.c:2571:gst_ffmpegdec_chain:<mydecoder> got keyframe<br>
<font color="#ff0000">0:00:09.549626379 10014 0xb384f80 ERROR ffmpeg gstffmpegdec.c:2341:gst_ffmpegdec_frame:<mydecoder> no codec context</font><br></div><div> </div><div>As I can see from logs, everything is setting perfectly but still no codec context.</div>
<div>Is it something related to DISCONT?</div><div> </div><div>Thanks for all your help Tim.</div><div> </div><div>Amy be I am very close..just a couple of steps away from actual playback:(</div><div> </div><div> </div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 26, 2013 at 3:39 PM, Tim-Philipp Müller <span dir="ltr"><<a href="mailto:t.i.m@zen.co.uk" target="_blank">t.i.m@zen.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, 2013-08-26 at 12:58 +0530, Deepak Jain wrote:<br>
<br>
> On appsrc, I am setting Caps as :<br>
><br>
> GstBuffer* buf = gst_buffer_new_and_alloc(extradatalen);<br>
> memcpy(GST_BUFFER_DATA(buf), extradata, extradatalen);<br>
> GstCaps* caps = gst_caps_new_simple ("video/x-h264",<br>
> "codec_data", GST_TYPE_BUFFER, buf,<br>
> "stream-format", G_TYPE_STRING, "byte-stream",<br>
> "width", G_TYPE_INT, <Width>,<br>
> "height", G_TYPE_INT, <Height>,<br>
> "pixel-aspect-ratio", GST_TYPE_FRACTION, <PixelAspectRatioX>,<br>
> <PixelAspectRatio>,<br>
> "framerate", GST_TYPE_FRACTION, <RateValue>, <RateScale>,<br>
> NULL);<br>
</div>With H.264 in byte-stream format, you should not have codec_data in the<br>
caps. Instead, the SPS/PPS should be sent as data in the stream (note:<br>
in proper byte-stream format of course).<br>
<br>
The parser might just assume it's AVC when it sees codec_data.<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers<br>
-Tim<br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br></div>