[core] add audio channels limit when opening files, configurable through switch.conf.xml (param "max-audio-channels"), add unit-test.

This commit is contained in:
Dragos Oancea
2020-01-27 15:39:59 +00:00
parent e94d8cfdfc
commit c1b66f650f
7 changed files with 71 additions and 1 deletions
+1
View File
@@ -314,6 +314,7 @@ struct switch_runtime {
int events_use_dispatch;
uint32_t port_alloc_flags;
char *event_channel_key_separator;
uint32_t max_audio_channels;
};
extern struct switch_runtime runtime;
+1
View File
@@ -2702,6 +2702,7 @@ SWITCH_DECLARE(const char *) switch_core_banner(void);
SWITCH_DECLARE(switch_bool_t) switch_core_session_in_thread(switch_core_session_t *session);
SWITCH_DECLARE(uint32_t) switch_default_ptime(const char *name, uint32_t number);
SWITCH_DECLARE(uint32_t) switch_default_rate(const char *name, uint32_t number);
SWITCH_DECLARE(uint32_t) switch_core_max_audio_channels(uint32_t limit);
/*!
\brief Add user registration