cp->has_video=enabled;
}
+const PayloadType* linphone_call_params_get_used_audio_codec(const LinphoneCallParams *cp) {
+ return cp->audio_codec;
+}
+
+const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams *cp) {
+ return cp->video_codec;
+}
+
/**
* Returns whether video is enabled.
**/
bool_t use_ec;
if (used_pt!=-1){
+ call->current_params.audio_codec = rtp_profile_get_payload(call->audio_profile, used_pt);
if (playcard==NULL) {
ms_warning("No card defined for playback !");
}
const char *addr=vstream->addr[0]!='\0' ? vstream->addr : call->resultdesc->addr;
call->video_profile=make_profile(call,call->resultdesc,vstream,&used_pt);
if (used_pt!=-1){
+ call->current_params.video_codec = rtp_profile_get_payload(call->video_profile, used_pt);
VideoStreamDir dir=VideoStreamSendRecv;
MSWebCam *cam=lc->video_conf.device;
bool_t is_inactive=FALSE;
void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_muted, bool_t send_ringbacktone){
LinphoneCore *lc=call->core;
+
+ call->current_params.audio_codec = NULL;
+ call->current_params.video_codec = NULL;
+
LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
char *cname;
bool_t use_arc=linphone_core_adaptive_rate_control_enabled(lc);
struct _LinphoneCallParams;
typedef struct _LinphoneCallParams LinphoneCallParams;
+const PayloadType* linphone_call_params_get_used_audio_codec(const LinphoneCallParams *cp);
+const PayloadType* linphone_call_params_get_used_video_codec(const LinphoneCallParams *cp);
LinphoneCallParams * linphone_call_params_copy(const LinphoneCallParams *cp);
void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled);
bool_t linphone_call_params_video_enabled(const LinphoneCallParams *cp);
int linphone_core_set_video_codecs(LinphoneCore *lc, MSList *codecs);
-bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, PayloadType *pt);
+bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt);
int linphone_core_enable_payload_type(LinphoneCore *lc, PayloadType *pt, bool_t enable);
PayloadType* linphone_core_find_payload_type(LinphoneCore* lc, const char* type, int rate) ;
-int linphone_core_get_payload_type_number(LinphoneCore *lc, PayloadType *pt);
+int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt);
const char *linphone_core_get_payload_type_description(LinphoneCore *lc, PayloadType *pt);
else payload_type_unset_flag(pt,PAYLOAD_TYPE_ENABLED);
}
-static bool_t payload_type_enabled(PayloadType *pt) {
+static bool_t payload_type_enabled(const PayloadType *pt) {
return (((pt)->flags & PAYLOAD_TYPE_ENABLED)!=0);
}
-bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, PayloadType *pt){
- if (ms_list_find(lc->codecs_conf.audio_codecs,pt) || ms_list_find(lc->codecs_conf.video_codecs,pt)){
+bool_t linphone_core_payload_type_enabled(LinphoneCore *lc, const PayloadType *pt){
+ if (ms_list_find(lc->codecs_conf.audio_codecs, (PayloadType*) pt) || ms_list_find(lc->codecs_conf.video_codecs, (PayloadType*)pt)){
return payload_type_enabled(pt);
}
ms_error("Getting enablement status of codec not in audio or video list of PayloadType !");
return -1;
}
-int linphone_core_get_payload_type_number(LinphoneCore *lc, PayloadType *pt){
+int linphone_core_get_payload_type_number(LinphoneCore *lc, const PayloadType *pt){
return payload_type_get_number(pt);
}
LinphoneCall *referer; /*in case this call creation is consecutive to an incoming transfer, this points to the original call */
int audio_bw; /* bandwidth limit for audio stream */
LinphoneMediaEncryption media_encryption;
+ PayloadType *audio_codec;
+ PayloadType *video_codec;
bool_t has_video;
bool_t real_early_media; /*send real media even during early media (for outgoing calls)*/
bool_t in_conference; /*in conference mode */