[gst-devel] Using fakesrc to inject and render encoded data

Andreas Schuler andreas at neokast.com
Tue Apr 22 03:45:58 CEST 2008

Hi all,

I was wondering whether the following can work:

- use a fakesrc connected to a capsfilter
- Set the GstCaps on the caps filter to something like this: video/x-xvid,
width=(int)256, height=(int)144, framerate=(fraction)23/1,
- Set the maxsize property to something large enough and use the handoff
signal to fill in the buffer. Also set the following props:
        "signal-handoffs", TRUE,
        "is-live", TRUE,
        "filltype", 1 /* don't fill */,
        "sizemax", size,
        "sizetype", 2 /* Makes all samples the same size */,

The encoded raw data is provided by the app, which supports a pull model.

I have tried out this combination by connecting the capsfilter to a
decodebin. The first problem I ran into was the GstFindType element within
the decode bin, which seemed to query the duration of the stream, which
returned 0. This caused an error.

I then connected a query function (using gst_pad_set_query_function) to the
source pad on the caps filter (I also provided a
gst_pad_set_query_type_function) to return a fake value for duration (I am
getting my app data from a live source).

I no longer got the previous error but the pipeline still wouldn't run, my
handoff callback function never gets called.

The question is: Does anyone else know what other properties or caps I would
have to set to make this work?

I saw some other post asking about the GstAppSrc element. Is this element
already part of the latest release and how would I use it?

Any help greatly appreciated,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080421/69280fe8/attachment.htm>

More information about the gstreamer-devel mailing list