mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-27 16:00:49 +08:00
通过 Bytes 所有权和只读 AVBufferRef 引用池化 NV12 输入,消除中间 AVFrame 的整帧复制,并保留 V4L2 编码包脱离硬件缓冲的处理。 允许输出健康时有界预取 MJPEG,在输出背压时优先解码前丢帧;增加等帧、输出等待、丢帧原因及编码分段耗时统计,提供预取和所有权输入的对照开关。 补充缓冲寿命、只读保护、软件编码回退和队列策略测试及接口说明,保留现有 PTS、解码 worker、音频和加密行为。
18 lines
340 B
C
18 lines
340 B
C
#ifndef FFMPEG_RAM_ENCODE_STATS_H
|
|
#define FFMPEG_RAM_ENCODE_STATS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
typedef struct RamEncodeStats {
|
|
uint64_t input_frames;
|
|
uint64_t borrowed_frames;
|
|
uint64_t copied_frames;
|
|
uint64_t copied_bytes;
|
|
uint64_t prepare_us;
|
|
uint64_t send_us;
|
|
uint64_t receive_us;
|
|
uint64_t packet_us;
|
|
} RamEncodeStats;
|
|
|
|
#endif
|