Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
androidmediaplayer_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef ANDROIDMEDIAPLAYER_H
5#define ANDROIDMEDIAPLAYER_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QObject>
19#include <QNetworkRequest>
20#include <QtCore/qjniobject.h>
21#include <QAudio>
22
24
26
28{
30public:
33
48
60
62 Uninitialized = 0x1, /* End */
63 Idle = 0x2,
64 Preparing = 0x4,
65 Prepared = 0x8,
67 Started = 0x20,
68 Stopped = 0x40,
69 Paused = 0x80,
71 Error = 0x200
72 };
73
75
83
84 void release();
85 void reset();
86
88 int getDuration();
89 bool isPlaying();
90 int volume();
91 bool isMuted();
93 jobject display();
94
95 void play();
96 void pause();
97 void stop();
98 void seekTo(qint32 msec);
99 void setMuted(bool mute);
101 void prepareAsync();
102 void setVolume(int volume);
103 static void startSoundStreaming(const int inputId, const int outputId);
104 static void stopSoundStreaming();
106 void setDisplay(AndroidSurfaceTexture *surfaceTexture);
107 static bool setAudioOutput(const QByteArray &deviceId);
108 QList<TrackInfo> tracksInfo();
109 int activeTrack(TrackType trackType);
110 void deselectTrack(int trackNumber);
111 void selectTrack(int trackNumber);
112
113 static bool registerNativeMethods();
114
115 void blockAudio();
116 void unblockAudio();
118 void error(qint32 what, qint32 extra);
120 void durationChanged(qint64 duration);
121 void progressChanged(qint64 progress);
123 void info(qint32 what, qint32 extra);
127
128private:
129 QJniObject mMediaPlayer;
130 bool mAudioBlocked = false;
131};
132
134
135#endif // ANDROIDMEDIAPLAYER_H
void progressChanged(qint64 progress)
void seekTo(qint32 msec)
void deselectTrack(int trackNumber)
static bool registerNativeMethods()
void stateChanged(qint32 state)
void selectTrack(int trackNumber)
QList< TrackInfo > tracksInfo()
void setDataSource(const QNetworkRequest &request)
static void stopSoundStreaming()
void videoSizeChanged(qint32 width, qint32 height)
void setDisplay(AndroidSurfaceTexture *surfaceTexture)
void bufferingChanged(qint32 percent)
void durationChanged(qint64 duration)
void timedTextChanged(QString text)
void info(qint32 what, qint32 extra)
void error(qint32 what, qint32 extra)
static bool setAudioOutput(const QByteArray &deviceId)
bool setPlaybackRate(qreal rate)
int activeTrack(TrackType trackType)
static void startSoundStreaming(const int inputId, const int outputId)
void setVolume(int volume)
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString text
else opt state
[0]
Combined button and popup list for selecting options.
GLint GLsizei GLsizei height
GLint GLsizei width
GLuint GLenum * rate
#define Q_OBJECT
#define Q_SIGNALS
int qint32
Definition qtypes.h:49
long long qint64
Definition qtypes.h:60
double qreal
Definition qtypes.h:187
QNetworkRequest request(url)