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
qglist_helper_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
QGLIST_HELPER_P_H
5
#
define
QGLIST_HELPER_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
/
qtconfigmacros
.
h
>
19
20
#
include
<
QtMultimedia
/
private
/
qiteratorfacade_p
.
h
>
21
22
#
include
<
glib
.
h
>
23
#
include
<
iterator
>
24
#
include
<
type_traits
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QGstUtils
{
29
30
template
<
typename
ListType,
bool
IsConst>
31
struct
GListIterator
32
:
QtMultimediaPrivate
::
IteratorFacade
<
GListIterator
<
ListType
,
IsConst
>,
ListType
,
33
std
::
input_iterator_tag
,
const
ListType
&>
34
{
35
using
GListType
=
std
::
conditional_t
<
IsConst
,
const
GList
*,
GList
*>;
36
37
explicit
GListIterator
(GListType element =
nullptr
) :
element
(
element
) { }
38
39
const
ListType &
dereference
()
const
noexcept
40
{
41
return
*
reinterpret_cast
<
const
ListType *>(&element->data);
42
}
43
44
void
increment
()
noexcept
45
{
46
if
(element)
47
element = element->next;
48
}
49
50
bool
equals
(
const
GListIterator
&other)
const
noexcept
{
return
element == other.element; }
51
52
GListType
element
=
nullptr
;
53
};
54
55
template
<
typename
ListType,
bool
IsConst>
56
struct
GListRangeAdaptorImpl
57
{
58
static_assert
(
std
::is_pointer_v<ListType>);
59
60
using
GListType
=
std
::
conditional_t
<
IsConst
,
const
GList
*,
GList
*>;
61
62
explicit
GListRangeAdaptorImpl
(GListType list) :
head
(
list
) { }
63
64
auto
begin
() {
return
GListIterator<ListType, IsConst>(head); }
65
auto
end
() {
return
GListIterator
<ListType, IsConst>(
nullptr
); }
66
67
GListType
head
;
68
};
69
70
template
<
typename
ListType>
71
using
GListRangeAdaptor
=
GListRangeAdaptorImpl
<ListType,
false
>;
72
template
<
typename
ListType>
73
using
GListConstRangeAdaptor
=
GListRangeAdaptorImpl
<ListType,
true
>;
74
75
}
// namespace QGstUtils
76
77
QT_END_NAMESPACE
78
79
#
endif
QGstCaps
Definition
qgst_p.h:384
QGst::QGstDiscoverer
Definition
qgst_discoverer_p.h:105
QGst::QGstDiscoverer::discover
q23::expected< QGstDiscovererInfo, QUniqueGErrorHandle > discover(const QString &uri)
Definition
qgst_discoverer.cpp:202
QGst::QGstDiscoverer::QGstDiscoverer
QGstDiscoverer()
Definition
qgst_discoverer.cpp:194
QGst::QGstDiscoverer::discover
q23::expected< QGstDiscovererInfo, QUniqueGErrorHandle > discover(QIODevice *)
Definition
qgst_discoverer.cpp:212
QGstUtils
Definition
qgstutils_p.h:31
QGstUtils::GListConstRangeAdaptor
GListRangeAdaptorImpl< ListType, true > GListConstRangeAdaptor
Definition
qglist_helper_p.h:73
QGstUtils::GListRangeAdaptor
GListRangeAdaptorImpl< ListType, false > GListRangeAdaptor
Definition
qglist_helper_p.h:71
QGst
Definition
qgst_discoverer.cpp:16
QGst::toStreamMetadata
QMediaMetaData toStreamMetadata(const QGstDiscovererAudioInfo &info)
Definition
qgst_discoverer.cpp:298
QGst::discovererTimeout
static constexpr std::chrono::nanoseconds discovererTimeout
Definition
qgst_discoverer.cpp:192
QGst::toStreamMetadata
QMediaMetaData toStreamMetadata(const QGstDiscovererSubtitleInfo &info)
Definition
qgst_discoverer.cpp:312
QGst::toStreamMetadata
QMediaMetaData toStreamMetadata(const QGstDiscovererVideoInfo &info)
Definition
qgst_discoverer.cpp:279
QGst::toContainerMetadata
QMediaMetaData toContainerMetadata(const QGstDiscovererInfo &info)
Definition
qgst_discoverer.cpp:236
QGst::updateMetadata
static void updateMetadata(QMediaMetaData &metadata, QMediaMetaData::Key key, ValueType value)
Definition
qgst_discoverer.cpp:272
QGst::addMissingKeysFromTaglist
void addMissingKeysFromTaglist(QMediaMetaData &metadata, const QGstTagListHandle &tagList)
Definition
qgst_discoverer.cpp:260
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QGstUtils::GListIterator
Definition
qglist_helper_p.h:34
QGstUtils::GListIterator::GListIterator
GListIterator(GListType element=nullptr)
Definition
qglist_helper_p.h:37
QGstUtils::GListIterator::dereference
const ListType & dereference() const noexcept
Definition
qglist_helper_p.h:39
QGstUtils::GListIterator::element
GListType element
Definition
qglist_helper_p.h:52
QGstUtils::GListIterator::increment
void increment() noexcept
Definition
qglist_helper_p.h:44
QGstUtils::GListIterator::equals
bool equals(const GListIterator &other) const noexcept
Definition
qglist_helper_p.h:50
QGstUtils::GListRangeAdaptorImpl
Definition
qglist_helper_p.h:57
QGstUtils::GListRangeAdaptorImpl::GListRangeAdaptorImpl
GListRangeAdaptorImpl(GListType list)
Definition
qglist_helper_p.h:62
QGstUtils::GListRangeAdaptorImpl::end
auto end()
Definition
qglist_helper_p.h:65
QGstUtils::GListRangeAdaptorImpl::head
GListType head
Definition
qglist_helper_p.h:67
QGstUtils::GListRangeAdaptorImpl::begin
auto begin()
Definition
qglist_helper_p.h:64
QGst::QGstDiscovererAudioInfo
Definition
qgst_discoverer_p.h:70
QGst::QGstDiscovererAudioInfo::language
QLocale::Language language
Definition
qgst_discoverer_p.h:77
QGst::QGstDiscovererAudioInfo::bitsPerSample
int bitsPerSample
Definition
qgst_discoverer_p.h:74
QGst::QGstDiscovererAudioInfo::sampleRate
int sampleRate
Definition
qgst_discoverer_p.h:73
QGst::QGstDiscovererAudioInfo::channelMask
uint64_t channelMask
Definition
qgst_discoverer_p.h:72
QGst::QGstDiscovererAudioInfo::channels
int channels
Definition
qgst_discoverer_p.h:71
QGst::QGstDiscovererAudioInfo::maxBitrate
int maxBitrate
Definition
qgst_discoverer_p.h:76
QGst::QGstDiscovererAudioInfo::bitrate
int bitrate
Definition
qgst_discoverer_p.h:75
QGst::QGstDiscovererContainerInfo
Definition
qgst_discoverer_p.h:86
QGst::QGstDiscovererContainerInfo::tags
QGstTagListHandle tags
Definition
qgst_discoverer_p.h:87
QGst::QGstDiscovererInfo
Definition
qgst_discoverer_p.h:91
QGst::QGstDiscovererInfo::audioStreams
std::vector< QGstDiscovererAudioInfo > audioStreams
Definition
qgst_discoverer_p.h:99
QGst::QGstDiscovererInfo::containerStreams
std::vector< QGstDiscovererContainerInfo > containerStreams
Definition
qgst_discoverer_p.h:101
QGst::QGstDiscovererInfo::videoStreams
std::vector< QGstDiscovererVideoInfo > videoStreams
Definition
qgst_discoverer_p.h:98
QGst::QGstDiscovererInfo::tags
QGstTagListHandle tags
Definition
qgst_discoverer_p.h:97
QGst::QGstDiscovererInfo::isSeekable
bool isSeekable
Definition
qgst_discoverer_p.h:93
QGst::QGstDiscovererInfo::containerInfo
std::optional< QGstDiscovererContainerInfo > containerInfo
Definition
qgst_discoverer_p.h:96
QGst::QGstDiscovererInfo::subtitleStreams
std::vector< QGstDiscovererSubtitleInfo > subtitleStreams
Definition
qgst_discoverer_p.h:100
QGst::QGstDiscovererInfo::isLive
bool isLive
Definition
qgst_discoverer_p.h:92
QGst::QGstDiscovererInfo::duration
std::optional< std::chrono::nanoseconds > duration
Definition
qgst_discoverer_p.h:94
QGst::QGstDiscovererStreamInfo
Definition
qgst_discoverer_p.h:50
QGst::QGstDiscovererStreamInfo::streamID
QString streamID
Definition
qgst_discoverer_p.h:52
QGst::QGstDiscovererStreamInfo::tags
QGstTagListHandle tags
Definition
qgst_discoverer_p.h:53
QGst::QGstDiscovererStreamInfo::caps
QGstCaps caps
Definition
qgst_discoverer_p.h:54
QGst::QGstDiscovererStreamInfo::streamNumber
int streamNumber
Definition
qgst_discoverer_p.h:51
QGst::QGstDiscovererSubtitleInfo
Definition
qgst_discoverer_p.h:81
QGst::QGstDiscovererSubtitleInfo::language
QLocale::Language language
Definition
qgst_discoverer_p.h:82
QGst::QGstDiscovererVideoInfo
Definition
qgst_discoverer_p.h:58
QGst::QGstDiscovererVideoInfo::framerate
Fraction framerate
Definition
qgst_discoverer_p.h:61
QGst::QGstDiscovererVideoInfo::bitDepth
int bitDepth
Definition
qgst_discoverer_p.h:60
QGst::QGstDiscovererVideoInfo::size
QSize size
Definition
qgst_discoverer_p.h:59
QGst::QGstDiscovererVideoInfo::bitrate
int bitrate
Definition
qgst_discoverer_p.h:64
QGst::QGstDiscovererVideoInfo::isImage
bool isImage
Definition
qgst_discoverer_p.h:66
QGst::QGstDiscovererVideoInfo::isInterlaced
bool isInterlaced
Definition
qgst_discoverer_p.h:63
QGst::QGstDiscovererVideoInfo::pixelAspectRatio
Fraction pixelAspectRatio
Definition
qgst_discoverer_p.h:62
QGst::QGstDiscovererVideoInfo::maxBitrate
int maxBitrate
Definition
qgst_discoverer_p.h:65
qtmultimedia
src
plugins
multimedia
gstreamer
common
qglist_helper_p.h
Generated on
for Qt by
1.18.0