4#ifndef AVFMEDIAPLAYER_H
5#define AVFMEDIAPLAYER_H
18#include <QtMultimedia/qmediaplayer.h>
19#include <QtMultimedia/qvideoframe.h>
20#include <QtMultimedia/private/qplatformmediaplayer_p.h>
21#include <QtCore/qbytearray.h>
22#include <QtCore/qobject.h>
23#include <QtCore/qresource.h>
24#include <QtCore/qset.h>
25#include <QtCore/qtimer.h>
26#include <QtCore/qurl.h>
28#import <AVFoundation/AVFoundation.h>
30@
class AVFMediaPlayerObserver;
51 void setMedia(
const QUrl &content, QIODevice *stream)
override;
68 QtVideo::Rotation &angle,
107 void setActiveTrack(QPlatformMediaPlayer::TrackType type,
int index)
override;
108 int activeTrack(QPlatformMediaPlayer::TrackType type)
override;
117 void resetStream(QIODevice *stream =
nullptr);
118 void applyPitchCompensation(
bool enabled);
119 void resetBufferProgress();
121 void orientationChanged(QtVideo::Rotation rotation,
bool mirrored);
126 QIODevice *m_mediaStream;
128 QMediaMetaData m_metaData;
131 qint64 m_requestedPosition;
134 int m_bufferProgress;
135 bool m_pitchCompensationEnabled{
false };
137 AVFMediaPlayerObserver *m_observer;
139 QTimer m_playbackTimer;