4#ifndef AVFCAMERARENDERER_H
5#define AVFCAMERARENDERER_H
18#include <QtCore/qobject.h>
19#include <QtMultimedia/qvideoframe.h>
20#include <QtCore/qmutex.h>
21#include <avfvideosink_p.h>
22#include <private/qvideooutputorientationhandler_p.h>
24#include <CoreVideo/CVBase.h>
25#include <CoreVideo/CVPixelBuffer.h>
26#include <CoreVideo/CVImageBuffer.h>
28#include <CoreVideo/CVOpenGLESTexture.h>
29#include <CoreVideo/CVOpenGLESTextureCache.h>
32#include <dispatch/dispatch.h>
39class AVFCameraSession;
63 QVideoFrameFormat::ColorRange colorRange);
70 void updateCaptureConnection();
75 AVFCaptureFramesDelegate *m_viewfinderFramesDelegate =
nullptr;
77 AVCaptureVideoDataOutput *m_videoDataOutput =
nullptr;
79 bool m_needsHorizontalMirroring =
false;
85 QVideoFrame m_lastViewfinderFrame;
87 dispatch_queue_t m_delegateQueue;
88 QVideoOutputOrientationHandler m_orientationHandler;
90 friend class CVImageVideoBuffer;
Q_FORWARD_DECLARE_OBJC_CLASS(AVCaptureVideoDataOutput)
Q_FORWARD_DECLARE_OBJC_CLASS(AVFCaptureFramesDelegate)
void reconfigure() override
void syncHandleViewfinderFrame(const QVideoFrame &frame)
AVCaptureVideoDataOutput * videoDataOutput() const
void setOutputSettings() override
~AVFCameraRenderer() override
AVFCaptureFramesDelegate * captureDelegate() const
void configureAVCaptureSession(AVFCameraSession *cameraSession)
void setPixelFormat(QVideoFrameFormat::PixelFormat pixelFormat, QVideoFrameFormat::ColorRange colorRange)
void resetCaptureDelegate() const
AVFMediaEncoder * recorderControl() const
QPlatformAudioOutput * audioOutput()
void setAudioInput(QPlatformAudioInput *) override
AVFCamera * avfCameraControl() const
void audioOutputDestroyed()
AVFCameraSession * session() const
void setImageCapture(QPlatformImageCapture *imageCapture) override
void setAudioOutputMuted(bool muted)
QPlatformMediaRecorder * mediaRecorder() override
void setAudioOutput(QPlatformAudioOutput *) override
void audioOutputChanged()
void setVideoPreview(QVideoSink *sink) override
void setCamera(QPlatformCamera *camera) override
AVFImageCapture * avfImageCaptureControl() const
void setMediaRecorder(QPlatformMediaRecorder *recorder) override
void setAudioInputMuted(bool muted)
~AVFCameraService() override
void setAudioOutputVolume(float volume)
QPlatformImageCapture * imageCapture() override
QPlatformCamera * camera() override
QPlatformAudioInput * audioInput()
void setAudioInputVolume(float volume)
void onCameraDeviceChanged(const QCameraDevice &device) override
void onActiveChanged(bool active) override
void setCaptureSession(QPlatformMediaCaptureSession *) override
bool tryApplyCameraFormat(const QCameraFormat &) override
The QCamera class provides interface for system camera devices.
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject)