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,
108 void setActiveTrack(QPlatformMediaPlayer::TrackType type,
int index)
override;
109 int activeTrack(QPlatformMediaPlayer::TrackType type)
override;
118 void resetStream(QIODevice *stream =
nullptr);
119 void applyPitchCompensation(
bool enabled);
120 void resetBufferProgress();
122 void orientationChanged(QtVideo::Rotation rotation,
bool mirrored);
127 QIODevice *m_mediaStream;
129 QMediaMetaData m_metaData;
132 qint64 m_requestedPosition;
135 int m_bufferProgress;
136 bool m_pitchCompensationEnabled{
false };
138 AVFMediaPlayerObserver *m_observer;
140 QTimer m_playbackTimer;