Fixing rtp_io problem for sound in linphone-daemon.

Adding warning message when using unknown options with linphone-daemon
This commit is contained in:
Sandrine Avakian 2016-11-22 17:18:36 +01:00
parent 045224cd91
commit 6db2415a51
3 changed files with 9 additions and 1 deletions

View file

@ -1187,6 +1187,8 @@ 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.*/
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.*/
} else if (type == SalText) {
return TRUE;
}

View file

@ -159,8 +159,11 @@ AutoVideo::AutoVideo():
void AutoVideo::exec(Daemon* app, const char* args)
{
bool enable = (strcmp(args,"on") == 0);
LinphoneCore *lc = app->getCore();
LinphoneVideoPolicy vpol = {TRUE, TRUE};
bool enable = (strcmp(args,"on") == 0);
linphone_core_set_video_policy(lc, &vpol);
app->setAutoVideo(enable);
app->sendResponse(Response(enable?"Auto video ON":
"Auto video OFF", Response::Ok));

View file

@ -925,6 +925,9 @@ int main(int argc, char *argv[]) {
} else if (strcmp(argv[i], "--enable-lsd") == 0) {
lsd_enabled = true;
}
else{
fprintf(stderr, "Unrecognized option : %s", argv[i]);
}
}
Daemon app(config_path, factory_config_path, log_file, pipe_name, display_video, capture_video);
app.enableStatsEvents(stats_enabled);