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
qmediacapturesession.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#ifndef QMEDIACAPTURESESSION_H
5#define QMEDIACAPTURESESSION_H
6
7#include <QtCore/qobject.h>
8#include <QtMultimedia/qtmultimediaglobal.h>
9
11
12class QCamera;
13class QAudioInput;
14class QAudioOutput;
15class QCameraDevice;
16class QImageCapture;
17class QMediaRecorder;
19class QVideoSink;
20class QScreenCapture;
21class QWindowCapture;
22
24class Q_MULTIMEDIA_EXPORT QMediaCaptureSession : public QObject
25{
27 Q_PROPERTY(QAudioInput *audioInput READ audioInput WRITE setAudioInput NOTIFY audioInputChanged)
28 Q_PROPERTY(QAudioOutput *audioOutput READ audioOutput WRITE setAudioOutput NOTIFY audioOutputChanged)
29 Q_PROPERTY(QCamera *camera READ camera WRITE setCamera NOTIFY cameraChanged)
31 QScreenCapture *screenCapture READ screenCapture WRITE setScreenCapture NOTIFY screenCaptureChanged)
33 QWindowCapture *windowCapture READ windowCapture WRITE setWindowCapture NOTIFY windowCaptureChanged)
34 Q_PROPERTY(QImageCapture *imageCapture READ imageCapture WRITE setImageCapture NOTIFY imageCaptureChanged)
35 Q_PROPERTY(QMediaRecorder *recorder READ recorder WRITE setRecorder NOTIFY recorderChanged)
36 Q_PROPERTY(QObject *videoOutput READ videoOutput WRITE setVideoOutput NOTIFY videoOutputChanged)
37public:
38 explicit QMediaCaptureSession(QObject *parent = nullptr);
40
41 QAudioInput *audioInput() const;
42 void setAudioInput(QAudioInput *input);
43
44 QCamera *camera() const;
45 void setCamera(QCamera *camera);
46
48 void setImageCapture(QImageCapture *imageCapture);
49
50 QScreenCapture *screenCapture();
51 void setScreenCapture(QScreenCapture *screenCapture);
52
53 QWindowCapture *windowCapture();
54 void setWindowCapture(QWindowCapture *windowCapture);
55
57 void setRecorder(QMediaRecorder *recorder);
58
59 void setVideoOutput(QObject *output);
60 QObject *videoOutput() const;
61
62 void setVideoSink(QVideoSink *sink);
63 QVideoSink *videoSink() const;
64
65 void setAudioOutput(QAudioOutput *output);
66 QAudioOutput *audioOutput() const;
67
68 QPlatformMediaCaptureSession *platformSession() const;
69
71 void audioInputChanged();
72 void cameraChanged();
73 void screenCaptureChanged();
74 void windowCaptureChanged();
75 void imageCaptureChanged();
76 void recorderChanged();
77 void videoOutputChanged();
78 void audioOutputChanged();
79
82
84 Q_DISABLE_COPY(QMediaCaptureSession)
85 Q_DECLARE_PRIVATE(QMediaCaptureSession)
86};
87
89
90#endif // QMEDIACAPTURESESSION_H
\qmltype AudioInput \instantiates QAudioInput
Definition qaudioinput.h:19
\qmltype AudioOutput \instantiates QAudioOutput
The QCameraDevice class provides general information about camera devices.
The QCamera class provides interface for system camera devices.
Definition qcamera.h:28
\inmodule QtMultimedia
The QMediaCaptureSession class allows capturing of audio and video content.
\inmodule QtMultimedia
\inmodule QtCore
Definition qobject.h:103
\inmodule QtMultimedia
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
\inmodule QtMultimedia
QMediaRecorder * recorder
Definition camera.cpp:20
QCamera * camera
Definition camera.cpp:19
QImageCapture * imageCapture
Definition camera.cpp:21
Combined button and popup list for selecting options.
GLsizei GLenum GLboolean sink
GLenum GLenum GLenum input
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
QT_BEGIN_NAMESPACE typedef uchar * output
#define explicit