Merge pull request #43 in FS/freeswitch from ~GIAVAC/freeswitch:master to master
* commit '9215c9382714e04c5dfae40aaad2f0dfef259dfc': FS-6785 - pass and use sample rate in switch_core_session_get_payload_code()
This commit is contained in:
commit
61a3997b26
|
@ -255,6 +255,7 @@ SWITCH_DECLARE(void) switch_core_session_clear_crypto(switch_core_session_t *ses
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session,
|
SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session,
|
||||||
switch_media_type_t type,
|
switch_media_type_t type,
|
||||||
const char *iananame,
|
const char *iananame,
|
||||||
|
uint32_t rate,
|
||||||
switch_payload_t *ptP,
|
switch_payload_t *ptP,
|
||||||
switch_payload_t *recv_ptP,
|
switch_payload_t *recv_ptP,
|
||||||
char **fmtpP);
|
char **fmtpP);
|
||||||
|
|
|
@ -516,6 +516,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_process_t38_passthru(switch_co
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session,
|
SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core_session_t *session,
|
||||||
switch_media_type_t type,
|
switch_media_type_t type,
|
||||||
const char *iananame,
|
const char *iananame,
|
||||||
|
uint32_t rate,
|
||||||
switch_payload_t *ptP,
|
switch_payload_t *ptP,
|
||||||
switch_payload_t *recv_ptP,
|
switch_payload_t *recv_ptP,
|
||||||
char **fmtpP)
|
char **fmtpP)
|
||||||
|
@ -540,7 +541,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core
|
||||||
|
|
||||||
if (!pmap->allocated) continue;
|
if (!pmap->allocated) continue;
|
||||||
|
|
||||||
if (!strcasecmp(pmap->iananame, iananame)) {
|
if (!strcasecmp(pmap->iananame, iananame) && (!rate || (rate == pmap->rate))) {
|
||||||
pt = pmap->pt;
|
pt = pmap->pt;
|
||||||
recv_pt = pmap->recv_pt;
|
recv_pt = pmap->recv_pt;
|
||||||
fmtp = pmap->rm_fmtp;
|
fmtp = pmap->rm_fmtp;
|
||||||
|
@ -6229,7 +6230,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
||||||
if (orig_session &&
|
if (orig_session &&
|
||||||
switch_core_session_get_payload_code(orig_session,
|
switch_core_session_get_payload_code(orig_session,
|
||||||
imp->codec_type == SWITCH_CODEC_TYPE_AUDIO ? SWITCH_MEDIA_TYPE_AUDIO : SWITCH_MEDIA_TYPE_VIDEO,
|
imp->codec_type == SWITCH_CODEC_TYPE_AUDIO ? SWITCH_MEDIA_TYPE_AUDIO : SWITCH_MEDIA_TYPE_VIDEO,
|
||||||
imp->iananame, &orig_pt, NULL, &orig_fmtp) == SWITCH_STATUS_SUCCESS) {
|
imp->iananame, imp->samples_per_second, &orig_pt, NULL, &orig_fmtp) == SWITCH_STATUS_SUCCESS) {
|
||||||
smh->ianacodes[i] = orig_pt;
|
smh->ianacodes[i] = orig_pt;
|
||||||
|
|
||||||
if (orig_fmtp) {
|
if (orig_fmtp) {
|
||||||
|
|
Loading…
Reference in New Issue