mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
FS-7513: add flag to choose between encoding each frame and using central encoder per codec, add parsing for floor fields and reservation fields in layouts, add param to control bandwidth for consolidated codecs, add audio-position attr to images in layout to sync with virtual HRTF
This commit is contained in:
committed by
Michael Jerris
parent
fa5d6af2cd
commit
a56e65bace
@@ -976,6 +976,27 @@ SWITCH_DECLARE(char *) switch_util_quote_shell_arg_pool(const char *string, swit
|
||||
|
||||
#define SWITCH_READ_ACCEPTABLE(status) (status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK || status == SWITCH_STATUS_INUSE)
|
||||
|
||||
static inline uint32_t switch_parse_bandwidth_string(const char *bwv)
|
||||
{
|
||||
uint32_t bw = 0;
|
||||
|
||||
if (!bwv) return 0;
|
||||
|
||||
if (bwv && (bw = (uint32_t) atol(bwv))) {
|
||||
if (bw < 0) return 0;
|
||||
|
||||
if (switch_stristr("KB", bwv)) {
|
||||
bw *= 8;
|
||||
} else if (switch_stristr("mb", bwv)) {
|
||||
bw *= 1024;
|
||||
} else if (switch_stristr("MB", bwv)) {
|
||||
bw *= 8192;
|
||||
}
|
||||
}
|
||||
|
||||
return bw;
|
||||
}
|
||||
|
||||
static inline int switch_needs_url_encode(const char *s)
|
||||
{
|
||||
const char hex[] = "0123456789ABCDEF";
|
||||
|
||||
Reference in New Issue
Block a user