[MPlayer-dev-eng] [PATCH] DeckLink video output

Georg Lippitsch georg.lippitsch at gmx.at
Tue Aug 18 00:20:53 CEST 2009


Am Monday 17 August 2009 22:40:30 schrieb Reimar Döffinger:

> Disregarding that the design without open/close or anything seems really
> horrible to me (does this thing always allocate resources just when
> MPlayer is linked against it, regardless of whether it will ever be used
> or not??) this is also wrong, when immed is set it should stop playing
> immediately.

Everything is initialized, stopped and uninitialized in the video driver. The 
audio won't work without the video driver.

> Is there no way to stop output without dropping the buffered samples?

According the to the API docs, audio buffer is flushed automatically when 
playing is stopped on the card, but that didn't always work. Not calling 
FlushAudioSamples led to some strange behavior (A-V sync problems when video 
is paused).

>
> > +static int get_space(void)
> > +{
> > +    return 38400;
> > +}
> > +
> > +static float get_delay(void)
> > +{
> > +    return 0.0;
> > +}
>
> At least in some cases this combination is going to cause severe
> issues. E.g. with audio only files it might cause an extremely high CPU
> usages (e.g. 40% instead of 0.5%).

Audio only files won't work at all, as stated above.

> Unfortunately I do not remember the details.

These would be interesting, since I tried a lot of values for get_space.
Large values (>65kb) made mplayer hang, small values gave broken sound.

> There is also the issue that A-V sync will not be remotely good without
> an accurate get_delay.

The video card does all timing, AFAIK the dxr2/3 drivers do it in the same 
way. A-V stays in sync because the same amount of time for audio and video is 
buffered.
What I wanted to achive with this, is to disable mplayers internal timing and 
let the card do that. What is the best way to achieve this? The video driver 
has to return "VFCAP_TIMER" in query_format, but for the audio driver I 
didn't find anything comparable.


Georg





More information about the MPlayer-dev-eng mailing list