[vlc-devel] How to tell vlc core the current display size in vout module?

David Fuhrmann david.fuhrmann at googlemail.com
Fri Apr 13 13:11:51 CEST 2012


Am 10.04.2012 um 10:16 schrieb David Fuhrmann:

> Hello again,
> 
> Currently, the zoom functionality is not really working in macosx vout (see my comment in #5997).
> Therefore, I tried to fix that and changed the code to
> 
> vout_display_PlacePicture (&place, source, cfg, false);
> glViewport (place.x, place.y, place.width, place.height);
> 
> for every zoom / crop / ar event and
> 
> vout_display_PlacePicture (&place, &vd->source, vd->cfg, false);
> glViewport (place.x, place.y, place.width, place.height);
> 
> for every window resize (method reshape).
> 
> Now the problem is that the picture is always aligned in the lower left corner when in fullscreen, because cfg->display.* is not updated and always on the standard / initial value.
> I thought that vout_display_SendEventDisplaySize (...) would update these values but this does not really work, even not after felix latest vout commit (4a10b45f3147f524ce09bff7b939d09a3f59f108).
> 
> So, can anyone give me a hint what the correct event would be to update cfg?
> Thanks for your help.
> 
> Best regards,
> David

Hello,

I found the solution for the above problem. vout_display_SendEventDisplaySize seems right, but it was never called actually.

Now I have a partly working zoom functionality, which leads to a second question:

When VLC is in fullscreen mode and when I set cfg->is_display_filled to false before (press 'o' to switch to original size), zoom works.
But without that, is_display_filled is true when the vout module gets the zoom event, even in fullscreen. This means that vout_display_PlacePicture does not look at the zoom values at all, because this happens only in vout_display_GetDefaultDisplaySize which is never called (see src/video_output/display.c line 217 and following).

Is this the desired behavior? I would expect that the core sets is_display_filled to false once we hit 'z' (and the window is in fullscreen), and sets it to true again if we hit 'o' (reset zoom).
Another option could be that we change vout_display_PlacePicture.

What do you think? I would be glad to read your opinions.

Best regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120413/df9daba2/attachment.html>


More information about the vlc-devel mailing list