How do I read source data from a FILE* ?

Thiago Sousa Santos thiago.sousa.santos at collabora.com
Sun Jun 2 19:31:34 PDT 2013


On Fri, 2013-05-31 at 23:02 +0300, Nikos Chantziaras wrote:
> On 31/05/13 22:50, Carlos Rafael Giani wrote:
> > On 2013-05-31 21:39, Nikos Chantziaras wrote:
> >> Hello, everyone.
> >>
> >> I'm using QtGStreamer 0.10.2 with GStreamer 0.10.36.  It works nicely
> >> when loading media data from files
> >>  [...]
> >> But I cannot find any information on how to have a FILE* as a source,
> >> where the media data only starts at some specific offset and has a
> >> specific length.
> >
> > You could do this indirectly, by using fdsrc . It expects a Unix file
> > descriptor , which is an integer. use the fileno() function to get a
> > file descriptor out of FILE*.
> 
> I need to also be compatible with Windows.  I suppose _fileno() would 
> work there.
> 
> But looking at the docs of playbin2, the "source" property is read-only. 
>   It doesn't appear I can set it to an fdsrc?

You use the 'uri' property, and set it to "fd://%d".

Or it might be possible to simply set it to "fd://" and use the
'source-setup' signal to configure the source yourself.

--
Thiago

> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list