#define MAX_PROFILES 100
typedef struct avcodec_profile_s {
- char name[20];
+ char name[64];
int decoder_thread_count;
AVCodecContext ctx;
switch_event_t *options;
return SWITCH_STATUS_FALSE;
}
- profile = find_profile(get_profile_name(context->av_codec_id), SWITCH_FALSE);
+ if (!zstr(context->codec_settings.video.config_profile_name)) {
+ profile = find_profile(context->codec_settings.video.config_profile_name, SWITCH_FALSE);
+ }
+
+ if (!profile) {
+ profile = find_profile(get_profile_name(context->av_codec_id), SWITCH_FALSE);
+ }
if (!profile) return SWITCH_STATUS_FALSE;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Using config profile: [%s]\n", profile->name);
+
if (context->encoder_ctx) {
if (avcodec_is_open(context->encoder_ctx)) {
avcodec_close(context->encoder_ctx);