![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#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>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();}) | |
| 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();} | ) |