FS-8876 make function public and use it in conference also
This commit is contained in:
parent
1540546cc1
commit
a2b806c01c
|
@ -2735,6 +2735,8 @@ SWITCH_DECLARE(const char *)switch_version_revision_human(void);
|
|||
SWITCH_DECLARE(const char *)switch_version_full(void);
|
||||
SWITCH_DECLARE(const char *)switch_version_full_human(void);
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_autobind_cpu(void);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
|
|
@ -1486,6 +1486,8 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_write_thread_run(switch_thread_
|
|||
return NULL;
|
||||
}
|
||||
|
||||
switch_core_autobind_cpu();
|
||||
|
||||
while(conference_utils_member_test_flag(member, MFLAG_RUNNING)) {
|
||||
if (switch_queue_pop(member->mux_out_queue, &pop) == SWITCH_STATUS_SUCCESS) {
|
||||
mcu_layer_t *layer = NULL;
|
||||
|
|
|
@ -5147,9 +5147,11 @@ int next_cpu(void)
|
|||
return x;
|
||||
}
|
||||
|
||||
static void bind_cpu(void)
|
||||
SWITCH_DECLARE(void) switch_core_autobind_cpu(void)
|
||||
{
|
||||
switch_core_thread_set_cpu_affinity(next_cpu());
|
||||
if (video_globals.cpu_count > 1) {
|
||||
switch_core_thread_set_cpu_affinity(next_cpu());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -5174,7 +5176,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bind_cpu();
|
||||
switch_core_autobind_cpu();
|
||||
|
||||
if ((var = switch_channel_get_variable(session->channel, "core_video_blank_image"))) {
|
||||
blank_img = switch_img_read_png(var, SWITCH_IMG_FMT_I420);
|
||||
|
|
Loading…
Reference in New Issue