summaryrefslogtreecommitdiff
path: root/src/plugins/avfoundation/camera/avfcamerasession.h
diff options
context:
space:
mode:
authorLudger Krämer <kraemer@dem-gmbh.de>2014-09-09 13:46:20 +0200
committerYoann Lopes <yoann.lopes@digia.com>2014-09-12 17:57:52 +0200
commit762ff94f67a58df6c7c6315268ea64a2d2151f95 (patch)
tree7f446cf1ddfd1a67336af320d846578e92351c5d /src/plugins/avfoundation/camera/avfcamerasession.h
parent9267a7833c6c30ccd4cbda3d087f0f901fb462eb (diff)
downloadqtmultimedia-762ff94f67a58df6c7c6315268ea64a2d2151f95.tar.gz
implement QVideoProbe for iOS camera
This commit allows to use QVideoProbe for QCamera on iOS. The logic for the implementation is taken from the Android plugin. [ChangeLog][Platform Specific Changes][iOS] QVideoProbe support is implemented for QCamera on iOS Change-Id: I1db50defa8518287c4f1f3cc6602881702a95849 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/plugins/avfoundation/camera/avfcamerasession.h')
-rw-r--r--src/plugins/avfoundation/camera/avfcamerasession.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/avfoundation/camera/avfcamerasession.h b/src/plugins/avfoundation/camera/avfcamerasession.h
index 75ca3f4ce..ec0c746c4 100644
--- a/src/plugins/avfoundation/camera/avfcamerasession.h
+++ b/src/plugins/avfoundation/camera/avfcamerasession.h
@@ -36,6 +36,7 @@
#include <QtCore/qmutex.h>
#include <QtMultimedia/qcamera.h>
+#include <QVideoFrame>
#import <AVFoundation/AVFoundation.h>
@@ -46,6 +47,7 @@ QT_BEGIN_NAMESPACE
class AVFCameraControl;
class AVFCameraService;
class AVFVideoRendererControl;
+class AVFMediaVideoProbeControl;
struct AVFCameraInfo
{
@@ -76,6 +78,9 @@ public:
QCamera::State requestedState() const { return m_state; }
bool isActive() const { return m_active; }
+ void addProbe(AVFMediaVideoProbeControl *probe);
+ void removeProbe(AVFMediaVideoProbeControl *probe);
+
public Q_SLOTS:
void setState(QCamera::State state);
@@ -83,6 +88,7 @@ public Q_SLOTS:
void processSessionStarted();
void processSessionStopped();
+ void onCameraFrameFetched(const QVideoFrame &frame);
Q_SIGNALS:
void readyToConfigureConnections();
void stateChanged(QCamera::State newState);
@@ -107,6 +113,10 @@ private:
AVCaptureDeviceInput *m_videoInput;
AVCaptureDeviceInput *m_audioInput;
AVFCameraSessionObserver *m_observer;
+
+ QSet<AVFMediaVideoProbeControl *> m_videoProbes;
+ QMutex m_videoProbesMutex;
+
};
QT_END_NAMESPACE