mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 13:28:31 +00:00
FS-8977: Add support for NVENC H264
This commit is contained in:
1 parent
ad72c7f56c
commit
77f70e002e
5 files changed
+69
-34
No files matched your search
@@ -282,8 +282,15 @@ static switch_status_t add_stream(MediaStream *mst, AVFormatContext *fc, AVCodec
|
||||
int buffer_bytes = 2097152; /* 2 mb */
|
||||
int fps = 15;
|
||||
|
||||
/* find the encoder */
|
||||
*codec = avcodec_find_encoder(codec_id);
|
||||
if (mm->try_hardware_encoder && codec_id == AV_CODEC_ID_H264) {
|
||||
*codec = avcodec_find_encoder_by_name("nvenc_h264");
|
||||
}
|
||||
|
||||
if (!*codec) {
|
||||
/* find the encoder */
|
||||
*codec = avcodec_find_encoder(codec_id);
|
||||
}
|
||||
|
||||
if (!(*codec)) {
|
||||
// switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not find encoder for '%s'\n", avcodec_get_name(codec_id));
|
||||
return status;
|
||||
|
||||
Reference in new issue
Block a user