Page 1 of 1

libVLC setup callback: Apply the proper video size

Posted: 06 Oct 2016 16:42
by bunjee
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 ♥.

Re: libVLC setup callback: Apply the proper video size

Posted: 06 Oct 2016 20:31
by Rémi Denis-Courmont
That's correct. But then again, you should use window (handle) embedding functions, not video callbacks, which are slow.