Commit 20d20677 authored by Simon Morlat's avatar Simon Morlat Committed by Sylvain Berfini
Browse files

Add a setting to disable video codec checking (we don't need to have a codec...

Add a setting to disable video codec checking (we don't need to have a codec implementation available for doing video switching).
parent 5ac6cbe5
......@@ -1777,18 +1777,20 @@ static PayloadType* find_payload_type_from_list(const char* type, int rate, int
}
static bool_t linphone_core_codec_supported(LinphoneCore *lc, SalStreamType type, const char *mime){
if (type == SalVideo && lp_config_get_int(lc->config, "video", "rtp_io", FALSE)){
return TRUE; /*in rtp io mode, we don't transcode video, thus we can support a format for which we have no encoder nor decoder.*/
} else if (type == SalAudio && lp_config_get_int(lc->config, "sound", "rtp_io", FALSE)){
return TRUE; /*in rtp io mode, we don't transcode video, thus we can support a format for which we have no encoder nor decoder.*/
if (type == SalVideo && lc->codecs_conf.dont_check_video_codec_support){
return TRUE;
} else if (type == SalAudio && lc->codecs_conf.dont_check_audio_codec_support){
return TRUE;
} else if (type == SalText) {
return TRUE;
}
if (lc->video_conf.capture && !lc->video_conf.display) {
return ms_factory_has_encoder(lc->factory, mime);
}
if (lc->video_conf.display && !lc->video_conf.capture) {
return ms_factory_has_decoder(lc->factory, mime);
if (type == SalVideo){
if (lc->video_conf.capture && !lc->video_conf.display) {
return ms_factory_has_encoder(lc->factory, mime);
}
if (lc->video_conf.display && !lc->video_conf.capture) {
return ms_factory_has_decoder(lc->factory, mime);
}
}
return ms_factory_codec_supported(lc->factory, mime);
}
......@@ -1933,6 +1935,12 @@ static void codecs_config_read(LinphoneCore *lc){
lc->codecs_conf.dyn_pt=96;
lc->codecs_conf.telephone_event_pt=lp_config_get_int(lc->config,"misc","telephone_event_pt",101);
/*in rtp io mode, we don't transcode audio, thus we can support a format for which we have no encoder nor decoder.*/
lc->codecs_conf.dont_check_audio_codec_support = lp_config_get_int(lc->config,"sound","rtp_io", FALSE);
/*in rtp io mode, we don't transcode video, thus we can support a format for which we have no encoder nor decoder.*/
lc->codecs_conf.dont_check_video_codec_support = lp_config_get_int(lc->config,"video","rtp_io", FALSE) ||
lp_config_get_int(lc->config, "video", "dont_check_codecs", FALSE);
for (i=0;get_codec(lc,SalAudio,i,&pt);i++){
if (pt){
audio_codecs=codec_append_if_new(audio_codecs, pt);
......
......@@ -320,6 +320,8 @@ struct codecs_config
MSList *text_codecs;
int dyn_pt;
int telephone_event_pt;
int dont_check_audio_codec_support;
int dont_check_video_codec_support;
};
struct video_config{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment