Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgstreamerinterface.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#ifndef GSTREAMERINTERFACE_H
4#define GSTREAMERINTERFACE_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is part of the QtMM semi-private API (SPI), with limited compatibility guarantees.
11// Usage of this API may make your code source and binary incompatible with future versions of Qt.
12//
13
14#include <QtMultimedia/qvideoframe.h>
15
16// NOLINTBEGIN (bugprone-reserved-identifier)
17typedef struct _GstPipeline GstPipeline;
18typedef struct _GstElement GstElement;
19typedef struct _GstBuffer GstBuffer;
20typedef struct _GstVideoInfo GstVideoInfo;
21typedef struct _GstVideoInfoDmaDrm GstVideoInfoDmaDrm;
22// NOLINTEND (bugprone-reserved-identifier)
23
24QT_BEGIN_NAMESPACE
25
26class QAudioDevice;
27class QCamera;
28class QMediaPlayer;
30class QObject;
31
32class Q_MULTIMEDIA_EXPORT QGStreamerInterface
33{
34public:
35 virtual ~QGStreamerInterface();
36
37 static QGStreamerInterface *instance();
38
39 QT_DEPRECATED_X("Use QGStreamerVideoSource and QMediaCaptureSession::setNativeVideoSource() instead.")
40 virtual QCamera *makeCustomGStreamerCamera(const QByteArray &gstBinDescription, QObject *parent) = 0;
41
42 QT_DEPRECATED_X("Use QGStreamerVideoSource and QMediaCaptureSession::setNativeVideoSource() instead.")
43 virtual QCamera *makeCustomGStreamerCamera(GstElement *element, QObject *parent) = 0;
44
45 virtual QAudioDevice makeCustomGStreamerAudioInput(const QByteArray &gstreamerPipeline) = 0;
46 virtual QAudioDevice makeCustomGStreamerAudioOutput(const QByteArray &gstreamerPipeline) = 0;
47
48 virtual GstPipeline *gstPipeline(QMediaPlayer *) = 0;
49 virtual GstPipeline *gstPipeline(QMediaCaptureSession *) = 0;
50
51 // does not transfer ownership
52 virtual GstBuffer *gstBuffer(const QVideoFrame &frame) = 0;
53
54 // NOTE: Ownership of GstBuffer is not transferred
55 virtual QVideoFrame createFrameFromGstBuffer(GstBuffer *buffer,
56 const GstVideoInfo &videoInfo) = 0;
57 virtual QVideoFrame createFrameFromGstBuffer(GstBuffer *buffer,
58 const GstVideoInfoDmaDrm &videoInfo) = 0;
59};
60
61using QGStreamerPlatformSpecificInterface = QGStreamerInterface;
62
63QT_END_NAMESPACE
64
65#endif // GSTREAMERINTERFACE_H
Provides GStreamer-specific integration points for Qt Multimedia.
Combined button and popup list for selecting options.
struct _GstPipeline GstPipeline
struct _GstVideoInfo GstVideoInfo
struct _GstVideoInfoDmaDrm GstVideoInfoDmaDrm
struct _GstBuffer GstBuffer