Commit 24af6b7a authored by Linshizhi's avatar Linshizhi

update

parent 5a22f41f
[submodule "lib/ffmpeg.wasm-core"] [submodule "lib/ffmpeg.wasm-core"]
path = lib/ffmpeg.wasm-core path = lib/ffmpeg.wasm-core
url = git@gitlab.ilaihua.com:linshizhi/ffmpeg.wasm-core.git url = git@gitlab.ilaihua.com:linshizhi/ffmpeg.wasm-core.git
[submodule "lib/ffmpeg.protos"]
path = lib/ffmpeg.protos
url = git@gitlab.ilaihua.com:linshizhi/ffmpeg.protos.git
ffmpeg.protos @ 5afb5e17
Subproject commit 5afb5e17bfeb81f35d43c7b854d7f0d8d7ea3209
#include "wasm.h"
#include <stdio.h>
#include <stdint.h>
#include <libavformat/avformat.h>
#include "basic/container/list.h"
#include "streamContext.h"
#include "MovMem/mm.h"
static int numOfStreams;
static bool *finished;
static bool *inited;
static bool *failed;
static List *protos;
static List *ctxs;
static List *pktBuffer;
EM_PROT_API(int) muxInit(int numOfStreams_) {
numOfStreams = numOfStreams_;
protos = createList();
ctxs = createList();
pktBuffer = createList();
finished = (bool*)malloc(numOfStreams);
inited = (bool*)malloc(numOfStreams);
failed = (bool*)malloc(numOfStreams);
for (int i = 0; i < numOfStreams; ++i) {
listPush(protos, createMMProto());
}
return 0;
}
EM_PORT_API(int) muxPush(int sIdx, uint8_t *data, size_t size) {
MMProto *p = listGet(protos, sIdx);
if (!p) mmpPush(data, size);
else return 1;
return 0;
}
EM_PORT_API(int) muxStep(void) {
}
EM_PORT_API(int) eof(int i) {
}
int main(int argc, char *argv[]) {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment