mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-15 07:26:44 +08:00
feat: 支持树莓派 v4l2m2m 编码器探测
This commit is contained in:
@@ -147,11 +147,11 @@ bool set_lantency_free(void *priv_data, const std::string &name) {
|
||||
// V4L2 M2M hardware encoder - minimize buffer latency
|
||||
if (name.find("v4l2m2m") != std::string::npos) {
|
||||
// Minimize number of output buffers for lower latency
|
||||
if ((ret = av_opt_set_int(priv_data, "num_output_buffers", 2, 0)) < 0) {
|
||||
if ((ret = av_opt_set_int(priv_data, "num_output_buffers", 4, 0)) < 0) {
|
||||
LOG_WARN(std::string("v4l2m2m set num_output_buffers failed, ret = ") + av_err2str(ret));
|
||||
// Not fatal
|
||||
}
|
||||
if ((ret = av_opt_set_int(priv_data, "num_capture_buffers", 2, 0)) < 0) {
|
||||
if ((ret = av_opt_set_int(priv_data, "num_capture_buffers", 4, 0)) < 0) {
|
||||
LOG_WARN(std::string("v4l2m2m set num_capture_buffers failed, ret = ") + av_err2str(ret));
|
||||
// Not fatal
|
||||
}
|
||||
@@ -500,4 +500,4 @@ bool has_flag_could_not_find_ref_with_poc() {
|
||||
|
||||
extern "C" void hwcodec_set_flag_could_not_find_ref_with_poc() {
|
||||
util_decode::g_flag_could_not_find_ref_with_poc = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user