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_P_H
4#define GSTREAMERINTERFACE_P_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/private/qplatformmediaintegration_p.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;
28
29class Q_MULTIMEDIA_EXPORT QGStreamerInterface
30{
31public:
32 virtual ~QGStreamerInterface();
33
34 static QGStreamerInterface *instance();
35
36 QT_DEPRECATED_X("Use QGStreamerVideoSource and QMediaCaptureSession::setNativeVideoSource() instead.")
37 virtual QCamera *makeCustomGStreamerCamera(const QByteArray &gstBinDescription, QObject *parent) = 0;
38
39 QT_DEPRECATED_X("Use QGStreamerVideoSource and QMediaCaptureSession::setNativeVideoSource() instead.")
40 virtual QCamera *makeCustomGStreamerCamera(GstElement *element, QObject *parent) = 0;
41
42 virtual QAudioDevice makeCustomGStreamerAudioInput(const QByteArray &gstreamerPipeline) = 0;
43 virtual QAudioDevice makeCustomGStreamerAudioOutput(const QByteArray &gstreamerPipeline) = 0;
44
45 virtual GstPipeline *gstPipeline(QMediaPlayer *) = 0;
46 virtual GstPipeline *gstPipeline(QMediaCaptureSession *) = 0;
47
48 // does not transfer ownership
49 virtual GstBuffer *gstBuffer(const QVideoFrame &frame) = 0;
50
51 // NOTE: Ownership of GstBuffer is not transferred
52 virtual QVideoFrame createFrameFromGstBuffer(GstBuffer *buffer,
53 const GstVideoInfo &videoInfo) = 0;
54 virtual QVideoFrame createFrameFromGstBuffer(GstBuffer *buffer,
55 const GstVideoInfoDmaDrm &videoInfo) = 0;
56};
57
58using QGStreamerPlatformSpecificInterface = QGStreamerInterface;
59
60QT_END_NAMESPACE
61
62#endif // GSTREAMERINTERFACE_P_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