Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qohosmediacapturesession.cpp
Go to the documentation of this file.
1
// Copyright (C) 2026 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
#
include
"qohosmediacapturesession_p.h"
5
6
#
include
"qohoscamera_p.h"
7
#
include
"qohoscamerasession_p.h"
8
#
include
"qohosimagecapture_p.h"
9
#
include
"qohosmediarecorder_p.h"
10
11
QT_BEGIN_NAMESPACE
12
13
QOhosMediaCaptureSession::QOhosMediaCaptureSession() =
default
;
14
15
QOhosMediaCaptureSession
::~
QOhosMediaCaptureSession
() =
default
;
16
17
QPlatformCamera
*
QOhosMediaCaptureSession
::
camera
()
18
{
19
return
m_camera;
20
}
21
22
void
QOhosMediaCaptureSession
::
setCamera
(QPlatformCamera *camera)
23
{
24
m_camera =
static_cast
<QOhosCamera *>(camera);
25
if
(m_camera)
26
m_camera->setCaptureSession(
this
);
27
if
(m_imageCapture)
28
m_imageCapture->setCaptureSession(
this
);
29
if
(m_recorder)
30
m_recorder->setCaptureSession(
this
);
31
Q_EMIT cameraChanged();
32
}
33
34
QOhosCameraSession
*
QOhosMediaCaptureSession
::
cameraSession
()
const
35
{
36
return
m_camera ? m_camera->session() :
nullptr
;
37
}
38
39
QPlatformImageCapture
*
QOhosMediaCaptureSession
::
imageCapture
()
40
{
41
return
m_imageCapture;
42
}
43
44
void
QOhosMediaCaptureSession
::
setImageCapture
(QPlatformImageCapture *imageCapture)
45
{
46
if
(m_imageCapture == imageCapture)
47
return
;
48
if
(m_imageCapture)
49
m_imageCapture->setCaptureSession(
nullptr
);
50
m_imageCapture =
static_cast
<QOhosImageCapture *>(imageCapture);
51
if
(m_imageCapture)
52
m_imageCapture->setCaptureSession(
this
);
53
Q_EMIT imageCaptureChanged();
54
}
55
56
QPlatformMediaRecorder
*
QOhosMediaCaptureSession
::
mediaRecorder
()
57
{
58
return
m_recorder;
59
}
60
61
void
QOhosMediaCaptureSession
::
setMediaRecorder
(QPlatformMediaRecorder *recorder)
62
{
63
if
(m_recorder == recorder)
64
return
;
65
if
(m_recorder)
66
m_recorder->setCaptureSession(
nullptr
);
67
m_recorder =
static_cast
<QOhosMediaRecorder *>(recorder);
68
if
(m_recorder)
69
m_recorder->setCaptureSession(
this
);
70
Q_EMIT encoderChanged();
71
}
72
73
void
QOhosMediaCaptureSession
::
setAudioInput
(QPlatformAudioInput *input)
74
{
75
m_audioInput = input;
76
}
77
78
void
QOhosMediaCaptureSession
::
setAudioOutput
(QPlatformAudioOutput *output)
79
{
80
m_audioOutput = output;
81
}
82
83
void
QOhosMediaCaptureSession
::
setVideoPreview
(QVideoSink *sink)
84
{
85
if
(m_videoSink == sink)
86
return
;
87
m_videoSink = sink;
88
if
(m_camera)
89
m_camera->setCaptureSession(
this
);
90
}
91
92
QT_END_NAMESPACE
93
94
#
include
"moc_qohosmediacapturesession_p.cpp"
QOhosCameraSession
Definition
qohoscamerasession_p.h:51
QOhosMediaCaptureSession
Definition
qohosmediacapturesession_p.h:30
QOhosMediaCaptureSession::setCamera
void setCamera(QPlatformCamera *camera) override
Definition
qohosmediacapturesession.cpp:22
QOhosMediaCaptureSession::setAudioInput
void setAudioInput(QPlatformAudioInput *input) override
Definition
qohosmediacapturesession.cpp:73
QOhosMediaCaptureSession::setImageCapture
void setImageCapture(QPlatformImageCapture *imageCapture) override
Definition
qohosmediacapturesession.cpp:44
QOhosMediaCaptureSession::setVideoPreview
void setVideoPreview(QVideoSink *sink) override
Definition
qohosmediacapturesession.cpp:83
QOhosMediaCaptureSession::camera
QPlatformCamera * camera() override
Definition
qohosmediacapturesession.cpp:17
QOhosMediaCaptureSession::setAudioOutput
void setAudioOutput(QPlatformAudioOutput *output) override
Definition
qohosmediacapturesession.cpp:78
QOhosMediaCaptureSession::setMediaRecorder
void setMediaRecorder(QPlatformMediaRecorder *recorder) override
Definition
qohosmediacapturesession.cpp:61
QOhosMediaCaptureSession::cameraSession
QOhosCameraSession * cameraSession() const
Definition
qohosmediacapturesession.cpp:34
QOhosMediaCaptureSession::mediaRecorder
QPlatformMediaRecorder * mediaRecorder() override
Definition
qohosmediacapturesession.cpp:56
QOhosMediaCaptureSession::imageCapture
QPlatformImageCapture * imageCapture() override
Definition
qohosmediacapturesession.cpp:39
QOhosMediaCaptureSession::~QOhosMediaCaptureSession
~QOhosMediaCaptureSession() override
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
plugins
multimedia
ohos
mediacapture
qohosmediacapturesession.cpp
Generated on
for Qt by
1.18.0