force libvlc to resize video
Posted: 22 Oct 2014 22:06
Hello. I'm developing libvlc based application on qt. And I want it to go fullscreen/normal size by user action (as vlc do).
My video window is embedde into a top-level window of my app. If I do libvlc_set_fullscreen and make top level window to do fullscreen it works from time to time. Most of the time video does not resize, but sometimes it does. It's wierd.
There is doc saying:
* @warning With most window managers, only a top-level windows can be in
* full-screen mode. Hence, this function will not operate properly if
* libvlc_media_player_set_xwindow() was used to embed the video in a
* non-top-level window. In that case, the embedding window must be reparented
* to the root window <b>before</b> fullscreen mode is enabled. You will want
* to reparent it back to its normal parent when disabling fullscreen.
But calling
video->setParent(NULL);
video->show();
before
libvlc_set_fullscreen(vlcPlayer, fullscreen);
not helping at all. I see no video at all
Is there any method to resize video output from libvlc api, or a propper way (an example) of dealing with non-top-level video window?
Thanx
My video window is embedde into a top-level window of my app. If I do libvlc_set_fullscreen and make top level window to do fullscreen it works from time to time. Most of the time video does not resize, but sometimes it does. It's wierd.
There is doc saying:
* @warning With most window managers, only a top-level windows can be in
* full-screen mode. Hence, this function will not operate properly if
* libvlc_media_player_set_xwindow() was used to embed the video in a
* non-top-level window. In that case, the embedding window must be reparented
* to the root window <b>before</b> fullscreen mode is enabled. You will want
* to reparent it back to its normal parent when disabling fullscreen.
But calling
video->setParent(NULL);
video->show();
before
libvlc_set_fullscreen(vlcPlayer, fullscreen);
not helping at all. I see no video at all
Is there any method to resize video output from libvlc api, or a propper way (an example) of dealing with non-top-level video window?
Thanx