Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwasmvideooutput.cpp File Reference

(25932126b1af4b323e476adb2b8b0edddd466804)

#include <QDebug>
#include <QUrl>
#include <QPoint>
#include <QRect>
#include <QMediaPlayer>
#include <QVideoFrame>
#include <QFile>
#include <QBuffer>
#include <QMimeDatabase>
#include <QGuiApplication>
#include <QOpenGLContext>
#include <QtGui/rhi/qrhi_platform.h>
#include <qpa/qplatformwindow_p.h>
#include <GLES2/gl2.h>
#include "qwasmvideooutput_p.h"
#include <qvideosink.h>
#include <private/qplatformvideosink_p.h>
#include <private/qmemoryvideobuffer_p.h>
#include <private/qvideotexturehelper_p.h>
#include <private/qvideoframe_p.h>
#include <private/qstdweb_p.h>
#include <QTimer>
#include <emscripten/bind.h>
#include <emscripten/val.h>
#include "moc_qwasmvideooutput_p.cpp"
Include dependency graph for qwasmvideooutput.cpp:

Go to the source code of this file.

Functions

 EM_JS (void, em_texImage2DFromVideo,(EM_VAL canvasHandle, const char *videoId, int *pW, int *pH), { var canvas=Emval.toValue(canvasHandle);var gl=canvas.getContext('webgl2')||canvas.getContext('webgl');var video=document.getElementById(UTF8ToString(videoId));var frame=new VideoFrame(video);HEAP32[pW > > 2]=frame.displayWidth;HEAP32[pH > > 2]=frame.displayHeight;gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, frame);frame.close();})
static bool checkForVideoFrame ()

Function Documentation

◆ checkForVideoFrame()

bool checkForVideoFrame ( )
static

Definition at line 58 of file qwasmvideooutput.cpp.

◆ EM_JS()

EM_JS ( void ,
em_texImage2DFromVideo ,
(EM_VAL canvasHandle, const char *videoId, int *pW, int *pH) ,
{ var canvas=Emval.toValue(canvasHandle);var gl=canvas.getContext('webgl2')||canvas.getContext('webgl');var video=document.getElementById(UTF8ToString(videoId));var frame=new VideoFrame(video);HEAP32[pW > > 2]=frame.displayWidth;HEAP32[pH > > 2]=frame.displayHeight;gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, frame);frame.close();}  )

References EM_JS().

Here is the call graph for this function: