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
qgst_play_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
4#ifndef QGST_PLAY_P_H
5#define QGST_PLAY_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qglobal.h>
19#include <QtCore/qlocale.h>
20
21#include <QtMultimedia/private/qmultimediautils_p.h>
22
23#include "common/qgst_handle_types_p.h"
24
25#include <gst/play/gstplay.h>
26
28
29namespace QGstPlaySupport {
30
39
48
49VideoInfo parseGstPlayVideoInfo(const GstPlayVideoInfo *);
50
59
60AudioInfo parseGstPlayAudioInfo(const GstPlayAudioInfo *);
61
66
67SubtitleInfo parseGstPlaySubtitleInfo(const GstPlaySubtitleInfo *);
68
69template <typename T>
70constexpr bool isStreamType = std::is_same_v<std::decay_t<T>, GstPlayVideoInfo>
73
74int getStreamIndex(const GstPlayStreamInfo *);
75
76template <typename T, typename Enabler = std::enable_if_t<isStreamType<T>>>
77int getStreamIndex(const T *info)
78{
79 return getStreamIndex(GST_PLAY_STREAM_INFO(info));
80}
81
82} // namespace QGstPlaySupport
83
84QT_END_NAMESPACE
85
86#endif
AudioInfo parseGstPlayAudioInfo(const GstPlayAudioInfo *info)
Definition qgst_play.cpp:43
VideoInfo parseGstPlayVideoInfo(const GstPlayVideoInfo *info)
Definition qgst_play.cpp:10
int getStreamIndex(const GstPlayStreamInfo *info)
Definition qgst_play.cpp:67
SubtitleInfo parseGstPlaySubtitleInfo(const GstPlaySubtitleInfo *info)
Definition qgst_play.cpp:57
int getStreamIndex(const T *info)
Definition qgst_play_p.h:77
constexpr bool isStreamType
Definition qgst_play_p.h:70
QLocale::Language language
Definition qgst_play_p.h:57
QLocale::Language language
Definition qgst_play_p.h:64