mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
- 优化FFmpeg编译选项,禁用不需要的库(avformat/swscale/swresample/avfilter等) - 禁用所有解码器和大部分编码器,只保留实际使用的H264/H265/VP8/VP9编码器 - 移除hwcodec解码器模块,MJPEG解码改用libyuv实现 - 移除MJPEG编码器支持 - x86_64添加libmfx支持QSV编码器 - 修复H265 RKMPP编码器支持YUYV直接输入
27 lines
1.1 KiB
C
27 lines
1.1 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);
|
|
|
|
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);
|
|
|
|
#endif // FFMPEG_RAM_FFI_H
|