[MPlayer-dev-eng] [RFC][PATCH] audio and video framers
nicola_sabbi at fastwebnet.it
Sat Feb 24 23:32:52 CET 2007
This patch adds to mplayer a framer layer and 4 implementations (as
usual for mpeg* formats):
- one for mpeg1/2 video
- one for each of mpeg audio, aac, ac3 (for dts it's equally trivial but
I didn't have time).
- in theory there's support for codecs that use extradata (e.g. vorbis
would be parsable)
Demuxers need only set ds->needs_parsing=1; if possible demux_open()
will initialize the
appropriate framers/parsers and from that point onward:
- ds_add_packet() will do something like
while(dp2 = mp_parser_fetch_packet(ds->parser))
} else real_ds_add_packet(ds, dp);
- ds_free_packs() will reset the parser's buffers, so seeking will be safe.
The job of the framer is to output demux_packets containing exactly 1
frame with the correct pts;
the pts will be either:
- the one provided by the mux when available
- an interpolated value based on the properties read from the elementary
Framers can be used both in the path between demuxers and decoders and
in the path
between [m]encoder and muxers (mpeg or lavf, that need correct pts for
not yet implemented).
In order to activate the framer you have to add -framer to your command
line, possibly with -correct-pts
(now fully supported).
Audio and video switching are not yet supported.
I'm not completely sure there aren't bugs.
I'd like to hear opinions and test reports.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18935 bytes
Desc: not available
More information about the MPlayer-dev-eng