Using fakesrc to inject and render encoded data

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using fakesrc to inject and render encoded data

Andreas Schuler
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, format=(fourcc)XVID
- 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,

Andreas

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel