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
qwasmvideoframegrabber.cpp File Reference

(b1e97fe82c1d749a28e1ca17280e9d906e66d82f)

#include "qwasmvideoframegrabber_p.h"
#include "qwasmvideooutput_p.h"
#include "qwasmgltexturevideobuffer_p.h"
#include <QtMultimedia/qvideosink.h>
#include <QtMultimedia/private/qmemoryvideobuffer_p.h>
#include <QtMultimedia/private/qvideoframe_p.h>
#include <QtGui/qopenglcontext.h>
#include <QtGui/rhi/qrhi_platform.h>
#include <QtCore/qdebug.h>
#include <QtCore/private/qstdweb_p.h>
#include <emscripten/emscripten.h>
#include <emscripten/em_js.h>
#include <emscripten/html5.h>
#include <emscripten/val.h>
#include <GLES2/gl2.h>
Include dependency graph for qwasmvideoframegrabber.cpp:

Go to the source code of this file.

Functions

 EM_JS (void, em_texImage2DFromVideo,(const char *videoId, int *widthOut, int *heightOut), { videoId=Number(videoId);widthOut=Number(widthOut);heightOut=Number(heightOut);var gl=GL.currentContext.GLctx;var video=document.getElementById(UTF8ToString(videoId));if(!video) { return;} var frame;try { frame=new VideoFrame(video);} catch(e) { return;} HEAP32[widthOut/4]=frame.displayWidth;HEAP32[heightOut/4]=frame.displayHeight;gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, frame);frame.close();})

Function Documentation

◆ EM_JS()

EM_JS ( void ,
em_texImage2DFromVideo ,
(const char *videoId, int *widthOut, int *heightOut) ,
{ videoId=Number(videoId);widthOut=Number(widthOut);heightOut=Number(heightOut);var gl=GL.currentContext.GLctx;var video=document.getElementById(UTF8ToString(videoId));if(!video) { return;} var frame;try { frame=new VideoFrame(video);} catch(e) { return;} HEAP32[widthOut/4]=frame.displayWidth;HEAP32[heightOut/4]=frame.displayHeight;gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, frame);frame.close();}  )

References EM_JS().

Referenced by EM_JS().

Here is the call graph for this function:
Here is the caller graph for this function: