Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
092c9daa
Commit
092c9daa
authored
Apr 02, 2009
by
Geoffroy Lacarriere
Browse files
Implemenation of the setDrawable method of libvlc_mediaplayer in the media class.
parent
429b0d64
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/LibVLCpp/VLCMediaPlayer.cpp
View file @
092c9daa
...
...
@@ -68,7 +68,7 @@ qint64 MediaPlayer::getLength()
{
qint64
length
=
libvlc_media_player_get_length
(
m_internalPtr
,
m_ex
);
m_ex
.
checkThrow
();
//
qDebug() << "Media length: " << length;
//
qDebug() << "Media length: " << length;
return
length
;
}
...
...
@@ -91,3 +91,9 @@ bool MediaPlayer::isSeekable()
m_ex
.
checkThrow
();
return
(
res
==
1
);
}
void
MediaPlayer
::
setDrawable
(
int
handle
)
{
libvlc_drawable_t
window
=
handle
;
libvlc_media_player_set_drawable
(
m_internalPtr
,
window
,
m_ex
);
}
src/LibVLCpp/VLCMediaPlayer.h
View file @
092c9daa
...
...
@@ -46,6 +46,7 @@ namespace LibVLCpp
void
takeSnapshot
(
char
*
outputFile
,
unsigned
int
width
,
unsigned
int
heigth
);
bool
isPlaying
();
bool
isSeekable
();
void
setDrawable
(
int
handle
);
private:
Exception
m_ex
;
...
...
src/Media.cpp
View file @
092c9daa
...
...
@@ -141,10 +141,7 @@ qint64 Media::getLength()
void
Media
::
play
()
{
if
(
m_isMediaInitialized
)
{
qDebug
()
<<
"play"
;
playSlot
();
}
else
{
msleep
(
100
);
...
...
@@ -154,7 +151,6 @@ void Media::play()
void
Media
::
playSlot
()
{
qDebug
()
<<
"playSlot"
;
m_vlcMediaPlayer
->
play
();
}
...
...
@@ -163,3 +159,7 @@ QImage& Media::getImage()
return
*
m_image
;
}
void
Media
::
setDrawable
(
int
handle
)
{
m_vlcMediaPlayer
->
setDrawable
(
handle
);
}
src/Media.h
View file @
092c9daa
...
...
@@ -50,6 +50,7 @@ public:
qint64
getLength
();
QImage
&
getImage
();
void
play
();
void
setDrawable
(
int
handle
);
private:
virtual
void
run
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment