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
qquickgstreamervideosource.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
"qquickgstreamervideosource_p.h"
5
6
#
include
<
QtMultimedia
/
private
/
qgstreamervideosource_p
.
h
>
7
8
#
include
<
QtCore
/
qdebug
.
h
>
9
10
QT_BEGIN_NAMESPACE
11
12
QQuickGStreamerVideoSource::QQuickGStreamerVideoSource(QObject *parent)
13
: QGStreamerVideoSource(parent)
14
{
15
}
16
17
bool
QQuickGStreamerVideoSource::qmlIsActive()
const
18
{
19
return
m_pendingProperties ? m_pendingProperties->active : isActive();
20
}
21
22
void
QQuickGStreamerVideoSource::qmlSetActive(
bool
active)
23
{
24
if
(!m_pendingProperties)
25
QGStreamerVideoSource::setActive(active);
26
else
if
(std::exchange(m_pendingProperties->active, active) != active)
27
Q_EMIT activeChanged(active);
28
}
29
30
void
QQuickGStreamerVideoSource::setQmlGstBinDescription(QString gstBinDescription)
31
{
32
if
(!m_pendingProperties) {
33
// TODO: maybe handle exotic case when the required property is
34
// set more then once during component's initialization.
35
qWarning() <<
"GstBin's description must be set only once"
;
36
return
;
37
}
38
39
auto
properties = std::move(m_pendingProperties);
40
41
auto
*sourcePrivate = QGStreamerVideoSourcePrivate::get(
this
);
42
sourcePrivate->createPlatformCamera(
this
, std::move(gstBinDescription), properties->active);
43
}
44
45
QT_END_NAMESPACE
46
47
#
include
"moc_qquickgstreamervideosource_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
multimediaquick
qquickgstreamervideosource.cpp
Generated on
for Qt by
1.18.0