How do I read source data from a FILE* ?
Giles Atkinson
Giles.Atkinson at eu.citrix.com
Mon Jun 3 08:17:56 PDT 2013
On Linux, you can just run playbin2 with "uri=file:///proc/self/fd/10" to take input from file descriptor 10. I suspect there may be no equivalent on Windows.
Appsrc may be a more portable solution. You need to run a small function that is called from appsrc whenever it needs a new input buffer.
Giles
-----Original Message-----
From: gstreamer-devel-bounces+giles.atkinson=eu.citrix.com at lists.freedesktop.org [mailto:gstreamer-devel-bounces+giles.atkinson=eu.citrix.com at lists.freedesktop.org] On Behalf Of Nikos Chantziaras
Sent: 31 May 2013 9:02 PM
To: gstreamer-devel at lists.freedesktop.org
Subject: Re: How do I read source data from a FILE* ?
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?
_______________________________________________
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