Very simple example of appsrc [appsrc -> fakesink]

Tim Müller tim at centricular.com
Fri Jul 4 00:58:21 PDT 2014


On Fri, 2014-07-04 at 00:10 -0700, bamboosso wrote:

Hi,

> I'm trying to push video data to pipeline using appsrc (don't see other
> options to do that :P).

Write your own source element, deriving from GstPushSrc for example.

> So I create simple pipeline:
> 
> and attach signal to appsrc.
> 
> Signal is called and I see information from cb_need_data on console
> (g_print).
> But fakesink does not receive ANY buffer. What is wrong in my solution? Full
> sample code is below:

How do you determine that fakesink does not receive any buffers? Note
that silent=false won't print anything out, that only happens with
gst-launch-1.0 -v because it hooks up to the deep-notify signal of the
pipeline. If you set fakesink dump=true it should print stuff though.

Also note that you don't have to use the need-data signal if you don't
want to, you can just push data to the appsrc whenever you have some
(depends a bit on your data source I guess).

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list