From 5e85a7e80764e1a1eae39c8ce9bafed29d8773a9 Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期二, 23 七月 2019 19:57:27 +0800 Subject: [PATCH] 增加支持推流的代码,并替换librtspclient.so --- csrc/ffmpeg/format/FormatOut.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/csrc/ffmpeg/format/FormatOut.cpp b/csrc/ffmpeg/format/FormatOut.cpp index 3837dbc..d319969 100644 --- a/csrc/ffmpeg/format/FormatOut.cpp +++ b/csrc/ffmpeg/format/FormatOut.cpp @@ -160,6 +160,9 @@ if(prop.gpuAccl()){ av_opt_set(enc_ctx_->priv_data, "preset", "llhp", 0); int idle_gpu = gpu::getGPU(120); + if (prop.gpu_index_ > -1){ + idle_gpu = prop.gpu_index_; + } if(idle_gpu < 0){ logIt("NO GPU RESOURCE TO ENCODE"); return false; -- Gitblit v1.8.0