Hi! Tim,<br><br>Thanks for your reply.<br>I would misunderstand the meaning of "pull-mode sink".<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>
> I'm a newbie for gstreamer and working on a sink that I wish it would<br>
> provide buffer for source. I think it would be a pull-based sink.<br>
> (...)<br>
> I implemented this sink based on base-sink, and added the virtual<br>
> function: buffer_alloc() (gst_my_sink_buffer_alloc) and render()<br>
> (gst_my_sink_render).<br>
<br>
What kind of sink is this?<br>
<br>
There'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's not really used much in practice<br>
and is rarely useful. Maybe you could provide some more details of what<br>
you'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 <<a href="mailto:nahmed31@hotmail.com">nahmed31@hotmail.com</a>><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: <<a href="mailto:1265302267125-1469069.post@n4.nabble.com">1265302267125-1469069.post@n4.nabble.com</a>><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:<qtdemux0> length too long (1572864 ><br>
28)<br>
0:00:00.129468726 2421 0x91fcb78 WARN qtdemux<br>
qtdemux.c:3186:qtdemux_parse_container:<qtdemux0> length too long (1507328 ><br>
27)<br>
0:00:00.130451079 2421 0x91fcb78 WARN qtdemux<br>
qtdemux.c:4907:qtdemux_parse_trak:<qtdemux0> 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:<qtdemux0> 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'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 <<a href="mailto:msmith@xiph.org">msmith@xiph.org</a>><br>
Subject: Re: [gst-devel] h264 playback, qtdemux issue<br>
To: Discussion of the development of GStreamer<br>
<<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>><br>
Message-ID:<br>
<<a href="mailto:3c1737211002040913m11f1f78cxda4f349b660f1c89@mail.gmail.com">3c1737211002040913m11f1f78cxda4f349b660f1c89@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
On Thu, Feb 4, 2010 at 8:51 AM, na <<a href="mailto:nahmed31@hotmail.com">nahmed31@hotmail.com</a>> wrote:<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>
Use xvimagesink. In general it'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'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 <<a href="mailto:wim.taymans@gmail.com">wim.taymans@gmail.com</a>><br>
Subject: Re: [gst-devel] h264 playback, qtdemux issue<br>
To: Discussion of the development of GStreamer<br>
<<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>><br>
Message-ID: <1265303684.3283.100.camel@metal><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
On Thu, 2010-02-04 at 08:51 -0800, na wrote:<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>
<br>
Add ffmpegcolorspace before ximagesink or use:<br>
<br>
gst-launch playbin2 uri=file:///path/to/file.mp4<br>
<br>
Wim<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:<qtdemux0> length too long (1572864 ><br>
> 28)<br>
> 0:00:00.129468726 2421 0x91fcb78 WARN qtdemux<br>
> qtdemux.c:3186:qtdemux_parse_container:<qtdemux0> length too long (1507328 ><br>
> 27)<br>
> 0:00:00.130451079 2421 0x91fcb78 WARN qtdemux<br>
> qtdemux.c:4907:qtdemux_parse_trak:<qtdemux0> 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:<qtdemux0> 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'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>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Thu, 04 Feb 2010 17:27:36 +0000<br>
From: Tim-Philipp M?ller <<a href="mailto:t.i.m@zen.co.uk">t.i.m@zen.co.uk</a>><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: <1265304456.3607.32.camel@zingle><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
On Thu, 2010-02-04 at 18:14 +0100, Wim Taymans wrote:<br>
<br>
> 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>