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
qffmpegmediacapturesession_p.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 QFFMPEGMEDIACAPTURESESSION_H
5#define QFFMPEGMEDIACAPTURESESSION_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qplatformmediacapture_p.h>
19#include <private/qplatformmediaintegration_p.h>
20#include "qpointer.h"
21#include "qiodevice.h"
22
24
27class QVideoFrame;
28class QAudioSink;
30class QAudioBuffer;
32
34{
36
37public:
38 using VideoSources = std::vector<QPointer<QPlatformVideoSource>>;
39
42
43 QPlatformCamera *camera() override;
44 void setCamera(QPlatformCamera *camera) override;
45
48
51
54
57
60
61 void setVideoPreview(QVideoSink *sink) override;
63
65
66private Q_SLOTS:
67 void updateAudioSink();
68 void updateVolume();
69 void updateVideoFrameConnection();
70 void updatePrimaryActiveVideoSource();
71
74
75private:
76 template<typename VideoSource>
77 bool setVideoSource(QPointer<VideoSource> &source, VideoSource *newSource);
78
79 QPointer<QPlatformCamera> m_camera;
80 QPointer<QPlatformSurfaceCapture> m_screenCapture;
81 QPointer<QPlatformSurfaceCapture> m_windowCapture;
82 QPointer<QPlatformVideoSource> m_primaryActiveVideoSource;
83
84 QFFmpegAudioInput *m_audioInput = nullptr;
85 QFFmpegImageCapture *m_imageCapture = nullptr;
86 QFFmpegMediaRecorder *m_mediaRecorder = nullptr;
87 QPlatformAudioOutput *m_audioOutput = nullptr;
88 QVideoSink *m_videoSink = nullptr;
89 std::unique_ptr<QAudioSink> m_audioSink;
90 QPointer<QIODevice> m_audioIODevice;
91 qsizetype m_audioBufferSize = 0;
92
93 QMetaObject::Connection m_videoFrameConnection;
94};
95
97
98#endif // QGSTREAMERCAPTURESERVICE_H
\inmodule QtMultimedia
The QAudioSink class provides an interface for sending audio data to an audio output device.
Definition qaudiosink.h:24
void setMediaRecorder(QPlatformMediaRecorder *recorder) override
void setVideoPreview(QVideoSink *sink) override
QPlatformSurfaceCapture * windowCapture() override
void setWindowCapture(QPlatformSurfaceCapture *) override
void setScreenCapture(QPlatformSurfaceCapture *) override
void setAudioInput(QPlatformAudioInput *input) override
void setImageCapture(QPlatformImageCapture *imageCapture) override
QPlatformSurfaceCapture * screenCapture() override
QPlatformImageCapture * imageCapture() override
QPlatformVideoSource * primaryActiveVideoSource()
void setCamera(QPlatformCamera *camera) override
QPlatformMediaRecorder * mediaRecorder() override
QPlatformCamera * camera() override
std::vector< QPointer< QPlatformVideoSource > > VideoSources
~QFFmpegMediaCaptureSession() override
void setAudioOutput(QPlatformAudioOutput *output) override
\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:27
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
QMediaRecorder * recorder
Definition camera.cpp:20
Combined button and popup list for selecting options.
GLsizei GLsizei GLchar * source
GLsizei GLenum GLboolean sink
GLenum GLenum GLenum input
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
ptrdiff_t qsizetype
Definition qtypes.h:165
QT_BEGIN_NAMESPACE typedef uchar * output