[MPlayer-dev-eng] Do decoders have a stream ?
D Richard Felker III
dalias at aerifal.cx
Wed Aug 27 21:00:36 CEST 2003
On Wed, Aug 27, 2003 at 11:09:21AM +0200, Magnus Damm wrote:
> Hi again,
>
> > > > > So what about implementing decoding ahead in one process into G2 ;-)
> > > >
> > > > cannot be done unless your hardware supports timed display of frames
> > >
> > > Huh, cannot be done? =)
> > > I'm not an expert on the subject, but wouldn't it be possible to have
> > > a goal of always keeping an adjustable number of frames decoded in
> > > separate fifos for {video|audio|sub|whatever}, and let the "regular"
> > > timer loop decide when to display? (replace with hardware dependent
> > > timing code when available) Then prioritize to fill up the audio
> > > fifo first. And then you have the framedropping, it's done ahead of
> > > time when the video fifo is filled up.
> >
> > this can be done, but what is the use of it?
> > the goal of decoding ahead is to use the time now spent in sleep() to
> > decode next frame(s). and it's coming from definition that you need 2
> > threads (one for display frame from fifo at the right time, can be done by
> > some hw, and one for decoding the frames (filling the fifo)).
>
> Two threads, agreed.
It can be done without two threads. I forget who came up with this
idea, but you just use the codec's draw_slice callback to check if
it's time to flip page and show the next frame in the fifo. Of course
it's much simpler if you don't have a real fifo but just start
decoding the next frame in the time before pageflip with mplayer's
current arch...
Rich
More information about the MPlayer-dev-eng
mailing list