Hi! Tim,<br><br>Thanks for your reply.<br>I would misunderstand the meaning of &quot;pull-mode sink&quot;.<br>You mean, pull-mode and buffer allocated by sink are two different things, right?<br><br>In the fact, my sink is for a HW device, so I want the source to use the HW buffer (allocated in sink) for data flow, not to allocate by source itself. <br>
<br>I wish to use udpsrc for the pipeline, and found it is based on GstPushSrc. (Therefore, I thought I should implement a pull-based sink, and find a pull-based source)<br>$ gst-launch udpsrc udp://IP:PORT ! mysink<br><br>
However, my buffer_alloc function is not called.<br><br>France Hsu<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
Hi,<br>
<br>
&gt; I&#39;m a newbie for gstreamer and  working on a sink that I wish it would<br>
&gt; provide buffer for source. I think it would be a pull-based sink.<br>
&gt;  (...)<br>
&gt; I implemented this sink based on base-sink, and added the virtual<br>
&gt; function: buffer_alloc() (gst_my_sink_buffer_alloc) and render()<br>
&gt; (gst_my_sink_render).<br>
<br>
What kind of sink is this?<br>
<br>
There&#39;s no need for the sink to operate in pull mode to be able to<br>
provide buffers to upstream. It should be sufficient to implement a<br>
buffer alloc function.<br>
<br>
Take for example:<br>
<br>
 $ GST_DEBUG=*src:5,*sink:5 videotestsrc num-buffers=2 ! ximagesink<br>
<br>
This will operate in push mode, but videotestsrc will call<br>
gst_pad_alloc_buffer() to get a buffer from ximagesink and then fill<br>
that with data and push it back to ximagesink.<br>
<br>
Pull mode for sinks is something that&#39;s not really used much in practice<br>
and is rarely useful. Maybe you could provide some more details of what<br>
you&#39;re trying to do?<br>
<br>
 Cheers<br>
  -Tim<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 4 Feb 2010 08:51:07 -0800 (PST)<br>
From: na &lt;<a href="mailto:nahmed31@hotmail.com">nahmed31@hotmail.com</a>&gt;<br>
Subject: [gst-devel] h264 playback, qtdemux issue<br>
To: <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
Message-ID: &lt;<a href="mailto:1265302267125-1469069.post@n4.nabble.com">1265302267125-1469069.post@n4.nabble.com</a>&gt;<br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
Hello,<br>
<br>
I am new to gstreamer and I wanted to setup a pipeline that can playback an<br>
h.264 video that is encapsulated within an MP4 container.<br>
<br>
I am using the following command:<br>
<br>
gst-launch -v --gst-debug-level=2 filesrc<br>
location=hdv_0015_480p_384kbps_20fps.mp4 ! qtdemux ! ffdec_h264 ! ximagesink<br>
<br>
I have attached the console output below.  Any help is greatly appreciated.<br>
Thanks.<br>
<br>
Best regards,<br>
<br>
Nadeem<br>
<br>
----------------------<br>
<br>
gst-launch -v --gst-debug-level=2 filesrc<br>
location=hdv_0015_480p_384kbps_20fps.mp4 ! qtdemux ! ffdec_h264 ! ximagesink<br>
Setting pipeline to PAUSED ...<br>
0:00:00.128491689  2421  0x91fcb78 WARN                 qtdemux<br>
qtdemux_types.c:154:qtdemux_type_get: unknown QuickTime node type avc1<br>
0:00:00.128991982  2421  0x91fcb78 WARN                 qtdemux<br>
qtdemux_types.c:154:qtdemux_type_get: unknown QuickTime node type avcC<br>
0:00:00.129232998  2421  0x91fcb78 WARN                 qtdemux<br>
qtdemux.c:3186:qtdemux_parse_container:&lt;qtdemux0&gt; length too long (1572864 &gt;<br>
28)<br>
0:00:00.129468726  2421  0x91fcb78 WARN                 qtdemux<br>
qtdemux.c:3186:qtdemux_parse_container:&lt;qtdemux0&gt; length too long (1507328 &gt;<br>
27)<br>
0:00:00.130451079  2421  0x91fcb78 WARN                 qtdemux<br>
qtdemux.c:4907:qtdemux_parse_trak:&lt;qtdemux0&gt; unknown version 00000000<br>
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps =<br>
video/x-h264,<br>
codec_data=(buffer)01404033ffe1001d674d40339a7406c1ef3fffdd0fdd9a880000030008000003014478c19501000468ee3c80,<br>
width=(int)852, height=(int)480, framerate=(fraction)143/7,<br>
pixel-aspect-ratio=(fraction)847/852<br>
Pipeline is PREROLLING ...<br>
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps =<br>
video/x-raw-yuv, width=(int)852, height=(int)480, framerate=(fraction)143/7,<br>
format=(fourcc)I420, interlaced=(boolean)false,<br>
pixel-aspect-ratio=(fraction)847/852<br>
0:00:00.229889863  2421  0x91fcb78 WARN                 qtdemux<br>
qtdemux.c:2645:gst_qtdemux_loop:&lt;qtdemux0&gt; error: streaming stopped, reason<br>
not-negotiated<br>
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: GStreamer<br>
encountered a general stream error.<br>
Additional debug info:<br>
qtdemux.c(2645): gst_qtdemux_loop ():<br>
/GstPipeline:pipeline0/GstQTDemux:qtdemux0:<br>
streaming stopped, reason not-negotiated<br>
ERROR: pipeline doesn&#39;t want to preroll.<br>
Setting pipeline to NULL ...<br>
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps = NULL<br>
/GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = NULL<br>
/GstPipeline:pipeline0/GstQTDemux:qtdemux0.GstPad:audio_00: caps = NULL<br>
/GstPipeline:pipeline0/GstQTDemux:qtdemux0.GstPad:video_00: caps = NULL<br>
Freeing pipeline ...<br>
<br>
--<br>
View this message in context: <a href="http://n4.nabble.com/h264-playback-qtdemux-issue-tp1469069p1469069.html" target="_blank">http://n4.nabble.com/h264-playback-qtdemux-issue-tp1469069p1469069.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 4 Feb 2010 09:13:05 -0800<br>
From: Michael Smith &lt;<a href="mailto:msmith@xiph.org">msmith@xiph.org</a>&gt;<br>
Subject: Re: [gst-devel] h264 playback, qtdemux issue<br>
To: Discussion of the development of GStreamer<br>
        &lt;<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:3c1737211002040913m11f1f78cxda4f349b660f1c89@mail.gmail.com">3c1737211002040913m11f1f78cxda4f349b660f1c89@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
On Thu, Feb 4, 2010 at 8:51 AM, na &lt;<a href="mailto:nahmed31@hotmail.com">nahmed31@hotmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; I am new to gstreamer and I wanted to setup a pipeline that can playback an<br>
&gt; h.264 video that is encapsulated within an MP4 container.<br>
&gt;<br>
&gt; I am using the following command:<br>
&gt;<br>
&gt; gst-launch -v --gst-debug-level=2 filesrc<br>
&gt; location=hdv_0015_480p_384kbps_20fps.mp4 ! qtdemux ! ffdec_h264 ! ximagesink<br>
<br>
Use xvimagesink. In general it&#39;s also a good idea to have<br>
ffmpegcolorspace in between the decoder and the video sink in case the<br>
decoder is outputting a format that the sink can&#39;t accept.<br>
<br>
Mike<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Thu, 04 Feb 2010 18:14:44 +0100<br>
From: Wim Taymans &lt;<a href="mailto:wim.taymans@gmail.com">wim.taymans@gmail.com</a>&gt;<br>
Subject: Re: [gst-devel] h264 playback, qtdemux issue<br>
To: Discussion of the development of GStreamer<br>
        &lt;<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>&gt;<br>
Message-ID: &lt;1265303684.3283.100.camel@metal&gt;<br>
Content-Type: text/plain; charset=&quot;UTF-8&quot;<br>
<br>
On Thu, 2010-02-04 at 08:51 -0800, na wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I am new to gstreamer and I wanted to setup a pipeline that can playback an<br>
&gt; h.264 video that is encapsulated within an MP4 container.<br>
&gt;<br>
&gt; I am using the following command:<br>
&gt;<br>
&gt; gst-launch -v --gst-debug-level=2 filesrc<br>
&gt; location=hdv_0015_480p_384kbps_20fps.mp4 ! qtdemux ! ffdec_h264 ! ximagesink<br>
&gt;<br>
<br>
Add ffmpegcolorspace before ximagesink or use:<br>
<br>
gst-launch playbin2 uri=file:///path/to/file.mp4<br>
<br>
Wim<br>
<br>
&gt; I have attached the console output below.  Any help is greatly appreciated.<br>
&gt; Thanks.<br>
&gt;<br>
&gt; Best regards,<br>
&gt;<br>
&gt; Nadeem<br>
&gt;<br>
&gt; ----------------------<br>
&gt;<br>
&gt; gst-launch -v --gst-debug-level=2 filesrc<br>
&gt; location=hdv_0015_480p_384kbps_20fps.mp4 ! qtdemux ! ffdec_h264 ! ximagesink<br>
&gt; Setting pipeline to PAUSED ...<br>
&gt; 0:00:00.128491689  2421  0x91fcb78 WARN                 qtdemux<br>
&gt; qtdemux_types.c:154:qtdemux_type_get: unknown QuickTime node type avc1<br>
&gt; 0:00:00.128991982  2421  0x91fcb78 WARN                 qtdemux<br>
&gt; qtdemux_types.c:154:qtdemux_type_get: unknown QuickTime node type avcC<br>
&gt; 0:00:00.129232998  2421  0x91fcb78 WARN                 qtdemux<br>
&gt; qtdemux.c:3186:qtdemux_parse_container:&lt;qtdemux0&gt; length too long (1572864 &gt;<br>
&gt; 28)<br>
&gt; 0:00:00.129468726  2421  0x91fcb78 WARN                 qtdemux<br>
&gt; qtdemux.c:3186:qtdemux_parse_container:&lt;qtdemux0&gt; length too long (1507328 &gt;<br>
&gt; 27)<br>
&gt; 0:00:00.130451079  2421  0x91fcb78 WARN                 qtdemux<br>
&gt; qtdemux.c:4907:qtdemux_parse_trak:&lt;qtdemux0&gt; unknown version 00000000<br>
&gt; /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps =<br>
&gt; video/x-h264,<br>
&gt; codec_data=(buffer)01404033ffe1001d674d40339a7406c1ef3fffdd0fdd9a880000030008000003014478c19501000468ee3c80,<br>
&gt; width=(int)852, height=(int)480, framerate=(fraction)143/7,<br>
&gt; pixel-aspect-ratio=(fraction)847/852<br>
&gt; Pipeline is PREROLLING ...<br>
&gt; /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps =<br>
&gt; video/x-raw-yuv, width=(int)852, height=(int)480, framerate=(fraction)143/7,<br>
&gt; format=(fourcc)I420, interlaced=(boolean)false,<br>
&gt; pixel-aspect-ratio=(fraction)847/852<br>
&gt; 0:00:00.229889863  2421  0x91fcb78 WARN                 qtdemux<br>
&gt; qtdemux.c:2645:gst_qtdemux_loop:&lt;qtdemux0&gt; error: streaming stopped, reason<br>
&gt; not-negotiated<br>
&gt; ERROR: from element /GstPipeline:pipeline0/GstQTDemux:qtdemux0: GStreamer<br>
&gt; encountered a general stream error.<br>
&gt; Additional debug info:<br>
&gt; qtdemux.c(2645): gst_qtdemux_loop ():<br>
&gt; /GstPipeline:pipeline0/GstQTDemux:qtdemux0:<br>
&gt; streaming stopped, reason not-negotiated<br>
&gt; ERROR: pipeline doesn&#39;t want to preroll.<br>
&gt; Setting pipeline to NULL ...<br>
&gt; /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:src: caps = NULL<br>
&gt; /GstPipeline:pipeline0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = NULL<br>
&gt; /GstPipeline:pipeline0/GstQTDemux:qtdemux0.GstPad:audio_00: caps = NULL<br>
&gt; /GstPipeline:pipeline0/GstQTDemux:qtdemux0.GstPad:video_00: caps = NULL<br>
&gt; Freeing pipeline ...<br>
&gt;<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Thu, 04 Feb 2010 17:27:36 +0000<br>
From: Tim-Philipp M?ller &lt;<a href="mailto:t.i.m@zen.co.uk">t.i.m@zen.co.uk</a>&gt;<br>
Subject: Re: [gst-devel] h264 playback, qtdemux issue<br>
To: <a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
Message-ID: &lt;1265304456.3607.32.camel@zingle&gt;<br>
Content-Type: text/plain; charset=&quot;UTF-8&quot;<br>
<br>
On Thu, 2010-02-04 at 18:14 +0100, Wim Taymans wrote:<br>
<br>
&gt; Add ffmpegcolorspace before ximagesink or use:<br>
<br>
If you use ximagesink (and not e.g. xvimagesink), a videoscale may also<br>
be needed, in case the image needs to be scaled to accommodate the<br>
aspect ratio.<br>
<br>
Cheers<br>
 -Tim<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
------------------------------------------------------------------------------<br>
The Planet: dedicated and managed hosting, cloud storage, colocation<br>
Stay online with enterprise data centers and the best network in the business<br>
Choose flexible plans and management services without long-term contracts<br>
Personal 24x7 support from experience hosting pros just a phone call away.<br>
<a href="http://p.sf.net/sfu/theplanet-com" target="_blank">http://p.sf.net/sfu/theplanet-com</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br>
<br>
End of gstreamer-devel Digest, Vol 45, Issue 8<br>
**********************************************<br>
</blockquote></div><br>