libVLC setup callback: Apply the proper video size

This forum is about all development around libVLC.
bunjee
Blank Cone
Blank Cone
Posts: 33
Joined: 01 Feb 2012 20:51
Contact:

libVLC setup callback: Apply the proper video size

Postby bunjee » 06 Oct 2016 16:42

Greetings VideoLAN community,

I'm having trouble applying the video display size during my setup callback.

- I'm using libvlc_video_set_format_callbacks to register my libvlc_video_format_cb callback.
- I'm also registering to libvlc_MediaParsedChanged in order to retrieve the video size.

Unfortunately my setup callback gets called before the media event and provides the video size instead of the display size.

As a workaround I'm retrieving the video size through libvlc_video_get_size inside the setup callback and update the provided *width and *height with the display values.

Is it the proper way to do it ? Am I doing it wrong ?

Thanks ♥.

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libVLC setup callback: Apply the proper video size

Postby Rémi Denis-Courmont » 06 Oct 2016 20:31

That's correct. But then again, you should use window (handle) embedding functions, not video callbacks, which are slow.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 31 guests