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>
29#import <AVFoundation/AVFoundation.h>
31@
class AVFMediaPlayerObserver;
52 void setMedia(
const QUrl &content, QIODevice *stream)
override;
69 QtVideo::Rotation &angle,
106 void setActiveTrack(QPlatformMediaPlayer::TrackType type,
int index)
override;
107 int activeTrack(QPlatformMediaPlayer::TrackType type)
override;
116 void resetStream(QIODevice *stream =
nullptr);
117 void applyPitchCompensation(
bool enabled);
118 void resetBufferProgress();
120 void orientationChanged(QtVideo::Rotation rotation,
bool mirrored);
125 QIODevice *m_mediaStream;
127 QMediaMetaData m_metaData;
130 qint64 m_requestedPosition;
133 int m_bufferProgress;
134 bool m_pitchCompensationEnabled{
false };
136 AVFMediaPlayerObserver *m_observer;
138 QTimer m_playbackTimer;