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_discoverer_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_DISCOVERER_P_H
5#define QGST_DISCOVERER_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#include <QtCore/qsize.h>
21#include <QtCore/private/qexpected_p.h>
22
23#include <QtMultimedia/private/qmultimediautils_p.h>
24
25#include "qgst_p.h"
27
28#include <gst/pbutils/gstdiscoverer.h>
29
30#include <vector>
31
32QT_BEGIN_NAMESPACE
33
34class QMediaMetaData;
35
36namespace QGst {
37
48
56
68
79
84
89
103
104// For now we only perform synchronous discovery. Our future selves may want to perform the
105// discovery asynchronously.
107{
108public:
110
114
115private:
116 q23::expected<QGstDiscovererInfo, QUniqueGErrorHandle> discover(const char *);
117 QGstDiscovererHandle m_instance;
118};
119
120QMediaMetaData toContainerMetadata(const QGstDiscovererInfo &);
121QMediaMetaData toStreamMetadata(const QGstDiscovererVideoInfo &);
122QMediaMetaData toStreamMetadata(const QGstDiscovererAudioInfo &);
123QMediaMetaData toStreamMetadata(const QGstDiscovererSubtitleInfo &);
124
125} // namespace QGst
126
127QT_END_NAMESPACE
128
129#endif // QGST_DISCOVERER_P_H
q23::expected< QGstDiscovererInfo, QUniqueGErrorHandle > discover(const QString &uri)
q23::expected< QGstDiscovererInfo, QUniqueGErrorHandle > discover(QIODevice *)
QMediaMetaData toStreamMetadata(const QGstDiscovererAudioInfo &info)
static constexpr std::chrono::nanoseconds discovererTimeout
QMediaMetaData toStreamMetadata(const QGstDiscovererSubtitleInfo &info)
QMediaMetaData toStreamMetadata(const QGstDiscovererVideoInfo &info)
QMediaMetaData toContainerMetadata(const QGstDiscovererInfo &info)
static void updateMetadata(QMediaMetaData &metadata, QMediaMetaData::Key key, ValueType value)
void addMissingKeysFromTaglist(QMediaMetaData &metadata, const QGstTagListHandle &tagList)
std::vector< QGstDiscovererAudioInfo > audioStreams
std::vector< QGstDiscovererContainerInfo > containerStreams
std::vector< QGstDiscovererVideoInfo > videoStreams
std::optional< QGstDiscovererContainerInfo > containerInfo
std::vector< QGstDiscovererSubtitleInfo > subtitleStreams
std::optional< std::chrono::nanoseconds > duration