Browse Source

QtPlayer example: fix compilation with newer Qt/libvlc

Cherry-picked from 0ade21ad07, with the
libvlc 4.0 part removed.

Signed-off-by: Alexandre Janniaux <alexandre.janniaux@gmail.com>
pull/135/head
Steve Lhomme 6 years ago
committed by Hugo Beauzée-Luyssen
parent
commit
de4d6d510e
  1. 8
      doc/libvlc/QtPlayer/player.cpp
  2. 4
      doc/libvlc/QtPlayer/player.h

8
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 */

4
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 {

Loading…
Cancel
Save