mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 06:09:39 +00:00
Add msfilter-add-fmtp command
This commit is contained in:
parent
9e6bf6dc7e
commit
26afb604c6
4 changed files 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
|
||||
|
||||
|
|
|
|||
19
daemon/commands/msfilter-add-fmtp.cc
Normal file
19
daemon/commands/msfilter-add-fmtp.cc
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#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);
|
||||
}
|
||||
12
daemon/commands/msfilter-add-fmtp.h
Normal file
12
daemon/commands/msfilter-add-fmtp.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#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());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue