4#ifndef AVFMEDIAPLAYER_H
5#define AVFMEDIAPLAYER_H
18#include <QtCore/QObject>
19#include <QtCore/QByteArray>
21#include <QtCore/QResource>
23#include <QtCore/QTimer>
25#include <private/qplatformmediaplayer_p.h>
26#include <QtMultimedia/QMediaPlayer>
27#include <QtMultimedia/QVideoFrame>
56 void setMedia(
const QUrl &content, QIODevice *stream)
override;
77 QtVideo::Rotation &angle,
113 void setActiveTrack(QPlatformMediaPlayer::TrackType type,
int index)
override;
114 int activeTrack(QPlatformMediaPlayer::TrackType type)
override;
123 void setAudioAvailable(
bool available);
124 void setVideoAvailable(
bool available);
125 void setSeekable(
bool seekable);
126 void resetStream(QIODevice *stream =
nullptr);
127 void applyPitchCompensation(
bool enabled);
129 void orientationChanged(QtVideo::Rotation rotation,
bool mirrored);
134 QMediaPlayer::PlaybackState m_state;
135 QMediaPlayer::MediaStatus m_mediaStatus;
136 QIODevice *m_mediaStream;
138 QMediaMetaData m_metaData;
141 qint64 m_requestedPosition;
144 int m_bufferProgress;
145 bool m_videoAvailable;
146 bool m_audioAvailable;
148 bool m_pitchCompensationEnabled{
false };
150 AVFMediaPlayerObserver *m_observer;
152 QTimer m_playbackTimer;
Q_FORWARD_DECLARE_OBJC_CLASS(AVAssetTrack)
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject)