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
qgstreamervideosource.h
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
#
ifndef
QGSTREAMERVIDEOSOURCE_H
5
#
define
QGSTREAMERVIDEOSOURCE_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is part of the QtMM semi-private API (SPI), with limited compatibility guarantees.
12
// Usage of this API may make your code source and binary incompatible with future versions of Qt.
13
//
14
15
#
include
<
QtCore
/
qobject
.
h
>
16
#
include
<
QtCore
/
qstring
.
h
>
17
#
include
<
QtMultimedia
/
qtmultimediaglobal
.
h
>
18
19
// NOLINTBEGIN (bugprone-reserved-identifier)
20
typedef
struct
_GstElement GstElement;
21
// NOLINTEND (bugprone-reserved-identifier)
22
23
QT_BEGIN_NAMESPACE
24
25
class
QPlatformCamera;
26
class
QGStreamerVideoSourcePrivate
;
27
class
QMediaCaptureSession
;
28
29
class
Q_MULTIMEDIA_EXPORT
QGStreamerVideoSource
:
public
QObject
30
{
31
Q_OBJECT
32
Q_PROPERTY(
bool
active READ isActive WRITE setActive NOTIFY activeChanged)
33
Q_PROPERTY(QString gstBinDescription READ gstBinDescription CONSTANT)
34
35
public
:
36
explicit
QGStreamerVideoSource(
const
QString &gstBinDescription, QObject *parent =
nullptr
);
37
explicit
QGStreamerVideoSource(GstElement *gstElement, QObject *parent =
nullptr
);
38
~QGStreamerVideoSource() override;
39
40
bool
isActive()
const
;
41
QString gstBinDescription()
const
;
42
GstElement *gstElement()
const
;
43
QMediaCaptureSession *captureSession()
const
;
44
45
public
Q_SLOTS:
46
void
setActive(
bool
active);
47
void
start() { setActive(
true
); }
48
void
stop() { setActive(
false
); }
49
50
Q_SIGNALS:
51
void
activeChanged(
bool
active);
52
53
protected
:
54
explicit
QGStreamerVideoSource(QObject *parent);
55
56
private
:
57
QPlatformCamera *platformVideoSource()
const
;
58
59
void
setCaptureSession(QMediaCaptureSession *session);
60
61
private
:
62
Q_DISABLE_COPY_MOVE(QGStreamerVideoSource)
63
Q_DECLARE_PRIVATE(QGStreamerVideoSource)
64
friend
class
QMediaCaptureSession;
65
};
66
67
QT_END_NAMESPACE
68
69
#
endif
// QGSTREAMERVIDEOSOURCE_H
QGStreamerVideoSourcePrivate
Definition
qgstreamervideosource_p.h:33
QGStreamerVideoSource
The QGStreamerVideoSource class provides a video source backed by a custom GStreamer element.
Definition
qgstreamervideosource.h:30
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QMediaCaptureSession::ObjectTraits< QCamera >
\qmltype CaptureSession
Definition
qmediacapturesession.cpp:133
qtmultimedia
src
multimedia
spi
qgstreamervideosource.h
Generated on
for Qt by
1.18.0