Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
27
QT_BEGIN_NAMESPACE
28
29
namespace
QGstPlaySupport
{
30
31
using
QUniqueGstPlayMediaInfoHandle
=
32
QGstImpl
::
QGObjectHandleHelper
<
GstPlayMediaInfo
>::
SharedHandle
;
33
using
QUniqueGstPlayAudioInfoHandle
=
34
QGstImpl
::
QGObjectHandleHelper
<
GstPlayAudioInfo
>::
SharedHandle
;
35
using
QUniqueGstPlayVideoInfoHandle
=
36
QGstImpl
::
QGObjectHandleHelper
<
GstPlayVideoInfo
>::
SharedHandle
;
37
using
QUniqueGstPlaySubtitleInfoHandle
=
38
QGstImpl
::
QGObjectHandleHelper
<
GstPlaySubtitleInfo
>::
SharedHandle
;
39
40
struct
VideoInfo
41
{
42
int
bitrate
{};
43
int
maxBitrate
{};
44
QSize
size
;
45
Fraction
framerate
{};
46
Fraction
pixelAspectRatio
{};
47
};
48
49
VideoInfo
parseGstPlayVideoInfo
(
const
GstPlayVideoInfo *);
50
51
struct
AudioInfo
52
{
53
int
channels
{};
54
int
sampleRate
{};
55
int
bitrate
{};
56
int
maxBitrate
{};
57
QLocale
::
Language
language
{};
58
};
59
60
AudioInfo
parseGstPlayAudioInfo
(
const
GstPlayAudioInfo *);
61
62
struct
SubtitleInfo
63
{
64
QLocale
::
Language
language
{};
65
};
66
67
SubtitleInfo
parseGstPlaySubtitleInfo
(
const
GstPlaySubtitleInfo *);
68
69
template
<
typename
T
>
70
constexpr
bool
isStreamType
= std::is_same_v<std::decay_t<T>, GstPlayVideoInfo>
71
||
std
::
is_same_v
<
std
::
decay_t
<
T
>,
GstPlayAudioInfo
>
72
||
std
::
is_same_v
<
std
::
decay_t
<
T
>,
GstPlaySubtitleInfo
>;
73
74
int
getStreamIndex
(
const
GstPlayStreamInfo *);
75
76
template
<
typename
T,
typename
Enabler =
std
::
enable_if_t
<
isStreamType
<
T
>>>
77
int
getStreamIndex
(
const
T *info)
78
{
79
return
getStreamIndex(GST_PLAY_STREAM_INFO(info));
80
}
81
82
}
// namespace QGstPlaySupport
83
84
QT_END_NAMESPACE
85
86
#
endif
QGstPlaySupport
Definition
qgst_play.cpp:8
QGstPlaySupport::parseGstPlayAudioInfo
AudioInfo parseGstPlayAudioInfo(const GstPlayAudioInfo *info)
Definition
qgst_play.cpp:43
QGstPlaySupport::parseGstPlayVideoInfo
VideoInfo parseGstPlayVideoInfo(const GstPlayVideoInfo *info)
Definition
qgst_play.cpp:10
QGstPlaySupport::getStreamIndex
int getStreamIndex(const GstPlayStreamInfo *info)
Definition
qgst_play.cpp:67
QGstPlaySupport::parseGstPlaySubtitleInfo
SubtitleInfo parseGstPlaySubtitleInfo(const GstPlaySubtitleInfo *info)
Definition
qgst_play.cpp:57
QGstPlaySupport::getStreamIndex
int getStreamIndex(const T *info)
Definition
qgst_play_p.h:77
QGstPlaySupport::isStreamType
constexpr bool isStreamType
Definition
qgst_play_p.h:70
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QGstPlaySupport::AudioInfo
Definition
qgst_play_p.h:52
QGstPlaySupport::AudioInfo::language
QLocale::Language language
Definition
qgst_play_p.h:57
QGstPlaySupport::AudioInfo::maxBitrate
int maxBitrate
Definition
qgst_play_p.h:56
QGstPlaySupport::AudioInfo::bitrate
int bitrate
Definition
qgst_play_p.h:55
QGstPlaySupport::AudioInfo::sampleRate
int sampleRate
Definition
qgst_play_p.h:54
QGstPlaySupport::AudioInfo::channels
int channels
Definition
qgst_play_p.h:53
QGstPlaySupport::SubtitleInfo
Definition
qgst_play_p.h:63
QGstPlaySupport::SubtitleInfo::language
QLocale::Language language
Definition
qgst_play_p.h:64
QGstPlaySupport::VideoInfo
Definition
qgst_play_p.h:41
QGstPlaySupport::VideoInfo::maxBitrate
int maxBitrate
Definition
qgst_play_p.h:43
QGstPlaySupport::VideoInfo::framerate
Fraction framerate
Definition
qgst_play_p.h:45
QGstPlaySupport::VideoInfo::bitrate
int bitrate
Definition
qgst_play_p.h:42
QGstPlaySupport::VideoInfo::size
QSize size
Definition
qgst_play_p.h:44
QGstPlaySupport::VideoInfo::pixelAspectRatio
Fraction pixelAspectRatio
Definition
qgst_play_p.h:46
qtmultimedia
src
plugins
multimedia
gstreamer
common
qgst_play_p.h
Generated on
for Qt by
1.18.0