提交 9108c64c authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-10752: [mod_av] Remove support for AVENC which is not working on deb9 #resolve

上级 168cb620
...@@ -824,6 +824,7 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt ...@@ -824,6 +824,7 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt
int sane = 0; int sane = 0;
int threads = switch_core_cpu_count(); int threads = switch_core_cpu_count();
#ifdef NVENC_SUPPORT
if (!context->encoder) { if (!context->encoder) {
if (context->av_codec_id == AV_CODEC_ID_H264) { if (context->av_codec_id == AV_CODEC_ID_H264) {
if (context->codec_settings.video.try_hardware_encoder && (context->encoder = avcodec_find_encoder_by_name("nvenc_h264"))) { if (context->codec_settings.video.try_hardware_encoder && (context->encoder = avcodec_find_encoder_by_name("nvenc_h264"))) {
...@@ -833,11 +834,14 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt ...@@ -833,11 +834,14 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NVENC HW CODEC NOT PRESENT\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "NVENC HW CODEC NOT PRESENT\n");
} }
} }
}
#endif
if (!context->encoder) { if (!context->encoder) {
context->encoder = avcodec_find_encoder(context->av_codec_id); context->encoder = avcodec_find_encoder(context->av_codec_id);
} }
}
if (!context->encoder) { if (!context->encoder) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find encoder id: %d\n", context->av_codec_id); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find encoder id: %d\n", context->av_codec_id);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论