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
qgstreamer_platformspecificinterface_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 GSTREAMER_PLATFORMSPECIFICINTERFACE_P_H
4#define GSTREAMER_PLATFORMSPECIFICINTERFACE_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtMultimedia/private/qplatformmediaintegration_p.h>
18
19// NOLINTBEGIN (bugprone-reserved-identifier)
20typedef struct _GstPipeline GstPipeline;
21typedef struct _GstElement GstElement;
22typedef struct _GstBuffer GstBuffer;
23typedef struct _GstVideoInfo GstVideoInfo;
24typedef struct _GstVideoInfoDmaDrm GstVideoInfoDmaDrm;
25// NOLINTEND (bugprone-reserved-identifier)
26
27QT_BEGIN_NAMESPACE
28
29class QAudioDevice;
30
31class Q_MULTIMEDIA_EXPORT QGStreamerPlatformSpecificInterface
32 : public QAbstractPlatformSpecificInterface
33{
34public:
35 ~QGStreamerPlatformSpecificInterface() override;
36
37 static QGStreamerPlatformSpecificInterface *instance();
38
39 virtual QAudioDevice makeCustomGStreamerAudioInput(const QByteArray &gstreamerPipeline) = 0;
40 virtual QAudioDevice makeCustomGStreamerAudioOutput(const QByteArray &gstreamerPipeline) = 0;
41 virtual QCamera *makeCustomGStreamerCamera(const QByteArray &gstreamerPipeline,
42 QObject *parent) = 0;
43
44 // Note: ownership of GstElement is not transferred
45 virtual QCamera *makeCustomGStreamerCamera(GstElement *, QObject *parent) = 0;
46
47 virtual GstPipeline *gstPipeline(QMediaPlayer *) = 0;
48 virtual GstPipeline *gstPipeline(QMediaCaptureSession *) = 0;
49
50 virtual GstBuffer *getRawGstBuffer(QVideoFrame &) = 0; // does not transfer ownership
51
52 // NOTE: Ownership of GstBuffer is not transferred
53 virtual QVideoFrame createFrameFromGstBuffer(GstBuffer *buffer,
54 const GstVideoInfo &videoInfo) = 0;
55 virtual QVideoFrame createFrameFromGstBuffer(GstBuffer *buffer,
56 const GstVideoInfoDmaDrm &videoInfo) = 0;
57};
58
59QT_END_NAMESPACE
60
61#endif // GSTREAMER_PLATFORMSPECIFICINTERFACE_P_H
struct _GstPipeline GstPipeline
struct _GstVideoInfo GstVideoInfo
struct _GstElement GstElement
struct _GstVideoInfoDmaDrm GstVideoInfoDmaDrm
struct _GstBuffer GstBuffer