[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bphonon=5D_phonon/experimental=3A_Add_stateChanged_s?=
From:       Casian Andrei <skeletk13 () gmail ! com>
Date:       2011-02-28 21:50:21
Message-ID: 20110228215021.A331FA60DC () git ! kde ! org
[Download RAW message or body]

Git commit 2a80da2ab43e46960151f93b9058c3dfb4061c02 by Casian Andrei.
Committed on 28/02/2011 at 21:53.
Pushed by casianandrei into branch 'master'.

Add stateChanged signal to AvCapture

M  +3    -0    phonon/experimental/avcapture.cpp     
M  +12   -1    phonon/experimental/avcapture.h     
M  +2    -1    phonon/experimental/avcapture_p.h     

http://commits.kde.org/phonon/2a80da2ab43e46960151f93b9058c3dfb4061c02

diff --git a/phonon/experimental/avcapture.cpp b/phonon/experimental/avcapture.cpp
index faa5aee..1a76d04 100644
--- a/phonon/experimental/avcapture.cpp
+++ b/phonon/experimental/avcapture.cpp
@@ -125,8 +125,11 @@ bool AvCapturePrivate::aboutToDeleteBackendObject()
 
 void AvCapturePrivate::setupBackendObject()
 {
+    Q_Q(AvCapture);
     Q_ASSERT(m_backendObject);
 
+    QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, \
Phonon::State)), q, SIGNAL(stateChanged(Phonon::State, Phonon::State)), \
Qt::QueuedConnection); +
     // set up attributes
     pINTERFACE_CALL(setAudioCaptureDevice(audioCaptureDevice));
     pINTERFACE_CALL(setVideoCaptureDevice(videoCaptureDevice));
diff --git a/phonon/experimental/avcapture.h b/phonon/experimental/avcapture.h
index 1eabafa..7eb1d10 100644
--- a/phonon/experimental/avcapture.h
+++ b/phonon/experimental/avcapture.h
@@ -32,7 +32,7 @@
 #include "../medianode.h"
 #include "../phonondefs.h"
 #include "objectdescription.h"
-#include "phonon/Global"
+#include "phonon/phononnamespace.h"
 
 class QString;
 class QStringList;
@@ -127,6 +127,17 @@ namespace Experimental
              * Stop capture.
              */
             void stop();
+
+        Q_SIGNALS:
+            /**
+             * Emitted when the state of the video or audio capture device has been \
changed. +             *
+             * \li If only the audio capture device is valid, it notifies about the \
audio capture state. +             * \li If only the video capture device is valid, \
it notifies about the video capture state. +             * \li If both the audio and \
video capture devices are valid, it only notifies about the +             * video \
capture state. +             */
+            void stateChanged(Phonon::State newstate, Phonon::State oldstate);
     };
 
 } // namespace Experimental
diff --git a/phonon/experimental/avcapture_p.h b/phonon/experimental/avcapture_p.h
index e1facfe..ebda59e 100644
--- a/phonon/experimental/avcapture_p.h
+++ b/phonon/experimental/avcapture_p.h
@@ -26,7 +26,6 @@
 #ifndef NO_PHONON_AVCAPTURE
 
 #include "avcapture.h"
-#include "../medianode_p.h"
 #include "../phonondefs_p.h"
 
 namespace Phonon
@@ -40,6 +39,8 @@ class AvCapturePrivate : public MediaNodePrivate
     PHONON_PRIVATECLASS
     public:
     protected:
+        PHONON_EXPORT void _k_stateChanged(Phonon::State, Phonon::State);
+    protected:
         Phonon::AudioCaptureDevice audioCaptureDevice;
         Phonon::VideoCaptureDevice videoCaptureDevice;
 };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic