4#ifndef QANDROIDMEDIAPLAYERCONTROL_H
5#define QANDROIDMEDIAPLAYERCONTROL_H
19#include <private/qplatformmediaplayer_p.h>
20#include <qandroidmetadata_p.h>
27class AndroidMediaPlayer;
29class QAndroidMediaPlayerVideoRendererControl;
30class QAndroidAudioOutput;
50 void setMedia(
const QUrl &mediaContent, QIODevice *stream)
override;
67 void setActiveTrack(TrackType trackType,
int streamNumber)
override;
71 void setMuted(
bool muted);
72 void onVideoOutputReady(
bool ready);
73 void onError(qint32 what, qint32 extra);
74 void onInfo(qint32 what, qint32 extra);
75 void onBufferingChanged(qint32 percent);
76 void onVideoSizeChanged(qint32 width, qint32 height);
77 void onStateChanged(qint32 state);
78 void positionChanged(qint64 position);
79 void durationChanged(qint64 duration);
83 QAndroidAudioOutput *m_audioOutput =
nullptr;
85 QIODevice *mMediaStream =
nullptr;
87 QVideoSink *m_videoSink =
nullptr;
88 int mBufferPercent = -1;
89 bool mBufferFilled =
false;
90 bool mAudioAvailable =
false;
91 bool mVideoAvailable =
false;
93 bool mBuffering =
false;
94 QMediaTimeRange mAvailablePlaybackRange;
96 int mPendingState = -1;
97 qint64 mPendingPosition = -1;
98 bool mPendingSetMedia =
false;
99 float mPendingVolume = -1;
100 int mPendingMute = -1;
101 bool mReloadingMedia =
false;
102 int mActiveStateChangeNotifiers = 0;
103 qreal mCurrentPlaybackRate = 1.;
104 bool mHasPendingPlaybackRate =
false;
107 bool mIsVideoTrackEnabled =
true;
108 bool mIsAudioTrackEnabled =
true;
110 void setMediaStatus(QMediaPlayer::MediaStatus status);
111 void setAudioAvailable(
bool available);
112 void setVideoAvailable(
bool available);
113 void updateAvailablePlaybackRanges();
114 void resetBufferingProgress();
115 void flushPendingStates();
116 void updateBufferStatus();
117 void updateTrackInfo();
118 void setSubtitle(QString subtitle);
119 void disableTrack(TrackType trackType);
121 int convertTrackNumber(
int androidTrackNumber);
AndroidSurfaceTexture * surfaceTexture() override
bool shouldTextureBeUpdated() const
StateChangeNotifier(QAndroidMediaPlayer *mp)
#define qCWarning(category,...)
#define Q_STATIC_LOGGING_CATEGORY(name,...)