[FFmpeg-devel] customize ffplay.c

Michel Bardiaux mbardiaux
Tue Oct 2 15:46:22 CEST 2007


Luca Malandrino a ?crit :
> Dear Thorsten, 

Please dont top-post.

Please take this to ffmpeg-user (unless the new protocol is of universal 
interest and you intend to propose a patch to add it to the sources).

> thank you for your mail...I didn't modify the ffmpeg's
> code. In the file "allformats.c" (where protocols and formats are
> registered) I simply added the string
> "register_protocol(&[my_protocol])" and the in the file "file.c"
> where "pipe" and "file" protocols behavior are defined
> (open,close,seek,ecc...) I added my protocol behavior with my new
> methods (open,close,seek,ecc..) for my new protocol. 

You dont have to do that in file.c, you can do that in a source of your 
own, that's cleaner.

> The problem is
> that I can't understand how let the player (by parsing arguments)
> using my protocol behavior: in what part of the code the player
> understands what protocol has to use? Thank you

You dont have to know that. You launch

ffplay myprotocol://somekindofurl

and the open,etc... methods for your protocol will be called automatically.

> 
> Luca


-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list