Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
456
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
0ade21ad
Commit
0ade21ad
authored
4 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
QtPlayer example: fix compilation with newer Qt/libvlc
parent
84e44305
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/libvlc/QtPlayer/player.cpp
+8
-2
8 additions, 2 deletions
doc/libvlc/QtPlayer/player.cpp
doc/libvlc/QtPlayer/player.h
+4
-0
4 additions, 0 deletions
doc/libvlc/QtPlayer/player.h
with
12 additions
and
2 deletions
doc/libvlc/QtPlayer/player.cpp
+
8
−
2
View file @
0ade21ad
...
...
@@ -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 */
...
...
@@ -181,7 +187,7 @@ int Mwindow::changeVolume(int vol) { /* Called on volume slider change */
void
Mwindow
::
changePosition
(
int
pos
)
{
/* Called on position slider change */
if
(
vlcPlayer
)
libvlc_media_player_set_position
(
vlcPlayer
,
(
float
)
pos
/
1000.0
);
libvlc_media_player_set_position
(
vlcPlayer
,
(
float
)
pos
/
1000.0
,
true
);
}
void
Mwindow
::
updateInterface
()
{
//Update interface and check if song is finished
...
...
This diff is collapsed.
Click to expand it.
doc/libvlc/QtPlayer/player.h
+
4
−
0
View file @
0ade21ad
...
...
@@ -9,6 +9,10 @@
#define PLAYER
#include
<QtGui>
#include
<QMainWindow>
#include
<QPushButton>
#include
<QSlider>
#include
<QWidget>
#include
<vlc/vlc.h>
class
Mwindow
:
public
QMainWindow
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment