From 670c1068bce1f0bbe83ab3412d1ff5c11ed48d1c Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 16 七月 2019 17:32:44 +0800 Subject: [PATCH] add ignore --- csrc/cffmpeg.cpp | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/csrc/cffmpeg.cpp b/csrc/cffmpeg.cpp index 2bf0a0f..4c5ddb8 100644 --- a/csrc/cffmpeg.cpp +++ b/csrc/cffmpeg.cpp @@ -31,6 +31,11 @@ s->RunStream(input); } +void c_ffmpeg_scale(const cffmpeg h, const int wid, const int hei, const int flags){ + Wrapper *s = (Wrapper*)h; + s->ScalePicture(wid, hei, flags); +} + //////passive api void c_ffmpeg_build_recorder(const cffmpeg h, const char *dir, int mind, int maxd){ Wrapper *s = (Wrapper*)h; @@ -96,4 +101,17 @@ *wid = *hei = 0; } return p; -} \ No newline at end of file +} + +// pic encoder +void *c_ffmpeg_create_encoder(const int w, const int h, const int fps, const int br, const int scale_flag, const int gi){ + return CreateEncoder(w, h, fps, br, scale_flag, gi); +} + +void c_ffmpeg_destroy_encoder(void *h){ + DestroyEncoder(h); +} + +int c_ffmpeg_encode(void *hdl, uint8_t *in, const int w, const int h, uint8_t **out, int *size, int *key){ + return Encode(hdl, in, w, h, out, size, key); +} -- Gitblit v1.8.0