Files
One-KVM/libs/hwcodec/cpp/ffmpeg_ram/ffmpeg_ram_ffi.h
mofeng-git 01e01430da feat: 支持 MJPEG 解码与 MSD 目录配置
- FFmpeg/hwcodec 增加 RKMPP MJPEG 解码与 RAM FFI,ARM 构建启用对应解码器
  - 共享视频管线新增 MJPEG 解码路径(RKMPP/TurboJPEG),优化 WebRTC 发送与 MJPEG 去重
  - MSD 配置改为 msd_dir 并自动创建子目录,接口与前端设置同步更新
  - 更新包依赖与版本号
2026-01-11 16:32:37 +08:00

37 lines
1.7 KiB
C

#ifndef FFMPEG_RAM_FFI_H
#define FFMPEG_RAM_FFI_H
#include <stdint.h>
#define AV_NUM_DATA_POINTERS 8
typedef void (*RamEncodeCallback)(const uint8_t *data, int len, int64_t pts,
int key, const void *obj);
typedef void (*RamDecodeCallback)(const uint8_t *data, int len, int width,
int height, int pixfmt, const void *obj);
void *ffmpeg_ram_new_encoder(const char *name, const char *mc_name, int width,
int height, int pixfmt, int align, int fps,
int gop, int rc, int quality, int kbs, int q,
int thread_count, int gpu, int *linesize,
int *offset, int *length,
RamEncodeCallback callback);
int ffmpeg_ram_encode(void *encoder, const uint8_t *data, int length,
const void *obj, int64_t ms);
void ffmpeg_ram_free_encoder(void *encoder);
int ffmpeg_ram_get_linesize_offset_length(int pix_fmt, int width, int height,
int align, int *linesize, int *offset,
int *length);
int ffmpeg_ram_set_bitrate(void *encoder, int kbs);
void ffmpeg_ram_request_keyframe(void *encoder);
void *ffmpeg_ram_new_decoder(const char *name, int width, int height,
int sw_pixfmt, int thread_count,
RamDecodeCallback callback);
int ffmpeg_ram_decode(void *decoder, const uint8_t *data, int length,
const void *obj);
void ffmpeg_ram_free_decoder(void *decoder);
const char *ffmpeg_ram_last_error(void);
#endif // FFMPEG_RAM_FFI_H