diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 8c9397246..5369b324e 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -55,7 +55,8 @@ linphone_daemon_SOURCES=daemon.cc \ commands/terminate.h \ commands/unregister.h \ commands/quit.h \ - commands/version.h + commands/version.h \ + commands/jitterbuffer.cc commands/jitterbuffer.h linphone_daemon_pipetest_SOURCES=daemon-pipetest.c diff --git a/daemon/daemon.cc b/daemon/daemon.cc index f445098a2..7ce285565 100644 --- a/daemon/daemon.cc +++ b/daemon/daemon.cc @@ -14,6 +14,7 @@ #include "daemon.h" #include "commands/adaptive-jitter-compensation.h" +#include "commands/jitterbuffer.h" #include "commands/answer.h" #include "commands/audio-codec-get.h" #include "commands/audio-codec-move.h" @@ -279,6 +280,7 @@ Daemon::Daemon(const char *config_path, const char *factory_config_path, const c linphone_core_set_user_data(mLc, this); linphone_core_enable_video(mLc, capture_video, display_video); initCommands(); + mUseStatsEvents=true; } const list &Daemon::getCommandList() const { @@ -376,6 +378,8 @@ void Daemon::initCommands() { mCommands.push_back(new MediaEncryptionCommand()); mCommands.push_back(new PortCommand()); mCommands.push_back(new AdaptiveBufferCompensationCommand()); + mCommands.push_back(new JitterBufferCommand()); + mCommands.push_back(new JitterBufferResetCommand()); mCommands.push_back(new VersionCommand()); mCommands.push_back(new QuitCommand()); mCommands.push_back(new HelpCommand()); @@ -421,7 +425,7 @@ void Daemon::callStateChanged(LinphoneCall *call, LinphoneCallState state, const } void Daemon::callStatsUpdated(LinphoneCall *call, const LinphoneCallStats *stats) { - mEventQueue.push(new CallStatsResponse(this, call, stats, true)); + if (mUseStatsEvents) mEventQueue.push(new CallStatsResponse(this, call, stats, true)); } void Daemon::dtmfReceived(LinphoneCall *call, int dtmf) { @@ -623,6 +627,7 @@ static void printHelp() { "\t--log \t\tSupply a file where the log will be saved\n" "\t--factory-config \tSupply a readonly linphonerc style config file to start with.\n" "\t--config \t\tSupply a linphonerc style config file to start with.\n" + "\t--disable-stats-events\t\tDo not automatically raise RTP statistics events.\n" "\t-C\t\t\tenable video capture.\n" "\t-D\t\t\tenable video display.\n"); } @@ -678,6 +683,10 @@ void Daemon::quit() { mRunning = false; } +void Daemon::enableStatsEvents(bool enabled){ + mUseStatsEvents=enabled; +} + Daemon::~Daemon() { uninitCommands(); @@ -712,6 +721,7 @@ int main(int argc, char *argv[]) { const char *log_file = NULL; bool capture_video = false; bool display_video = false; + bool nostats=FALSE; int i; for (i = 1; i < argc; ++i) { @@ -757,9 +767,12 @@ int main(int argc, char *argv[]) { capture_video = true; } else if (strcmp(argv[i], "-D") == 0) { display_video = true; + }else if (strcmp(argv[i],"--disable-stats-events")==0){ + nostats=TRUE; } } Daemon app(config_path, factory_config_path, log_file, pipe_name, display_video, capture_video); + app.enableStatsEvents(!nostats); return app.run(); } ; diff --git a/daemon/daemon.h b/daemon/daemon.h index 10a648485..5d0078d0e 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -181,6 +181,7 @@ public: int updateAudioStreamId(AudioStream *audio_stream); void dumpCommandsHelp(); void dumpCommandsHelpHtml(); + void enableStatsEvents(bool enabled); private: static void* iterateThread(void *arg); static void callStateChanged(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState state, const char *msg); @@ -204,6 +205,7 @@ private: int mChildFd; std::string mHistfile; bool mRunning; + bool mUseStatsEvents; FILE *mLogFile; int mCallIds; int mProxyIds; diff --git a/mediastreamer2 b/mediastreamer2 index 243cc4d3d..b50d3b3a0 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 243cc4d3da14b68bb7d2919c93475c122995dfc7 +Subproject commit b50d3b3a047ce9e071840fd3ffa53a7f24a2fefd