[vlmc-devel] commit: MediaPlayer: Don't watch for keyboard input. (Hugo Beauzee-Luyssen )
git at videolan.org
git at videolan.org
Thu Mar 18 00:28:34 CET 2010
vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Thu Mar 18 00:27:08 2010 +0100| [c4b270a6640e8ad849b1ff5fcb14402dd932c0c6] | committer: Hugo Beauzee-Luyssen
MediaPlayer: Don't watch for keyboard input.
This introduce a segfault when stopping the media, patch has been sent
to VLC.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=c4b270a6640e8ad849b1ff5fcb14402dd932c0c6
---
src/LibVLCpp/VLCMediaPlayer.cpp | 6 ++++++
src/LibVLCpp/VLCMediaPlayer.h | 1 +
src/Renderer/ClipRenderer.cpp | 1 +
src/Renderer/WorkflowRenderer.cpp | 1 +
4 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/LibVLCpp/VLCMediaPlayer.cpp b/src/LibVLCpp/VLCMediaPlayer.cpp
index c950226..985293b 100644
--- a/src/LibVLCpp/VLCMediaPlayer.cpp
+++ b/src/LibVLCpp/VLCMediaPlayer.cpp
@@ -256,3 +256,9 @@ MediaPlayer::getNbVideoTrack()
int res = libvlc_video_get_track_count( m_internalPtr );
return res;
}
+
+void
+MediaPlayer::setKeyInput( bool enabled )
+{
+ libvlc_video_set_key_input( m_internalPtr, enabled );
+}
diff --git a/src/LibVLCpp/VLCMediaPlayer.h b/src/LibVLCpp/VLCMediaPlayer.h
index af6c673..f7c8665 100644
--- a/src/LibVLCpp/VLCMediaPlayer.h
+++ b/src/LibVLCpp/VLCMediaPlayer.h
@@ -63,6 +63,7 @@ namespace LibVLCpp
QString getLoadedMRL();
int getNbAudioTrack();
int getNbVideoTrack();
+ void setKeyInput( bool enabled );
private:
static void callbacks( const libvlc_event_t* event, void* self );
diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index 0c0bc94..8837ad3 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -98,6 +98,7 @@ ClipRenderer::startPreview()
delete m_vlcMedia;
m_vlcMedia = new LibVLCpp::Media( m_selectedClip->getMedia()->fileInfo()->absoluteFilePath() );
+ m_mediaPlayer->setKeyInput( false );
m_mediaPlayer->setMedia( m_vlcMedia );
m_mediaPlayer->play();
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index d644071..1dbccb1 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -224,6 +224,7 @@ void WorkflowRenderer::startPreview()
m_outputFps = outputFps();
setupRenderer( m_width, m_height, m_outputFps );
}
+ m_mediaPlayer->setKeyInput( false );
m_mediaPlayer->setMedia( m_media );
//Media player part: to update PreviewWidget
More information about the Vlmc-devel
mailing list