[MPlayer-dev-eng] demuxer question

Alexander Neundorf neundorf at dellingsoft.de
Fri May 17 13:46:56 CEST 2002


On Friday 17 May 2002 13:37, you wrote:
> On Friday 17 May 2002 12:34, you wrote:
> > Hi,
> >
> > > I'm currently writing a raw dv (as played by playdv and produced by
> > > dvgrab --format raw)  demuxer and decoder using libdv for mplayer.
> > > Video is already working :-)
> > >
> > > Now I don't know exactly how to do the audio part.
> > > The decoding functions for audio and video of libdv both operate on the
> > > same buffer. Since a dv stream is quite big, it wouldn't be optimal to
> > > handle the stream twice through mplayer (ok, didn't test yet).
> >
> > yep... i kno wthe problem, i also starte dto work on type-2 dv .avi
> > support (when the avi file has one stream, having audio-video
> > multiplexed).
> >
> > imho either you should separate audio and video chunks, and hack libdv to
> > handle them from different buffers (or use its lowlevel functions to
> > operate on macroblock level), or duplicate the packet in the memory
> > (ds_read_packet first and then ds_new_packet and memcpy the first to
> > that).
>
> new_demux_packet() you mean, right ?
>
> Alex

A related note, do you think it would make mplayer faster if 
new_demux_packet() wouldn't actually always malloc() new packets, but if it 
would have a "list" or whatever of demux_packet_t's which it marks free and 
used ?
The requested size would have to be checked.

Bye
Alex



More information about the MPlayer-dev-eng mailing list