Commit 26afb604 authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Add msfilter-add-fmtp command

parent 9e6bf6dc
No related merge requests found
Showing with 54 additions and 19 deletions
......@@ -15,6 +15,7 @@ linphone_daemon_SOURCES=daemon.cc \
commands/call-stats.cc \
commands/call-status.cc \
commands/help.cc \
commands/msfilter-add-fmtp.cc \
commands/pop-event.cc \
commands/ptime.cc \
commands/register.cc \
......@@ -23,25 +24,26 @@ linphone_daemon_SOURCES=daemon.cc \
commands/unregister.cc \
commands/quit.cc \
daemon.h \
commands/answer.h \
commands/audio-codec-disable.h \
commands/audio-codec-enable.h \
commands/audio-codec-get.h \
commands/audio-codec-move.h \
commands/audio-codec-set.h \
commands/audio-stream-start.h \
commands/audio-stream-stop.h \
commands/call.h \
commands/call-stats.h \
commands/call-status.h \
commands/help.h \
commands/pop-event.h \
commands/ptime.h \
commands/register.h \
commands/register-status.h \
commands/terminate.h \
commands/unregister.h \
commands/quit.h
commands/answer.h \
commands/audio-codec-disable.h \
commands/audio-codec-enable.h \
commands/audio-codec-get.h \
commands/audio-codec-move.h \
commands/audio-codec-set.h \
commands/audio-stream-start.h \
commands/audio-stream-stop.h \
commands/call.h \
commands/call-stats.h \
commands/call-status.h \
commands/help.h \
commands/msfilter-add-fmtp.h \
commands/pop-event.h \
commands/ptime.h \
commands/register.h \
commands/register-status.h \
commands/terminate.h \
commands/unregister.h \
commands/quit.h
linphone_daemon_pipetest_SOURCES=daemon-pipetest.c
......
#include "msfilter-add-fmtp.h"
#include <mediastreamer2/msfilter.h>
#include <private.h>
using namespace std;
MSFilterAddFmtpCommand::MSFilterAddFmtpCommand() :
DaemonCommand("msfilter-add-fmtp", "msfilter-add-fmtp <fmtp>", "Add fmtp to current encoder") {
}
void MSFilterAddFmtpCommand::exec(Daemon *app, const char *args) {
LinphoneCore *lc = app->getCore();
LinphoneCall *call = linphone_core_get_current_call(lc);
if (call == NULL) {
app->sendResponse(Response("No current call available."));
return;
}
ms_filter_call_method(call->audiostream->encoder, MS_FILTER_ADD_FMTP, (void*) args);
}
#ifndef COMMAND_MSFILTER_ADD_FMTP
#define COMMAND_MSFILTER_ADD_FMTP
#include "../daemon.h"
class MSFilterAddFmtpCommand : public DaemonCommand {
public:
MSFilterAddFmtpCommand();
virtual void exec(Daemon *app, const char *args);
};
#endif /* COMMAND_MSFILTER_ADD_FMTP */
......@@ -22,6 +22,7 @@
#include "commands/call-stats.h"
#include "commands/call-status.h"
#include "commands/help.h"
#include "commands/msfilter-add-fmtp.h"
#include "commands/pop-event.h"
#include "commands/ptime.h"
#include "commands/register.h"
......@@ -297,6 +298,7 @@ void Daemon::initCommands() {
mCommands.push_back(new AudioCodecSetCommand());
mCommands.push_back(new AudioStreamStartCommand());
mCommands.push_back(new AudioStreamStopCommand());
mCommands.push_back(new MSFilterAddFmtpCommand());
mCommands.push_back(new PtimeCommand());
mCommands.push_back(new QuitCommand());
mCommands.push_back(new HelpCommand());
......
Supports Markdown
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