GStreamerVideoSource QML Type
A video source backed by a custom GStreamer bin. More...
| Import Statement: | import QtMultimedia |
| In C++: | QGStreamerVideoSource |
Properties
- active : bool
- gstBinDescription : string
Methods
Detailed Description
Construct the video source from a GStreamer bin description and attach it to CaptureSession using its nativeVideoSource property.
For any standard case, we recommend using Camera instead of this type, unless you need GStreamer-specific configuration to handle any custom video source.
By default, the type is available only in meta-qt6 builds. In custom builds with GStreamer support, the gstreamer_qt_api feature can enable it.
QtMultimedia must be run with the gstreamer media backend for this class to work.
Item {
CaptureSession {
nativeVideoSource: GStreamerVideoSource {
gstElementDescription: "videotestsrc name=testsrc"
active: true
}
videoOutput: preview
}
VideoOutput {
id: preview
}
}See also CaptureSession and Camera.
Property Documentation
active : bool
Describes whether the video source is currently active.
If the video source has been connected to a CaptureSession, this property indicates whether the underlying GstElement is attached to the GstPipeline within the media capture session.
gstBinDescription : string [read-only]
Describes the GStreamer bin description associated with the video source.
In QML, this property is required.
The GStreamer backend interprets the description and creates a bin, that can act as a video source for a capture session.
See GStreamer documentation for the syntax of the description string.
If the specified description is invalid, preventing a bin from being created, the constructed GStreamerVideoSource is non-functional, and the property returns an empty string.
Note: GStreamerVideoSource doesn't perform any additional validation of the provided bin description, so if the created GstBin doesn't represent a video input for GstPipeline, GStreamerVideoSource and the associated CaptureSession may misbehave.
Method Documentation
void start()
Starts the video source.
Same as setting the active property to true.
void stop()
Stops the video source.
Same as setting the active property to false.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.