Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
ParaEncode
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ParaEncode
Commits
24af6b7a
Commit
24af6b7a
authored
May 11, 2022
by
Linshizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5a22f41f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
.gitmodules
.gitmodules
+3
-0
ffmpeg.protos
lib/ffmpeg.protos
+1
-0
muxer.c
src/wasms/muxer.c
+56
-0
No files found.
.gitmodules
View file @
24af6b7a
[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
src/wasms/muxer.c
0 → 100644
View file @
24af6b7a
#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[]) {}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment