[Ffmpeg-devel] [C API] Add suport for ifstreams

Jaime inf220
Mon Sep 4 21:39:16 CEST 2006


Hi,
i need to open istreams to decode some files.
im using FFmpeg on WinXP and C++.
i hope somebody can help me on this.

By reading the FAQ
http://ffmpeg.mplayerhq.hu/faq.html#SEC31
*********************
2.12 I have a file in memory / a API different from *open/*read/ libc
how do i use it with libavformat ?

You have to implement a URLProtocol, see libavformat/file.c in FFmpeg
and libmpdemux/demux_lavf.c in MPlayer sources.
*********************

the file.c contains URLProtocols for files(using C file handles) and pipes.

i'd like to add the istream handling(actually thats all i use) but dont
know exactly how to do it best.

It seems the only paramter  i can really pass is a char*. which is
parsed afterwards.

so theres my problem.
adding the istream URLProtocol is not the problem but using it!

if at least i could save the istream handle in the "privateData" variable...

hoping for help...

Do you think it is possible to stream the istream into a pipe and use it
from there? thats the only other alternative i have.
Its a complete Nono to store it on the HD.
:)
thanks in advance!




More information about the ffmpeg-devel mailing list