随笔分类 - wasm
摘要:介绍 HLS(HTTP Live Streaming) 协议是APPLE 提出的一种替代rtmp协议的直播传播协议 HLS 使用HTTP作为底层传输协议,传输的内容包括了m3u8文件和TS分片,其中m3u8文件用于记录可以播放哪些分片, M3u8解析 TS解析 ts分片中包含header+Paylo
阅读全文
摘要:#编译选项 emcc sum.cc -o sum.js -sEXPORTED_FUNCTIONS=_malloc,_free sum.cc #include "util.h" #include<stdlib.h> #include<string.h> #include <malloc.h> EM_P
阅读全文
摘要:安装nodejs tsc apt install nodejs which node npm npm install -g typescript tsc -v 配置tsc tsc --init tsconfig.json { "include":["./src/**/*.ts"],/*源代码存放的路
阅读全文
摘要:下载ffmpeg版本 注意 这里环境是承接docker Ubuntu wasm 环境配置 浏览器debug c/c++ 中的docker ubuntu 环境 git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg cd ffmpeg git branch
阅读全文
摘要:内容简要 请使用者自行优化 #ifndef EM_PORT_API # if defined(__EMSCRIPTEN__) # include <emscripten.h> # if defined(__cplusplus) # define EM_PORT_API(rettype) extern
阅读全文
摘要:编译选项 emcc mem.cc -o mem.js mem.cc #include "util.h" int g_int=42; double g_double = 3.1415926; EM_PORT_API(int*)get_int_ptr(){ return &g_int; } EM_POR
阅读全文
摘要:将接口暴露出来 在test.c 中直接写出如下所示的代码 vim test.c #include<stdio.h> int add(int a,int b) { return a+b; } int main(int argc,char** argv) { return add(1,2); } 使用
阅读全文
摘要:执行下面命令启动docker Ubuntu docker container run -it -p 80:8000 ubuntu 进入Ubuntu容器中 root@6c76b77bfdb4:apt update root@6c76b77bfdb4:apt install vim xz-utils b
阅读全文