Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qplatformmediacapture_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QPLATFORMMEDIACAPTURE_H
4#define QPLATFORMMEDIACAPTURE_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qtmultimediaglobal_p.h>
18#include <QtCore/qobject.h>
19
21class QPlatformCamera;
24class QAudioDevice;
25class QCameraDevice;
26class QVideoSink;
32
33class Q_MULTIMEDIA_EXPORT QPlatformMediaCaptureSession : public QObject
34{
36public:
39
40 void setCaptureSession(QMediaCaptureSession *session) { m_session = session; }
42
43 virtual QPlatformCamera *camera() = 0;
44 virtual void setCamera(QPlatformCamera *) {}
45
46 virtual QPlatformSurfaceCapture *screenCapture() { return nullptr; }
48
49 virtual QPlatformSurfaceCapture *windowCapture() { return nullptr; }
51
54
57
59
60 virtual void setVideoPreview(QVideoSink * /*sink*/) {}
61
63
64 // TBD: implement ordering of the sources basing on the order of adding
65 std::vector<QPlatformVideoSource *> activeVideoSources();
66
67 virtual void *nativePipeline() { return nullptr; }
68
69 // private API, the purpose is getting GstPipeline
70 static void *nativePipeline(QMediaCaptureSession *);
71
78
79private:
81};
82
84
85
86#endif // QPLATFORMMEDIAINTERFACE_H
AVFCameraSession * m_session
The QAudioDevice class provides an information about audio devices and their functionality.
The QCameraDevice class provides general information about camera devices.
The QMediaCaptureSession class allows capturing of audio and video content.
\inmodule QtCore
Definition qobject.h:103
virtual void setVideoPreview(QVideoSink *)
virtual void setImageCapture(QPlatformImageCapture *)
virtual QPlatformImageCapture * imageCapture()=0
virtual QPlatformSurfaceCapture * screenCapture()
virtual void setAudioInput(QPlatformAudioInput *input)=0
virtual void setWindowCapture(QPlatformSurfaceCapture *)
virtual QPlatformCamera * camera()=0
~QPlatformMediaCaptureSession() override
virtual void setCamera(QPlatformCamera *)
QMediaCaptureSession * captureSession() const
virtual QPlatformSurfaceCapture * windowCapture()
virtual QPlatformMediaRecorder * mediaRecorder()=0
virtual void setAudioOutput(QPlatformAudioOutput *)
void setCaptureSession(QMediaCaptureSession *session)
virtual void setScreenCapture(QPlatformSurfaceCapture *)
virtual void setMediaRecorder(QPlatformMediaRecorder *)
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
Combined button and popup list for selecting options.
GLenum GLenum GLenum input
#define Q_OBJECT
#define Q_SIGNALS