How do I read source data from a FILE* ?

Nikos Chantziaras realnc at gmail.com
Fri May 31 12:39:47 PDT 2013


Hello, everyone.

I'm using QtGStreamer 0.10.2 with GStreamer 0.10.36.  It works nicely 
when loading media data from files, like:

     QGst::PipelinePtr pipeline = 
QGst::ElementFactory::make("playbin2").dynamicCast<QGst::Pipeline>();
     pipeline->setProperty("uri", "/path/to/some/video.ogv");

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.

For example:

   FILE* src_file = fopen("media.dat", "r");
   fseek(src_file, 40000, SEEK_SET);

So now I want to have 'src_file' as my source and I know there's Theora 
video data starting at that offset and ending 8MBs later.  What would I 
need to do to get the pipeline to read from that FILE*?


More information about the gstreamer-devel mailing list