Hugo Beauzée-Luyssen pushed to branch 3.0.x at VideoLAN / VLC
Commits: de4d6d51 by Steve Lhomme at 2021-11-16T13:42:28+00:00 QtPlayer example: fix compilation with newer Qt/libvlc Cherry-picked from 0ade21ad07f88f77fbf296af0fc71bec179ee7ab, with the libvlc 4.0 part removed. Signed-off-by: Alexandre Janniaux <[email protected]> - - - - - 0e9f4641 by Alexandre Janniaux at 2021-11-16T13:42:28+00:00 doc: QtPlayer: update .pro file to use pkg-config It allows to configure the example with, for instance, the following command line: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ qmake .. PKG_CONFIG_PATH can be adapted to the path where libvlc has been installed and/or where Qt is available. This also remove the unused parts, and add QT += widgets which is needed to compile. Cherry-picked from commit d99c280178ef5c09923d101a0fa103f0aa0c1b3c. Signed-off-by: Alexandre Janniaux <[email protected]> - - - - - 8f8c442e by Steve Lhomme at 2021-11-16T13:42:28+00:00 doc: QtPlayer: add QWindowsIntegrationPlugin plugin Similar to the one in the QtGl sample. Cherry-picked from commit 930b5ef4f977febc8faf7817eceab231b8d21723. Note that QtGl sample doesn't exist in the 3.0.x branch. Signed-off-by: Alexandre Janniaux <[email protected]> - - - - - baf5223d by Alexandre Janniaux at 2021-11-16T13:42:28+00:00 doc: QtPlayer: check _WIN32 for windows plugins QWindowsIntegrationPlugin is supposed to be linked against only when the example is being compiled for Windows platform. Cherry-picked from commit ce4e4085c60a0abdde8660673c5293c5fff46108. Signed-off-by: Alexandre Janniaux <[email protected]> - - - - - 4 changed files: - doc/libvlc/QtPlayer/QtVLC.pro - doc/libvlc/QtPlayer/main.cpp - doc/libvlc/QtPlayer/player.cpp - doc/libvlc/QtPlayer/player.h Changes: ===================================== doc/libvlc/QtPlayer/QtVLC.pro ===================================== @@ -1,9 +1,9 @@ TEMPLATE = app TARGET = qtvlc -DEPENDPATH += . -INCLUDEPATH += . -LIBS += -lvlc -lX11 -# Input +CONFIG += link_pkgconfig force_debug_info +PKGCONFIG = libvlc +QT += widgets + HEADERS += player.h SOURCES += main.cpp player.cpp ===================================== doc/libvlc/QtPlayer/main.cpp ===================================== @@ -12,6 +12,13 @@ #include <X11/Xlib.h> #endif +#ifdef QT_STATIC +# include <QtPlugin> +# ifdef _WIN32 +Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) +# endif +#endif + int main(int argc, char *argv[]) { #ifdef Q_WS_X11 XInitThreads(); ===================================== doc/libvlc/QtPlayer/player.cpp ===================================== @@ -11,6 +11,12 @@ #define qtu( i ) ((i).toUtf8().constData()) #include <QtGui> +#include <QMessageBox> +#include <QMenuBar> +#include <QAction> +#include <QHBoxLayout> +#include <QVBoxLayout> +#include <QFileDialog> Mwindow::Mwindow() { vlcPlayer = NULL; @@ -142,7 +148,7 @@ void Mwindow::openFile() { #elif defined(Q_OS_UNIX) libvlc_media_player_set_xwindow(vlcPlayer, videoWidget->winId()); #elif defined(Q_OS_WIN) - libvlc_media_player_set_hwnd(vlcPlayer, videoWidget->winId()); + libvlc_media_player_set_hwnd(vlcPlayer, (HWND)videoWidget->winId()); #endif /* And start playback */ ===================================== doc/libvlc/QtPlayer/player.h ===================================== @@ -9,6 +9,10 @@ #define PLAYER #include <QtGui> +#include <QMainWindow> +#include <QPushButton> +#include <QSlider> +#include <QWidget> #include <vlc/vlc.h> class Mwindow : public QMainWindow { View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e69264f8edd9e01ebb5f66cbb11cc1849e4082e3...baf5223dff873ca066f00b20f13c89b47ca6e878 -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e69264f8edd9e01ebb5f66cbb11cc1849e4082e3...baf5223dff873ca066f00b20f13c89b47ca6e878 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
