[vlmc-devel] VLCMediaPlayer: Add an helper for waiting on a single event.

Hugo Beauzée-Luyssen git at videolan.org
Sun Sep 23 16:31:35 CEST 2012


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Sep 23 00:15:22 2012 +0300| [ed470f7e6c644c4b3af4990e6abc32638d4ff1cd] | committer: Hugo Beauzée-Luyssen

VLCMediaPlayer: Add an helper for waiting on a single event.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=ed470f7e6c644c4b3af4990e6abc32638d4ff1cd
---

 src/LibVLCpp/VLCMediaPlayer.cpp |    8 ++++++++
 src/LibVLCpp/VLCMediaPlayer.h   |    2 ++
 2 files changed, 10 insertions(+)

diff --git a/src/LibVLCpp/VLCMediaPlayer.cpp b/src/LibVLCpp/VLCMediaPlayer.cpp
index d471868..2ebb07d 100644
--- a/src/LibVLCpp/VLCMediaPlayer.cpp
+++ b/src/LibVLCpp/VLCMediaPlayer.cpp
@@ -357,6 +357,14 @@ MediaPlayer::configureWaitForEvent( const QList<int> &toWait, const QList<int> &
     m_eventsCallback = callback;
 }
 
+void
+MediaPlayer::configureWaitForEvent(int toWait, const QList<int> &cancel, MediaPlayer::CheckEventCallback callback)
+{
+    QList<int> toWaitList;
+    toWaitList.append( toWait );
+    configureWaitForEvent( toWaitList, cancel, callback );
+}
+
 MediaPlayer::EventWaitResult
 MediaPlayer::waitForEvent( unsigned long timeoutDuration )
 {
diff --git a/src/LibVLCpp/VLCMediaPlayer.h b/src/LibVLCpp/VLCMediaPlayer.h
index 13d111f..8125434 100644
--- a/src/LibVLCpp/VLCMediaPlayer.h
+++ b/src/LibVLCpp/VLCMediaPlayer.h
@@ -103,6 +103,8 @@ namespace   LibVLCpp
         void                                configureWaitForEvent(const QList<int> &toWait,
                                                                     const QList<int> &cancel,
                                                                     CheckEventCallback callback = NULL );
+        void                                configureWaitForEvent(int, const QList<int> &cancel,
+                                                                    CheckEventCallback callback = NULL );
         /**
          * @brief This method will wait for one of the events specified by the
          * list given to configureWaitForEvent().



More information about the Vlmc-devel mailing list