mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-msc.git
synced 2025-11-03 05:23:29 +00:00
codec_filter_init: prepare for CSD
Related: OS#4394 Change-Id: I1270b00464456abc5300fd47e6087a0ba6243d03
This commit is contained in:
@@ -52,7 +52,6 @@ struct codec_filter {
|
||||
struct sdp_msg result;
|
||||
};
|
||||
|
||||
void codec_filter_init(struct codec_filter *codec_filter);
|
||||
void codec_filter_set_ran(struct codec_filter *codec_filter, enum osmo_rat_type ran_type);
|
||||
void codec_filter_set_bss(struct codec_filter *codec_filter,
|
||||
const struct gsm0808_speech_codec_list *codec_list_bss_supported);
|
||||
|
||||
@@ -30,4 +30,5 @@
|
||||
#include <osmocom/msc/transaction.h>
|
||||
#include <osmocom/msc/vlr.h>
|
||||
|
||||
void trans_cc_filter_init(struct gsm_trans *trans);
|
||||
void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap);
|
||||
|
||||
@@ -60,11 +60,6 @@ static void sdp_add_all_utran_codecs(struct sdp_audio_codecs *ac)
|
||||
sdp_audio_codecs_add_speech_ver(ac, utran_codecs[i]);
|
||||
}
|
||||
|
||||
void codec_filter_init(struct codec_filter *codec_filter)
|
||||
{
|
||||
*codec_filter = (struct codec_filter){};
|
||||
}
|
||||
|
||||
void codec_filter_set_ran(struct codec_filter *codec_filter, enum osmo_rat_type ran_type)
|
||||
{
|
||||
codec_filter->ran = (struct sdp_audio_codecs){};
|
||||
|
||||
@@ -671,7 +671,7 @@ static int gsm48_cc_rx_setup(struct gsm_trans *trans, struct msgb *msg)
|
||||
}
|
||||
|
||||
/* MO call leg starting, gather all codec information so far known: */
|
||||
codec_filter_init(&trans->cc.codecs);
|
||||
trans_cc_filter_init(trans);
|
||||
codec_filter_set_ran(&trans->cc.codecs, trans->msc_a->c.ran->type);
|
||||
codec_filter_set_bss(&trans->cc.codecs, &trans->msc_a->cc.compl_l3_codec_list_bss_supported);
|
||||
if (setup.fields & MNCC_F_BEARER_CAP)
|
||||
@@ -804,7 +804,7 @@ static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
|
||||
* Initialize the codecs filter with this side's BSS' codec list, received at Complete Layer 3.
|
||||
* We haven't received the MT MS's Bearer Capabilities yet; the Bearer Capabilities handled here are
|
||||
* actually the remote call leg's Bearer Capabilities. */
|
||||
codec_filter_init(&trans->cc.codecs);
|
||||
trans_cc_filter_init(trans);
|
||||
codec_filter_set_ran(&trans->cc.codecs, trans->msc_a->c.ran->type);
|
||||
codec_filter_set_bss(&trans->cc.codecs, &trans->msc_a->cc.compl_l3_codec_list_bss_supported);
|
||||
/* sdp.remote: if SDP is included in the MNCC, take that as definitive list of remote audio codecs. */
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
|
||||
#include <osmocom/msc/transaction_cc.h>
|
||||
|
||||
void trans_cc_filter_init(struct gsm_trans *trans)
|
||||
{
|
||||
trans->cc.codecs = (struct codec_filter){};
|
||||
}
|
||||
|
||||
void trans_cc_filter_set_ms_from_bc(struct gsm_trans *trans, const struct gsm_mncc_bearer_cap *bcap)
|
||||
{
|
||||
trans->cc.codecs.ms = (struct sdp_audio_codecs){0};
|
||||
|
||||
Reference in New Issue
Block a user