[MPlayer-dev-eng] Demuxer development questions

Nico Sabbi nsabbi at tiscali.it
Fri Jun 11 18:52:34 CEST 2004


Mikhail Ramendik wrote:

>Hello,
>
>I'd like to significantly expand the Raw DV demuxer; I have a blessing
>from the original author.
>
>However I have questions for which I could not find answers in the docs.
>Perhaps it's just me and the answers are there; in this case, I'd be
>very thankful for a pointer.
>
>So the questions are:
>
>- Is there a way to pass options to a demuxer? (I mean, let the user
>specify options that will be passed to it). 
>  
>

as in every other option:
in cfg-common.h add a reference to external variables in the demuxer's 
source. If you need more
than one consider adding a reference to a suboptions struct.
Example: -tsprog and -tsparse reference vars in libmpdemux/demux_ts.c  
(a bad example).

>- Is there a way for a demuxer to create a subtitle layer, along with a
>video layer? If so, how does the demuxer tell MPlayer that a subtitle
>layer is present, and where could I get the description of the format in
>which it should be given? 
>  
>

welcome to the hell of subtitles:) Only dvd subs can be pushed to 
demuxer->sub, all the others
must be managed indipendently using a subtitle structure (defined in 
../subtitle.h) and create
a function to fill it with text and call vo_osd_changed(OSD_SUBTITLE_TYPE).
Many demuxers do it.

>Thanks for any answers!
>
>Yours, Mikhail Ramendik
>
>P.S. For those interested, here's what I want to do:
>
>- Add an option to support streams/fifos (for use with stdin or
>pseudo-files made with mkfifo). With this option no seeks will ever be
>done. This is very useful for realtime encoding from an IEEE1394 source
>(streaming from dvgrab)
>
>- Add an option to decode the date/time code on every frame, and add it
>as a subtitle layer. DV does store this information in frames.
>
>
>  
>
this is text, it fits well with struct subtitle.

Since you are at it, why don't you add mplayer a sh_subs structure and 
the relative code to manage
fifos of subtitles and dispatch them to the right decoders, as is 
currently done for video and audio?
It would be very nice :)

        Nico

Nico




More information about the MPlayer-dev-eng mailing list