[MPlayer-dev-eng] Passing parameters to video/audio output drivers

Deron Kazmaier deron at pagestream.org
Tue Sep 20 16:15:46 CEST 2011


On 9/19/11 2:28 PM, Reimar Döffinger wrote:
> On Mon, Sep 19, 2011 at 01:23:37PM -0600, Deron Kazmaier wrote:
>> First, as I understand it the video output mode is selected using
>> the width and height based on the width and height of the video
>> data. It will fail if the width and height do not match. I can
>> select the next size up, but is there someway for the decklink
>> driver to cause a scale/crop/pad for mplayer etal to fill out the
>> data or does it need to do that itself? I know the user can scale
>> it, but is it recommended to do this automatically since it is
>> required?
> There is no code for that there yet. I worked on it several years back
> (for vo_x11) but it was never finished and the code got lost.
> You could do the scaling in the vo like vo_x11, but IMO it's not
> a good idea.

No problem. If it is ok to fail in this case, I will do so! Actually, it 
looks like it might promote according to some old comments. I'll check 
it out.

If not, should the decklink video driver then provide an error message? 
Should it dump a list of acceptable resolutions? Or give a hint like 
"Video must match available device resolutions. (for example, use -vf 
scale=h:v)"?

>
>> Second, that same code does not try and match the fps. It was just
>> picking the first fps option that matched the width/height. Can I
>> get the fps of the video data in the config call of the video
>> driver?
> vo_fps, but is unreliable and generally a bad idea to rely on.
> Also I'd expect anyone using the decklink stuff wants a very specific
> output frame rate, which does not necessarily have anything to do
> with the frame rate of the input.

Just trying to find a suitable default. I'll use vo_fps if nothing is 
specified.

>> Again, if it does not match an available output, can I
>> request it be scaled up?
> Just draw the frame twice, or not at all?

No problem, just didn't know if some approved method existed. I don't 
understand yet how timing is passed around, but I'll keep my eye out for 
examples from other drivers and ask here when I have a enough knowledge 
to even know what to ask.

>> Lastly (well for the video driver for now), I need to select from
>> multiple output devices. I happen to have 2, but each device can
>> have multiple outputs itself. What is the proper way to pass
>> parameters like this to the driver?
> preinit gets a string as parameter.
>
>> If some existing drivers do these things, I'm happy to go look
>> there, just which drivers to go look at?
> vo_gl is one of the more maintained ones.
>

And I will start with that one.

Thanks again!

Deron



More information about the MPlayer-dev-eng mailing list