From ff052dee590128f3b0e7dc393a0d3eb54264d70b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 2 Mar 2015 15:31:26 +0100 Subject: [PATCH] add command to set bitrate --- daemon/commands/audio-codec-set.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/commands/audio-codec-set.cc b/daemon/commands/audio-codec-set.cc index db89ef366..5e9d2935a 100644 --- a/daemon/commands/audio-codec-set.cc +++ b/daemon/commands/audio-codec-set.cc @@ -10,7 +10,7 @@ using namespace std; AudioCodecSetCommand::AudioCodecSetCommand() : DaemonCommand("audio-codec-set", "audio-codec-set ", - "Set a property (number, clock_rate, recv_fmtp, send_fmtp) of a codec. Numbering of payload type is automatically performed at startup, any change will be lost after restart.\n" + "Set a property (number, clock_rate, recv_fmtp, send_fmtp, bitrate (in kbps/s)) of a codec. Numbering of payload type is automatically performed at startup, any change will be lost after restart.\n" " is of the form mime/rate/channels, eg. speex/16000/1") { addExample(new DaemonCommandExample("audio-codec-set 9 number 18", "Status: Ok\n\n" @@ -113,6 +113,9 @@ void AudioCodecSetCommand::exec(Daemon *app, const char *args) { } return; } + } else if (param.compare("bitrate") == 0) { + linphone_core_set_payload_type_bitrate(app->getCore(), payload, atoi(value.c_str())); + handled=true; } if (handled) { app->sendResponse(PayloadTypeResponse(app->getCore(), payload, parser.getPosition()));