[gst-devel] How to implement a pull-based sink?

Hsu France france.hsu.b at gmail.com
Thu Feb 4 04:49:27 CET 2010


Hi!

I'm a newbie for gstreamer and  working on a sink that I wish it would
provide buffer for source. I think it would be a pull-based sink.

The GStreamer I used is gstreamer-0.10.25, gst-plugin-base-0.10.25, and
gst-plaugin-good-0.10.17.

I implemented this sink based on base-sink, and added the virtual function:
buffer_alloc() (gst_my_sink_buffer_alloc) and render() (gst_my_sink_render).


After trying:
GST_DEBUG=basesink:7,mysink:7 gst-launch fakesrc can-activate-pull=1 !
mysink

I found gstbasesink.c had set DEFAULT_CAN_ACTIVATE_PULL to FALSE, so I set
it to TRUE, and get the follow log. It seems pull mode is enabled, but
gst_my_sink_buffer_alloc and gst_my_sink_render are not called.

Does I make something wrong, or which sink can I use as reference?
Besides fakesrc, is there any pull-source for me to do test with gst-launch?

Thanks,

France Hsu

gst_my_sink_change_state: null to  ready
|
gst_my_sink_start
|
gst_my_sink_change_state: ready to pause
|
gst_base_sink_pad_activate
   |
   gst_base_sink_negotiate_pull
   |
   gst_base_sink_pad_activate_pull
|
gst_base_sink_loop
|
gst_my_sink_change_state: pause to playing
|
[ gst_base_sink_loop: pulling 0, 4096 ]*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100204/b4309eba/attachment.htm>


More information about the gstreamer-devel mailing list