]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11425 add video_codec_config_profile_name to conference to choose a different...
authorSeven Du <dujinfang@x-y-t.cn>
Mon, 1 Oct 2018 14:14:18 +0000 (22:14 +0800)
committerAndrey Volk <andywolk@gmail.com>
Tue, 16 Jul 2019 21:00:11 +0000 (01:00 +0400)
src/mod/applications/mod_conference/conference_video.c
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_conference/mod_conference.h

index 022596a97cbb0968983d9a4e76561e3f3f860c54..ac0be2ccb70507561909ba3c61e807dd1bc65bb5 100644 (file)
@@ -3371,6 +3371,10 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
                                                        canvas->write_codecs[i] = switch_core_alloc(conference->pool, sizeof(codec_set_t));
                                                        canvas->write_codecs_count = i+1;
 
+                                                       if (conference->video_codec_config_profile_name) {
+                                                               switch_set_string(conference->video_codec_settings.video.config_profile_name, conference->video_codec_config_profile_name);
+                                                       }
+
                                                        if (switch_core_codec_copy(check_codec, &canvas->write_codecs[i]->codec,
                                                                                                           &conference->video_codec_settings, conference->pool) == SWITCH_STATUS_SUCCESS) {
                                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
index 7f93e182a121600c2c1d7e39f71c07d9687104d1..4337f8369817cd34deac8a698b4beed6bb49c362 100644 (file)
@@ -2767,6 +2767,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
        int scale_h264_canvas_height = 0;
        int scale_h264_canvas_fps_divisor = 0;
        char *scale_h264_canvas_bandwidth = NULL;
+       char *video_codec_config_profile_name = NULL;
        int tmp;
 
        /* Validate the conference name */
@@ -3136,6 +3137,8 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
                                if (scale_h264_canvas_fps_divisor < 0) scale_h264_canvas_fps_divisor = 0;
                        } else if (!strcasecmp(var, "scale-h264-canvas-bandwidth") && !zstr(val)) {
                                scale_h264_canvas_bandwidth = val;
+                       } else if (!strcasecmp(var, "video-codec-config-profile-name") && !zstr(val)) {
+                               video_codec_config_profile_name = val;
                        }
                }
 
@@ -3203,6 +3206,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
        conference->auto_kps_debounce = auto_kps_debounce;
        switch_event_create_plain(&conference->variables, SWITCH_EVENT_CHANNEL_DATA);
        conference->conference_video_mode = conference_video_mode;
+       conference->video_codec_config_profile_name = switch_core_strdup(conference->pool, video_codec_config_profile_name);
 
        conference->scale_h264_canvas_width = scale_h264_canvas_width;
        conference->scale_h264_canvas_height = scale_h264_canvas_height;
index 76b2b97b72cc0f23d284942ad5f66178f1555f00..5440dd98824d6b21ad4af2793cb7193f756521cc 100644 (file)
@@ -759,6 +759,7 @@ typedef struct conference_obj {
        uint32_t floor_holder_score_iir;
        char *default_layout_name;
        int mux_paused;
+       char *video_codec_config_profile_name;
 } conference_obj_t;
 
 /* Relationship with another member */