15#ifndef QWASMVIDEOOUTPUT_H
16#define QWASMVIDEOOUTPUT_H
20#include <emscripten/val.h>
21#include <QMediaPlayer>
25#include <QtCore/qloggingcategory.h>
27#include <private/qstdweb_p.h>
78 void setHasAudio(
bool needsAudio) { m_hasAudio = needsAudio; }
104 void checkNetworkState();
105 void videoComputeFrame(
void *
context);
106 void getDeviceSettings();
110 emscripten::val m_video = emscripten::val::undefined();
111 emscripten::val m_videoElementSource = emscripten::val::undefined();
114 float m_requestedPosition = 0.0;
115 emscripten::val m_offscreen = emscripten::val::undefined();
117 bool m_shouldStop =
false;
118 bool m_toBePaused =
false;
119 bool m_isSeeking =
false;
120 bool m_hasAudio =
false;
121 bool m_cameraIsReady =
false;
122 bool m_shouldBeStarted =
false;
124 emscripten::val m_offscreenContext = emscripten::val::undefined();
125 QSize m_pendingVideoSize;
128 qreal m_currentBufferedValue;
130 QScopedPointer<qstdweb::EventCallback> m_timeUpdateEvent;
131 QScopedPointer<qstdweb::EventCallback> m_playEvent;
132 QScopedPointer<qstdweb::EventCallback> m_endedEvent;
133 QScopedPointer<qstdweb::EventCallback> m_durationChangeEvent;
134 QScopedPointer<qstdweb::EventCallback> m_loadedDataEvent;
135 QScopedPointer<qstdweb::EventCallback> m_errorChangeEvent;
136 QScopedPointer<qstdweb::EventCallback> m_resizeChangeEvent;
137 QScopedPointer<qstdweb::EventCallback> m_loadedMetadataChangeEvent;
138 QScopedPointer<qstdweb::EventCallback> m_loadStartChangeEvent;
139 QScopedPointer<qstdweb::EventCallback> m_canPlayChangeEvent;
140 QScopedPointer<qstdweb::EventCallback> m_canPlayThroughChangeEvent;
141 QScopedPointer<qstdweb::EventCallback> m_seekingChangeEvent;
142 QScopedPointer<qstdweb::EventCallback> m_seekedChangeEvent;
143 QScopedPointer<qstdweb::EventCallback> m_emptiedChangeEvent;
144 QScopedPointer<qstdweb::EventCallback> m_stalledChangeEvent;
145 QScopedPointer<qstdweb::EventCallback> m_waitingChangeEvent;
146 QScopedPointer<qstdweb::EventCallback> m_playingChangeEvent;
147 QScopedPointer<qstdweb::EventCallback> m_progressChangeEvent;
148 QScopedPointer<qstdweb::EventCallback> m_pauseChangeEvent;
\inmodule QtCore \reentrant
QObject * parent() const
Returns a pointer to the parent object.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QVideoFrame class represents a frame of video data.
The QVideoSink class represents a generic sink for video data.
void addCameraSourceElement(const std::string &id)
void updateVideoElementGeometry(const QRect &windowGeometry)
bool setDeviceSetting(const std::string &key, emscripten::val value)
void sizeChange(qint32 width, qint32 height)
void newFrame(const QVideoFrame &newFrame)
emscripten::val surfaceElement()
void durationChanged(qint64 duration)
emscripten::val getDeviceCapabilities()
static void videoFrameCallback(emscripten::val now, emscripten::val metadata)
void setVideoSize(const QSize &)
void setMuted(bool muted)
emscripten::val currentVideoElement()
void setSource(const QUrl &url)
void setVideoMode(QWasmVideoOutput::WasmVideoMode mode)
void bufferingChanged(qint32 percent)
void seekTo(qint64 position)
void setVolume(qreal volume)
void createVideoElement(const std::string &id)
void stateChanged(QWasmMediaPlayer::QWasmMediaPlayerState newState)
void setSurface(QVideoSink *surface)
bool hasCapability(const QString &cap)
void updateVideoElementSource(const QString &src)
void removeSourceElement()
void statusChanged(QMediaPlayer::MediaStatus status)
void progressChanged(qint32 position)
void errorOccured(qint32 code, const QString &message)
qint64 getCurrentPosition()
void setPlaybackRate(qreal rate)
void setHasAudio(bool needsAudio)
void doElementCallbacks()
void createOffscreenElement(const QSize &offscreenSize)
void videoFrameTimerCallback()
void newState(QList< State > &states, const char *token, const char *lexem, bool pre)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLint GLsizei GLsizei height
GLuint GLsizei const GLchar * message
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QUrl url("example.com")
[constructor-url-reference]