Rename camera classes to avoid name clash.
Change-Id: I08fe8f7e75bdbf2c4975863642072061741b5bc6 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
committed by
Sean Harmer
parent
fe21ee675e
commit
9a215d954b
@@ -31,8 +31,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef AVFVIDEODEVICECONTROL_H
|
#ifndef AVFCAMERADEVICECONTROL_H
|
||||||
#define AVFVIDEODEVICECONTROL_H
|
#define AVFCAMERADEVICECONTROL_H
|
||||||
|
|
||||||
#include <QtMultimedia/qvideodeviceselectorcontrol.h>
|
#include <QtMultimedia/qvideodeviceselectorcontrol.h>
|
||||||
#include <QtCore/qstringlist.h>
|
#include <QtCore/qstringlist.h>
|
||||||
@@ -44,12 +44,12 @@ QT_BEGIN_NAMESPACE
|
|||||||
class AVFCameraSession;
|
class AVFCameraSession;
|
||||||
class AVFCameraService;
|
class AVFCameraService;
|
||||||
|
|
||||||
class AVFVideoDeviceControl : public QVideoDeviceSelectorControl
|
class AVFCameraDeviceControl : public QVideoDeviceSelectorControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
AVFVideoDeviceControl(AVFCameraService *service, QObject *parent = 0);
|
AVFCameraDeviceControl(AVFCameraService *service, QObject *parent = 0);
|
||||||
~AVFVideoDeviceControl();
|
~AVFCameraDeviceControl();
|
||||||
|
|
||||||
int deviceCount() const;
|
int deviceCount() const;
|
||||||
|
|
||||||
@@ -40,30 +40,31 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "avfcameradebug.h"
|
#include "avfcameradebug.h"
|
||||||
#include "avfvideodevicecontrol.h"
|
#include "avfcameradevicecontrol.h"
|
||||||
#include "avfcameraservice.h"
|
#include "avfcameraservice.h"
|
||||||
#include "avfcamerasession.h"
|
#include "avfcamerasession.h"
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
AVFVideoDeviceControl::AVFVideoDeviceControl(AVFCameraService *service, QObject *parent)
|
AVFCameraDeviceControl::AVFCameraDeviceControl(AVFCameraService *service, QObject *parent)
|
||||||
: QVideoDeviceSelectorControl(parent)
|
: QVideoDeviceSelectorControl(parent)
|
||||||
, m_service(service)
|
, m_service(service)
|
||||||
, m_selectedDevice(0)
|
, m_selectedDevice(0)
|
||||||
, m_dirty(true)
|
, m_dirty(true)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(m_service);
|
||||||
}
|
}
|
||||||
|
|
||||||
AVFVideoDeviceControl::~AVFVideoDeviceControl()
|
AVFCameraDeviceControl::~AVFCameraDeviceControl()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int AVFVideoDeviceControl::deviceCount() const
|
int AVFCameraDeviceControl::deviceCount() const
|
||||||
{
|
{
|
||||||
return AVFCameraSession::availableCameraDevices().count();
|
return AVFCameraSession::availableCameraDevices().count();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AVFVideoDeviceControl::deviceName(int index) const
|
QString AVFCameraDeviceControl::deviceName(int index) const
|
||||||
{
|
{
|
||||||
const QList<QByteArray> &devices = AVFCameraSession::availableCameraDevices();
|
const QList<QByteArray> &devices = AVFCameraSession::availableCameraDevices();
|
||||||
if (index < 0 || index >= devices.count())
|
if (index < 0 || index >= devices.count())
|
||||||
@@ -72,7 +73,7 @@ QString AVFVideoDeviceControl::deviceName(int index) const
|
|||||||
return QString::fromUtf8(devices.at(index));
|
return QString::fromUtf8(devices.at(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AVFVideoDeviceControl::deviceDescription(int index) const
|
QString AVFCameraDeviceControl::deviceDescription(int index) const
|
||||||
{
|
{
|
||||||
const QList<QByteArray> &devices = AVFCameraSession::availableCameraDevices();
|
const QList<QByteArray> &devices = AVFCameraSession::availableCameraDevices();
|
||||||
if (index < 0 || index >= devices.count())
|
if (index < 0 || index >= devices.count())
|
||||||
@@ -81,17 +82,17 @@ QString AVFVideoDeviceControl::deviceDescription(int index) const
|
|||||||
return AVFCameraSession::cameraDeviceInfo(devices.at(index)).description;
|
return AVFCameraSession::cameraDeviceInfo(devices.at(index)).description;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AVFVideoDeviceControl::defaultDevice() const
|
int AVFCameraDeviceControl::defaultDevice() const
|
||||||
{
|
{
|
||||||
return AVFCameraSession::availableCameraDevices().indexOf(AVFCameraSession::defaultCameraDevice());
|
return AVFCameraSession::availableCameraDevices().indexOf(AVFCameraSession::defaultCameraDevice());
|
||||||
}
|
}
|
||||||
|
|
||||||
int AVFVideoDeviceControl::selectedDevice() const
|
int AVFCameraDeviceControl::selectedDevice() const
|
||||||
{
|
{
|
||||||
return m_selectedDevice;
|
return m_selectedDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVFVideoDeviceControl::setSelectedDevice(int index)
|
void AVFCameraDeviceControl::setSelectedDevice(int index)
|
||||||
{
|
{
|
||||||
if (index >= 0 &&
|
if (index >= 0 &&
|
||||||
index < deviceCount() &&
|
index < deviceCount() &&
|
||||||
@@ -103,7 +104,7 @@ void AVFVideoDeviceControl::setSelectedDevice(int index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AVCaptureDevice *AVFVideoDeviceControl::createCaptureDevice()
|
AVCaptureDevice *AVFCameraDeviceControl::createCaptureDevice()
|
||||||
{
|
{
|
||||||
m_dirty = false;
|
m_dirty = false;
|
||||||
AVCaptureDevice *device = 0;
|
AVCaptureDevice *device = 0;
|
||||||
@@ -121,4 +122,4 @@ AVCaptureDevice *AVFVideoDeviceControl::createCaptureDevice()
|
|||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_avfvideodevicecontrol.cpp"
|
#include "moc_avfcameradevicecontrol.cpp"
|
||||||
@@ -31,8 +31,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef AVFVIDEORENDERERCONTROL_H
|
#ifndef AVFCAMERARENDERERCONTROL_H
|
||||||
#define AVFVIDEORENDERERCONTROL_H
|
#define AVFCAMERARENDERERCONTROL_H
|
||||||
|
|
||||||
#include <QtMultimedia/qvideorenderercontrol.h>
|
#include <QtMultimedia/qvideorenderercontrol.h>
|
||||||
#include <QtMultimedia/qvideoframe.h>
|
#include <QtMultimedia/qvideoframe.h>
|
||||||
@@ -46,14 +46,14 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class AVFCameraSession;
|
class AVFCameraSession;
|
||||||
class AVFCameraService;
|
class AVFCameraService;
|
||||||
class AVFVideoRendererControl;
|
class AVFCameraRendererControl;
|
||||||
|
|
||||||
class AVFVideoRendererControl : public QVideoRendererControl
|
class AVFCameraRendererControl : public QVideoRendererControl
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
AVFVideoRendererControl(QObject *parent = 0);
|
AVFCameraRendererControl(QObject *parent = 0);
|
||||||
~AVFVideoRendererControl();
|
~AVFCameraRendererControl();
|
||||||
|
|
||||||
QAbstractVideoSurface *surface() const;
|
QAbstractVideoSurface *surface() const;
|
||||||
void setSurface(QAbstractVideoSurface *surface);
|
void setSurface(QAbstractVideoSurface *surface);
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "avfvideorenderercontrol.h"
|
#include "avfcamerarenderercontrol.h"
|
||||||
#include "avfcamerasession.h"
|
#include "avfcamerasession.h"
|
||||||
#include "avfcameraservice.h"
|
#include "avfcameraservice.h"
|
||||||
#include "avfcameradebug.h"
|
#include "avfcameradebug.h"
|
||||||
@@ -103,10 +103,10 @@ private:
|
|||||||
@interface AVFCaptureFramesDelegate : NSObject <AVCaptureVideoDataOutputSampleBufferDelegate>
|
@interface AVFCaptureFramesDelegate : NSObject <AVCaptureVideoDataOutputSampleBufferDelegate>
|
||||||
{
|
{
|
||||||
@private
|
@private
|
||||||
AVFVideoRendererControl *m_renderer;
|
AVFCameraRendererControl *m_renderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (AVFCaptureFramesDelegate *) initWithRenderer:(AVFVideoRendererControl*)renderer;
|
- (AVFCaptureFramesDelegate *) initWithRenderer:(AVFCameraRendererControl*)renderer;
|
||||||
|
|
||||||
- (void) captureOutput:(AVCaptureOutput *)captureOutput
|
- (void) captureOutput:(AVCaptureOutput *)captureOutput
|
||||||
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
@@ -115,7 +115,7 @@ private:
|
|||||||
|
|
||||||
@implementation AVFCaptureFramesDelegate
|
@implementation AVFCaptureFramesDelegate
|
||||||
|
|
||||||
- (AVFCaptureFramesDelegate *) initWithRenderer:(AVFVideoRendererControl*)renderer
|
- (AVFCaptureFramesDelegate *) initWithRenderer:(AVFCameraRendererControl*)renderer
|
||||||
{
|
{
|
||||||
if (!(self = [super init]))
|
if (!(self = [super init]))
|
||||||
return nil;
|
return nil;
|
||||||
@@ -143,7 +143,7 @@ private:
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
AVFVideoRendererControl::AVFVideoRendererControl(QObject *parent)
|
AVFCameraRendererControl::AVFCameraRendererControl(QObject *parent)
|
||||||
: QVideoRendererControl(parent)
|
: QVideoRendererControl(parent)
|
||||||
, m_surface(0)
|
, m_surface(0)
|
||||||
, m_needsHorizontalMirroring(false)
|
, m_needsHorizontalMirroring(false)
|
||||||
@@ -151,18 +151,18 @@ AVFVideoRendererControl::AVFVideoRendererControl(QObject *parent)
|
|||||||
m_viewfinderFramesDelegate = [[AVFCaptureFramesDelegate alloc] initWithRenderer:this];
|
m_viewfinderFramesDelegate = [[AVFCaptureFramesDelegate alloc] initWithRenderer:this];
|
||||||
}
|
}
|
||||||
|
|
||||||
AVFVideoRendererControl::~AVFVideoRendererControl()
|
AVFCameraRendererControl::~AVFCameraRendererControl()
|
||||||
{
|
{
|
||||||
[m_cameraSession->captureSession() removeOutput:m_videoDataOutput];
|
[m_cameraSession->captureSession() removeOutput:m_videoDataOutput];
|
||||||
[m_viewfinderFramesDelegate release];
|
[m_viewfinderFramesDelegate release];
|
||||||
}
|
}
|
||||||
|
|
||||||
QAbstractVideoSurface *AVFVideoRendererControl::surface() const
|
QAbstractVideoSurface *AVFCameraRendererControl::surface() const
|
||||||
{
|
{
|
||||||
return m_surface;
|
return m_surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVFVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
|
void AVFCameraRendererControl::setSurface(QAbstractVideoSurface *surface)
|
||||||
{
|
{
|
||||||
if (m_surface != surface) {
|
if (m_surface != surface) {
|
||||||
m_surface = surface;
|
m_surface = surface;
|
||||||
@@ -170,7 +170,7 @@ void AVFVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVFVideoRendererControl::configureAVCaptureSession(AVFCameraSession *cameraSession)
|
void AVFCameraRendererControl::configureAVCaptureSession(AVFCameraSession *cameraSession)
|
||||||
{
|
{
|
||||||
m_cameraSession = cameraSession;
|
m_cameraSession = cameraSession;
|
||||||
connect(m_cameraSession, SIGNAL(readyToConfigureConnections()),
|
connect(m_cameraSession, SIGNAL(readyToConfigureConnections()),
|
||||||
@@ -196,7 +196,7 @@ void AVFVideoRendererControl::configureAVCaptureSession(AVFCameraSession *camera
|
|||||||
[m_cameraSession->captureSession() addOutput:m_videoDataOutput];
|
[m_cameraSession->captureSession() addOutput:m_videoDataOutput];
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVFVideoRendererControl::updateCaptureConnection()
|
void AVFCameraRendererControl::updateCaptureConnection()
|
||||||
{
|
{
|
||||||
AVCaptureConnection *connection = [m_videoDataOutput connectionWithMediaType:AVMediaTypeVideo];
|
AVCaptureConnection *connection = [m_videoDataOutput connectionWithMediaType:AVMediaTypeVideo];
|
||||||
if (connection == nil || !m_cameraSession->videoCaptureDevice())
|
if (connection == nil || !m_cameraSession->videoCaptureDevice())
|
||||||
@@ -213,7 +213,7 @@ void AVFVideoRendererControl::updateCaptureConnection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//can be called from non main thread
|
//can be called from non main thread
|
||||||
void AVFVideoRendererControl::syncHandleViewfinderFrame(const QVideoFrame &frame)
|
void AVFCameraRendererControl::syncHandleViewfinderFrame(const QVideoFrame &frame)
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_vfMutex);
|
QMutexLocker lock(&m_vfMutex);
|
||||||
if (!m_lastViewfinderFrame.isValid()) {
|
if (!m_lastViewfinderFrame.isValid()) {
|
||||||
@@ -244,7 +244,7 @@ void AVFVideoRendererControl::syncHandleViewfinderFrame(const QVideoFrame &frame
|
|||||||
m_cameraSession->onCameraFrameFetched(m_lastViewfinderFrame);
|
m_cameraSession->onCameraFrameFetched(m_lastViewfinderFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVFVideoRendererControl::handleViewfinderFrame()
|
void AVFCameraRendererControl::handleViewfinderFrame()
|
||||||
{
|
{
|
||||||
QVideoFrame frame;
|
QVideoFrame frame;
|
||||||
{
|
{
|
||||||
@@ -273,4 +273,4 @@ void AVFVideoRendererControl::handleViewfinderFrame()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "moc_avfvideorenderercontrol.cpp"
|
#include "moc_avfcamerarenderercontrol.cpp"
|
||||||
@@ -46,11 +46,11 @@ class AVFCameraInfoControl;
|
|||||||
class AVFCameraMetaDataControl;
|
class AVFCameraMetaDataControl;
|
||||||
class AVFVideoWindowControl;
|
class AVFVideoWindowControl;
|
||||||
class AVFVideoWidgetControl;
|
class AVFVideoWidgetControl;
|
||||||
class AVFVideoRendererControl;
|
class AVFCameraRendererControl;
|
||||||
class AVFMediaRecorderControl;
|
class AVFMediaRecorderControl;
|
||||||
class AVFImageCaptureControl;
|
class AVFImageCaptureControl;
|
||||||
class AVFCameraSession;
|
class AVFCameraSession;
|
||||||
class AVFVideoDeviceControl;
|
class AVFCameraDeviceControl;
|
||||||
class AVFAudioInputSelectorControl;
|
class AVFAudioInputSelectorControl;
|
||||||
|
|
||||||
class AVFCameraService : public QMediaService
|
class AVFCameraService : public QMediaService
|
||||||
@@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
AVFCameraSession *session() const { return m_session; }
|
AVFCameraSession *session() const { return m_session; }
|
||||||
AVFCameraControl *cameraControl() const { return m_cameraControl; }
|
AVFCameraControl *cameraControl() const { return m_cameraControl; }
|
||||||
AVFVideoDeviceControl *videoDeviceControl() const { return m_videoDeviceControl; }
|
AVFCameraDeviceControl *videoDeviceControl() const { return m_videoDeviceControl; }
|
||||||
AVFAudioInputSelectorControl *audioInputSelectorControl() const { return m_audioInputSelectorControl; }
|
AVFAudioInputSelectorControl *audioInputSelectorControl() const { return m_audioInputSelectorControl; }
|
||||||
AVFCameraMetaDataControl *metaDataControl() const { return m_metaDataControl; }
|
AVFCameraMetaDataControl *metaDataControl() const { return m_metaDataControl; }
|
||||||
AVFMediaRecorderControl *recorderControl() const { return m_recorderControl; }
|
AVFMediaRecorderControl *recorderControl() const { return m_recorderControl; }
|
||||||
@@ -76,9 +76,9 @@ private:
|
|||||||
AVFCameraSession *m_session;
|
AVFCameraSession *m_session;
|
||||||
AVFCameraControl *m_cameraControl;
|
AVFCameraControl *m_cameraControl;
|
||||||
AVFCameraInfoControl *m_cameraInfoControl;
|
AVFCameraInfoControl *m_cameraInfoControl;
|
||||||
AVFVideoDeviceControl *m_videoDeviceControl;
|
AVFCameraDeviceControl *m_videoDeviceControl;
|
||||||
AVFAudioInputSelectorControl *m_audioInputSelectorControl;
|
AVFAudioInputSelectorControl *m_audioInputSelectorControl;
|
||||||
AVFVideoRendererControl *m_videoOutput;
|
AVFCameraRendererControl *m_videoOutput;
|
||||||
AVFCameraMetaDataControl *m_metaDataControl;
|
AVFCameraMetaDataControl *m_metaDataControl;
|
||||||
AVFMediaRecorderControl *m_recorderControl;
|
AVFMediaRecorderControl *m_recorderControl;
|
||||||
AVFImageCaptureControl *m_imageCaptureControl;
|
AVFImageCaptureControl *m_imageCaptureControl;
|
||||||
|
|||||||
@@ -46,12 +46,12 @@
|
|||||||
#include "avfcameracontrol.h"
|
#include "avfcameracontrol.h"
|
||||||
#include "avfcamerainfocontrol.h"
|
#include "avfcamerainfocontrol.h"
|
||||||
#include "avfcamerasession.h"
|
#include "avfcamerasession.h"
|
||||||
#include "avfvideodevicecontrol.h"
|
#include "avfcameradevicecontrol.h"
|
||||||
#include "avfaudioinputselectorcontrol.h"
|
#include "avfaudioinputselectorcontrol.h"
|
||||||
#include "avfcamerametadatacontrol.h"
|
#include "avfcamerametadatacontrol.h"
|
||||||
#include "avfmediarecordercontrol.h"
|
#include "avfmediarecordercontrol.h"
|
||||||
#include "avfimagecapturecontrol.h"
|
#include "avfimagecapturecontrol.h"
|
||||||
#include "avfvideorenderercontrol.h"
|
#include "avfcamerarenderercontrol.h"
|
||||||
#include "avfmediarecordercontrol.h"
|
#include "avfmediarecordercontrol.h"
|
||||||
#include "avfimagecapturecontrol.h"
|
#include "avfimagecapturecontrol.h"
|
||||||
#include "avfmediavideoprobecontrol.h"
|
#include "avfmediavideoprobecontrol.h"
|
||||||
@@ -68,7 +68,7 @@ AVFCameraService::AVFCameraService(QObject *parent):
|
|||||||
m_session = new AVFCameraSession(this);
|
m_session = new AVFCameraSession(this);
|
||||||
m_cameraControl = new AVFCameraControl(this);
|
m_cameraControl = new AVFCameraControl(this);
|
||||||
m_cameraInfoControl = new AVFCameraInfoControl(this);
|
m_cameraInfoControl = new AVFCameraInfoControl(this);
|
||||||
m_videoDeviceControl = new AVFVideoDeviceControl(this);
|
m_videoDeviceControl = new AVFCameraDeviceControl(this);
|
||||||
m_audioInputSelectorControl = new AVFAudioInputSelectorControl(this);
|
m_audioInputSelectorControl = new AVFAudioInputSelectorControl(this);
|
||||||
|
|
||||||
m_metaDataControl = new AVFCameraMetaDataControl(this);
|
m_metaDataControl = new AVFCameraMetaDataControl(this);
|
||||||
@@ -128,7 +128,7 @@ QMediaControl *AVFCameraService::requestControl(const char *name)
|
|||||||
}
|
}
|
||||||
if (!m_videoOutput) {
|
if (!m_videoOutput) {
|
||||||
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
|
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
|
||||||
m_videoOutput = new AVFVideoRendererControl(this);
|
m_videoOutput = new AVFCameraRendererControl(this);
|
||||||
|
|
||||||
if (m_videoOutput) {
|
if (m_videoOutput) {
|
||||||
m_session->setVideoOutput(m_videoOutput);
|
m_session->setVideoOutput(m_videoOutput);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class AVFCameraControl;
|
class AVFCameraControl;
|
||||||
class AVFCameraService;
|
class AVFCameraService;
|
||||||
class AVFVideoRendererControl;
|
class AVFCameraRendererControl;
|
||||||
class AVFMediaVideoProbeControl;
|
class AVFMediaVideoProbeControl;
|
||||||
|
|
||||||
struct AVFCameraInfo
|
struct AVFCameraInfo
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
static const QList<QByteArray> &availableCameraDevices();
|
static const QList<QByteArray> &availableCameraDevices();
|
||||||
static AVFCameraInfo cameraDeviceInfo(const QByteArray &device);
|
static AVFCameraInfo cameraDeviceInfo(const QByteArray &device);
|
||||||
|
|
||||||
void setVideoOutput(AVFVideoRendererControl *output);
|
void setVideoOutput(AVFCameraRendererControl *output);
|
||||||
AVCaptureSession *captureSession() const { return m_captureSession; }
|
AVCaptureSession *captureSession() const { return m_captureSession; }
|
||||||
AVCaptureDevice *videoCaptureDevice() const;
|
AVCaptureDevice *videoCaptureDevice() const;
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ private:
|
|||||||
static QMap<QByteArray, AVFCameraInfo> m_cameraInfo;
|
static QMap<QByteArray, AVFCameraInfo> m_cameraInfo;
|
||||||
|
|
||||||
AVFCameraService *m_service;
|
AVFCameraService *m_service;
|
||||||
AVFVideoRendererControl *m_videoOutput;
|
AVFCameraRendererControl *m_videoOutput;
|
||||||
|
|
||||||
QCamera::State m_state;
|
QCamera::State m_state;
|
||||||
bool m_active;
|
bool m_active;
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
#include "avfcamerasession.h"
|
#include "avfcamerasession.h"
|
||||||
#include "avfcameraservice.h"
|
#include "avfcameraservice.h"
|
||||||
#include "avfcameracontrol.h"
|
#include "avfcameracontrol.h"
|
||||||
#include "avfvideorenderercontrol.h"
|
#include "avfcamerarenderercontrol.h"
|
||||||
#include "avfvideodevicecontrol.h"
|
#include "avfcameradevicecontrol.h"
|
||||||
#include "avfaudioinputselectorcontrol.h"
|
#include "avfaudioinputselectorcontrol.h"
|
||||||
#include "avfmediavideoprobecontrol.h"
|
#include "avfmediavideoprobecontrol.h"
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ void AVFCameraSession::updateCameraDevices()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVFCameraSession::setVideoOutput(AVFVideoRendererControl *output)
|
void AVFCameraSession::setVideoOutput(AVFCameraRendererControl *output)
|
||||||
{
|
{
|
||||||
m_videoOutput = output;
|
m_videoOutput = output;
|
||||||
if (output)
|
if (output)
|
||||||
|
|||||||
@@ -25,30 +25,32 @@ HEADERS += \
|
|||||||
avfcameradebug.h \
|
avfcameradebug.h \
|
||||||
avfcameraserviceplugin.h \
|
avfcameraserviceplugin.h \
|
||||||
avfcameracontrol.h \
|
avfcameracontrol.h \
|
||||||
avfvideorenderercontrol.h \
|
|
||||||
avfcamerametadatacontrol.h \
|
avfcamerametadatacontrol.h \
|
||||||
avfimagecapturecontrol.h \
|
avfimagecapturecontrol.h \
|
||||||
avfmediarecordercontrol.h \
|
avfmediarecordercontrol.h \
|
||||||
avfcameraservice.h \
|
avfcameraservice.h \
|
||||||
avfcamerasession.h \
|
avfcamerasession.h \
|
||||||
avfstoragelocation.h \
|
avfstoragelocation.h \
|
||||||
avfvideodevicecontrol.h \
|
|
||||||
avfaudioinputselectorcontrol.h \
|
avfaudioinputselectorcontrol.h \
|
||||||
avfcamerainfocontrol.h \
|
avfcamerainfocontrol.h \
|
||||||
avfmediavideoprobecontrol.h
|
avfmediavideoprobecontrol.h \
|
||||||
|
avfcamerainfocontrol.h \
|
||||||
|
avfcamerarenderercontrol.h \
|
||||||
|
avfcameradevicecontrol.h
|
||||||
|
|
||||||
OBJECTIVE_SOURCES += \
|
OBJECTIVE_SOURCES += \
|
||||||
avfcameraserviceplugin.mm \
|
avfcameraserviceplugin.mm \
|
||||||
avfcameracontrol.mm \
|
avfcameracontrol.mm \
|
||||||
avfvideorenderercontrol.mm \
|
|
||||||
avfcamerametadatacontrol.mm \
|
avfcamerametadatacontrol.mm \
|
||||||
avfimagecapturecontrol.mm \
|
avfimagecapturecontrol.mm \
|
||||||
avfmediarecordercontrol.mm \
|
avfmediarecordercontrol.mm \
|
||||||
avfcameraservice.mm \
|
avfcameraservice.mm \
|
||||||
avfcamerasession.mm \
|
avfcamerasession.mm \
|
||||||
avfstoragelocation.mm \
|
avfstoragelocation.mm \
|
||||||
avfvideodevicecontrol.mm \
|
|
||||||
avfaudioinputselectorcontrol.mm \
|
avfaudioinputselectorcontrol.mm \
|
||||||
avfcamerainfocontrol.mm \
|
avfcamerainfocontrol.mm \
|
||||||
avfmediavideoprobecontrol.mm
|
avfmediavideoprobecontrol.mm \
|
||||||
|
avfcamerainfocontrol.mm \
|
||||||
|
avfcameradevicecontrol.mm \
|
||||||
|
avfcamerarenderercontrol.mm
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user