4#ifndef QFFMPEGMEDIADATAHOLDER_P_H
5#define QFFMPEGMEDIADATAHOLDER_P_H
19#include "private/qplatformmediaplayer_p.h"
22#include <private/qmultimediautils_p.h>
59 MediaDataHolder(AVFormatContextUPtr context,
const std::shared_ptr<ICancelToken> &cancelToken);
63 int activeTrack(QPlatformMediaPlayer::TrackType type)
const;
80 static Maybe create(
const QUrl &url, QIODevice *stream,
81 const std::shared_ptr<ICancelToken> &cancelToken);
83 bool setActiveTrack(QPlatformMediaPlayer::TrackType type,
int streamNumber);
86 void updateMetaData();
88 std::shared_ptr<ICancelToken> m_cancelToken;
91 AVFormatContextUPtr m_context;
93 bool m_isSeekable =
false;
95 StreamIndexes m_currentAVStreamIndex = { -1, -1, -1 };
96 StreamsMap m_streamMap;
97 StreamIndexes m_requestedStreams = { -1, -1, -1 };
98 qint64 m_duration = 0;
99 QMediaMetaData m_metaData;
100 std::optional<QImage> m_cachedThumbnail;
static VideoTransformation streamTransformation(const AVStream *stream)
static bool colorTransferSupportsHdr(const AVStream *stream)
static void insertMediaData(QMediaMetaData &metaData, QPlatformMediaPlayer::TrackType trackType, const AVStream *stream)
static std::optional< qint64 > streamDuration(const AVStream &stream)
int64_t seekQIODevice(void *opaque, int64_t offset, int whence)
static QTransform displayMatrixToTransform(const int32_t *displayMatrix)
int readQIODevice(void *opaque, uint8_t *buf, int buf_size)
const AVPacketSideData * streamSideData(const AVStream *stream, AVPacketSideDataType type)
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)
#define QT_BEGIN_NAMESPACE
virtual bool isCancelled() const =0
virtual ~ICancelToken()=default