This commit is contained in:
Ziyang Zhou
2022-05-21 23:08:36 +08:00
commit 3fa6b71f87
42 changed files with 15332 additions and 0 deletions

21
include/media_codec.h Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
extern "C" {
enum codec_type_t {
H264_ENCODE,
H264_DECODE,
};
struct media_codec_t {
void *(*codec_alloc)(codec_type_t type, char const *node);
int (*encode_frame)(void *context, void *buffer_handle, void *out_buf, int *out_size);
int (*request_key_frame)(void *context);
int (*codec_free)(void *context);
};
}