From 36e0124a9bfc78779588c09277f14f273fffc916 Mon Sep 17 00:00:00 2001 From: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Wed, 30 Apr 2014 13:06:04 -0400 Subject: [PATCH] daemon: rename VideoControls to VideoManager This patch renames the VideoControls class to VideoManager, for consistency with the other client's *Manager classes. Refs #46643 Change-Id: If98730f666a5375f73d2d86c6e3be9f4970c81bd --- daemon/src/client/Makefile.am | 4 +- daemon/src/client/client.cpp | 8 +-- daemon/src/client/client.h | 6 +-- daemon/src/client/dbus/Makefile.am | 8 +-- daemon/src/client/dbus/client.cpp | 14 ++--- ...trospec.xml => videomanager-introspec.xml} | 4 +- ...deo_controls.cpp => videomanager_dbus.cpp} | 52 +++++++++---------- .../{video_controls.h => videomanager.h} | 16 +++--- ...ontrols_stub.cpp => videomanager_stub.cpp} | 22 ++++---- daemon/src/conference.cpp | 2 +- daemon/src/managerimpl.cpp | 12 ++--- daemon/src/managerimpl.h | 2 +- daemon/src/sip/sipcall.cpp | 4 +- daemon/src/sip/sipvoiplink.cpp | 2 +- daemon/src/video/video_input.cpp | 6 +-- daemon/src/video/video_input_selector.cpp | 4 +- daemon/src/video/video_mixer.cpp | 10 ++-- daemon/src/video/video_receive_thread.cpp | 8 +-- daemon/src/video/video_rtp_session.cpp | 6 +-- daemon/src/video/video_sender.cpp | 2 +- daemon/src/video/video_v4l2_list.cpp | 6 +-- 21 files changed, 99 insertions(+), 99 deletions(-) rename daemon/src/client/dbus/{video_controls-introspec.xml => videomanager-introspec.xml} (97%) rename daemon/src/client/dbus/{video_controls.cpp => videomanager_dbus.cpp} (77%) rename daemon/src/client/{video_controls.h => videomanager.h} (94%) rename daemon/src/client/{videocontrols_stub.cpp => videomanager_stub.cpp} (75%) diff --git a/daemon/src/client/Makefile.am b/daemon/src/client/Makefile.am index 6708dc215b..b84213ff39 100644 --- a/daemon/src/client/Makefile.am +++ b/daemon/src/client/Makefile.am @@ -13,8 +13,8 @@ noinst_HEADERS += presencemanager.h endif if SFL_VIDEO -VIDEO_STUB = videocontrols_stub.cpp -noinst_HEADERS += video_controls.h +VIDEO_STUB = videomanager_stub.cpp +noinst_HEADERS += videomanager.h endif if USE_DBUS diff --git a/daemon/src/client/client.cpp b/daemon/src/client/client.cpp index 50ca660969..c4f4d07bfb 100644 --- a/daemon/src/client/client.cpp +++ b/daemon/src/client/client.cpp @@ -49,7 +49,7 @@ Client::Client() : callManager_(new CallManager) , dispatcher_(0) #endif #ifdef SFL_VIDEO - , videoControls_(0) + , videoManager_(0) #endif #ifdef USE_NETWORKMANAGER , networkManager_(0) @@ -62,7 +62,7 @@ Client::~Client() delete networkManager_; #endif #ifdef SFL_VIDEO - delete videoControls_; + delete videoManager_; #endif #if HAVE_DBUS delete dispatcher_; @@ -103,8 +103,8 @@ PresenceManager * Client::getPresenceManager() #endif #ifdef SFL_VIDEO -VideoControls * Client::getVideoControls() +VideoManager * Client::getVideoManager() { - return videoControls_; + return videoManager_; } #endif diff --git a/daemon/src/client/client.h b/daemon/src/client/client.h index a7f09fe03a..410c84c693 100644 --- a/daemon/src/client/client.h +++ b/daemon/src/client/client.h @@ -46,7 +46,7 @@ class PresenceManager; #endif #ifdef SFL_VIDEO -class VideoControls; +class VideoManager; #endif #if HAVE_DBUS @@ -69,7 +69,7 @@ class Client { #endif #ifdef SFL_VIDEO - VideoControls* getVideoControls(); + VideoManager* getVideoManager(); #endif int event_loop(); @@ -87,7 +87,7 @@ class Client { DBus::BusDispatcher* dispatcher_; #endif #ifdef SFL_VIDEO - VideoControls *videoControls_; + VideoManager *videoManager_; #endif #if USE_NETWORKMANAGER NetworkManager* networkManager_; diff --git a/daemon/src/client/dbus/Makefile.am b/daemon/src/client/dbus/Makefile.am index 7db4a433c5..2e3b46364f 100644 --- a/daemon/src/client/dbus/Makefile.am +++ b/daemon/src/client/dbus/Makefile.am @@ -14,8 +14,8 @@ presencemanager-glue.h: presencemanager-introspec.xml Makefile.am endif if SFL_VIDEO -BUILT_SOURCES+=video_controls-glue.h -video_controls-glue.h: video_controls-introspec.xml Makefile.am +BUILT_SOURCES+=videomanager-glue.h +videomanager-glue.h: videomanager-introspec.xml Makefile.am dbusxx-xml2cpp $< --adaptor=$@ endif @@ -42,7 +42,7 @@ libclient_dbus_la_SOURCES += presencemanager_dbus.cpp endif if SFL_VIDEO -libclient_dbus_la_SOURCES += video_controls.cpp +libclient_dbus_la_SOURCES += videomanager_dbus.cpp endif if USE_NETWORKMANAGER @@ -83,7 +83,7 @@ EXTRA_DIST += presencemanager-introspec.xml endif if SFL_VIDEO -EXTRA_DIST += video_controls-introspec.xml +EXTRA_DIST += videomanager-introspec.xml endif CLEANFILES= \ diff --git a/daemon/src/client/dbus/client.cpp b/daemon/src/client/dbus/client.cpp index 8e7fa2c929..93e507cfc1 100644 --- a/daemon/src/client/dbus/client.cpp +++ b/daemon/src/client/dbus/client.cpp @@ -50,7 +50,7 @@ #endif #ifdef SFL_VIDEO -#include "video_controls.h" +#include "videomanager.h" #endif struct DummyCallback : DBus::Callback_Base<void, DBus::DefaultTimeout&> @@ -66,7 +66,7 @@ Client::Client() : callManager_(0) , instanceManager_(0) , dispatcher_(new DBus::BusDispatcher) #ifdef SFL_VIDEO - , videoControls_(0) + , videoManager_(0) #endif #ifdef USE_NETWORKMANAGER , networkManager_(0) @@ -103,7 +103,7 @@ Client::Client() : callManager_(0) instanceManager_ = new Instance(sessionConnection); #ifdef SFL_VIDEO - videoControls_ = new VideoControls(sessionConnection); + videoManager_ = new VideoManager(sessionConnection); #endif #ifdef USE_NETWORKMANAGER @@ -128,7 +128,7 @@ Client::~Client() delete networkManager_; #endif #ifdef SFL_VIDEO - delete videoControls_; + delete videoManager_; #endif delete instanceManager_; #ifdef SFL_PRESENCE @@ -189,9 +189,9 @@ Client::getPresenceManager() #endif #ifdef SFL_VIDEO -VideoControls* -Client::getVideoControls() +VideoManager* +Client::getVideoManager() { - return videoControls_; + return videoManager_; } #endif diff --git a/daemon/src/client/dbus/video_controls-introspec.xml b/daemon/src/client/dbus/videomanager-introspec.xml similarity index 97% rename from daemon/src/client/dbus/video_controls-introspec.xml rename to daemon/src/client/dbus/videomanager-introspec.xml index 16cad00957..170733ab9d 100644 --- a/daemon/src/client/dbus/video_controls-introspec.xml +++ b/daemon/src/client/dbus/videomanager-introspec.xml @@ -1,6 +1,6 @@ <?xml version="1.0" ?> -<node name="/video_controls-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> - <interface name="org.sflphone.SFLphone.VideoControls"> +<node name="/videomanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> + <interface name="org.sflphone.SFLphone.VideoManager"> <!-- Video device methods --> <method name="getDeviceList" tp:name-for-bindings="getDeviceList"> diff --git a/daemon/src/client/dbus/video_controls.cpp b/daemon/src/client/dbus/videomanager_dbus.cpp similarity index 77% rename from daemon/src/client/dbus/video_controls.cpp rename to daemon/src/client/dbus/videomanager_dbus.cpp index 29f3930e41..154cecb085 100644 --- a/daemon/src/client/dbus/video_controls.cpp +++ b/daemon/src/client/dbus/videomanager_dbus.cpp @@ -30,7 +30,7 @@ * as that of the covered work. */ -#include "video_controls.h" +#include "videomanager.h" #include "video/libav_utils.h" #include "video/video_input_selector.h" #include "account.h" @@ -38,10 +38,10 @@ #include "manager.h" namespace { -const char * const SERVER_PATH = "/org/sflphone/SFLphone/VideoControls"; +const char * const SERVER_PATH = "/org/sflphone/SFLphone/VideoManager"; } -VideoControls::VideoControls(DBus::Connection& connection) : +VideoManager::VideoManager(DBus::Connection& connection) : DBus::ObjectAdaptor(connection, SERVER_PATH) , videoInputSelector_() , videoPreference_() @@ -52,13 +52,13 @@ VideoControls::VideoControls(DBus::Connection& connection) : } VideoPreference & -VideoControls::getVideoPreferences() +VideoManager::getVideoPreferences() { return videoPreference_; } std::vector<std::map<std::string, std::string> > -VideoControls::getCodecs(const std::string &accountID) +VideoManager::getCodecs(const std::string &accountID) { Account *acc = Manager::instance().getAccount(accountID); @@ -69,7 +69,7 @@ VideoControls::getCodecs(const std::string &accountID) } void -VideoControls::setCodecs(const std::string& accountID, +VideoManager::setCodecs(const std::string& accountID, const std::vector<std::map<std::string, std::string> > &details) { Account *acc = Manager::instance().getAccount(accountID); @@ -80,90 +80,90 @@ VideoControls::setCodecs(const std::string& accountID, } std::vector<std::string> -VideoControls::getDeviceList() +VideoManager::getDeviceList() { return videoPreference_.getDeviceList(); } std::vector<std::string> -VideoControls::getDeviceChannelList(const std::string &dev) +VideoManager::getDeviceChannelList(const std::string &dev) { return videoPreference_.getChannelList(dev); } std::vector<std::string> -VideoControls::getDeviceSizeList(const std::string &dev, const std::string &channel) +VideoManager::getDeviceSizeList(const std::string &dev, const std::string &channel) { return videoPreference_.getSizeList(dev, channel); } std::vector<std::string> -VideoControls::getDeviceRateList(const std::string &dev, const std::string &channel, const std::string &size) +VideoManager::getDeviceRateList(const std::string &dev, const std::string &channel, const std::string &size) { return videoPreference_.getRateList(dev, channel, size); } std::string -VideoControls::getActiveDevice() +VideoManager::getActiveDevice() { return videoPreference_.getDevice(); } std::string -VideoControls::getActiveDeviceChannel() +VideoManager::getActiveDeviceChannel() { return videoPreference_.getChannel(); } std::string -VideoControls::getActiveDeviceSize() +VideoManager::getActiveDeviceSize() { return videoPreference_.getSize(); } std::string -VideoControls::getActiveDeviceRate() +VideoManager::getActiveDeviceRate() { return videoPreference_.getRate(); } void -VideoControls::setActiveDevice(const std::string &device) +VideoManager::setActiveDevice(const std::string &device) { DEBUG("Setting device to %s", device.c_str()); videoPreference_.setDevice(device); } void -VideoControls::setActiveDeviceChannel(const std::string &channel) +VideoManager::setActiveDeviceChannel(const std::string &channel) { videoPreference_.setChannel(channel); } void -VideoControls::setActiveDeviceSize(const std::string &size) +VideoManager::setActiveDeviceSize(const std::string &size) { videoPreference_.setSize(size); } void -VideoControls::setActiveDeviceRate(const std::string &rate) +VideoManager::setActiveDeviceRate(const std::string &rate) { videoPreference_.setRate(rate); } std::map<std::string, std::string> -VideoControls::getSettingsFor(const std::string& device) { +VideoManager::getSettingsFor(const std::string& device) { return videoPreference_.getSettingsFor(device); } std::map<std::string, std::string> -VideoControls::getSettings() { +VideoManager::getSettings() { return videoPreference_.getSettings(); } void -VideoControls::startCamera() +VideoManager::startCamera() { inputClients_++; if (hasCameraStarted()) { @@ -176,7 +176,7 @@ VideoControls::startCamera() } void -VideoControls::stopCamera() +VideoManager::stopCamera() { if (hasCameraStarted()) { DEBUG("Stopping video preview"); @@ -189,7 +189,7 @@ VideoControls::stopCamera() } bool -VideoControls::switchInput(const std::string &resource) +VideoManager::switchInput(const std::string &resource) { if (not hasCameraStarted()) { ERROR("Input selector not initialized"); @@ -200,20 +200,20 @@ VideoControls::switchInput(const std::string &resource) } std::weak_ptr<sfl_video::VideoFrameActiveWriter> -VideoControls::getVideoCamera() +VideoManager::getVideoCamera() { return videoInputSelector_; } bool -VideoControls::hasCameraStarted() +VideoManager::hasCameraStarted() { // see http://stackoverflow.com/a/7580064/21185 return static_cast<bool>(videoInputSelector_); } std::string -VideoControls::getCurrentCodecName(const std::string & /*callID*/) +VideoManager::getCurrentCodecName(const std::string & /*callID*/) { return ""; } diff --git a/daemon/src/client/video_controls.h b/daemon/src/client/videomanager.h similarity index 94% rename from daemon/src/client/video_controls.h rename to daemon/src/client/videomanager.h index 518239a449..dca62f709d 100644 --- a/daemon/src/client/video_controls.h +++ b/daemon/src/client/videomanager.h @@ -27,8 +27,8 @@ * as that of the covered work. */ -#ifndef VIDEO_CONTROLS_H_ -#define VIDEO_CONTROLS_H_ +#ifndef VIDEOMANAGER_H_ +#define VIDEOMANAGER_H_ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,7 +44,7 @@ #pragma GCC diagnostic ignored "-Wignored-qualifiers" #pragma GCC diagnostic ignored "-Wunused-parameter" -#include "dbus/video_controls-glue.h" +#include "dbus/videomanager-glue.h" #pragma GCC diagnostic warning "-Wignored-qualifiers" #pragma GCC diagnostic warning "-Wunused-parameter" @@ -60,9 +60,9 @@ #include "video/video_base.h" #include "video/video_input_selector.h" -class VideoControls +class VideoManager #if HAVE_DBUS - : public org::sflphone::SFLphone::VideoControls_adaptor, + : public org::sflphone::SFLphone::VideoManager_adaptor, public DBus::IntrospectableAdaptor, public DBus::ObjectAdaptor #endif @@ -75,9 +75,9 @@ class VideoControls public: #if HAVE_DBUS - VideoControls(DBus::Connection& connection); + VideoManager(DBus::Connection& connection); #else - VideoControls(); + VideoManager(); #endif VideoPreference &getVideoPreferences(); @@ -148,4 +148,4 @@ class VideoControls #endif // !HAVE_DBUS }; -#endif // VIDEO_CONTROLS_H_ +#endif // VIDEOMANAGER_H_ diff --git a/daemon/src/client/videocontrols_stub.cpp b/daemon/src/client/videomanager_stub.cpp similarity index 75% rename from daemon/src/client/videocontrols_stub.cpp rename to daemon/src/client/videomanager_stub.cpp index 62b0fa3b3a..c6ff700c6b 100644 --- a/daemon/src/client/videocontrols_stub.cpp +++ b/daemon/src/client/videomanager_stub.cpp @@ -30,47 +30,47 @@ #warning Using a stub file will produce a non working application -#include "client/video_controls.h" +#include "client/videomanager.h" -VideoControls::VideoControls() +VideoManager::VideoManager() {} -VideoPreference& VideoControls::getVideoPreferences() +VideoPreference& VideoManager::getVideoPreferences() { } -void VideoControls::deviceEvent() +void VideoManager::deviceEvent() { } -void VideoControls::startedDecoding(const std::string &id, const std::string, +void VideoManager::startedDecoding(const std::string &id, const std::string, int w, int h) { } -void VideoControls::stoppedDecoding(const std::string &id, const std::string) +void VideoManager::stoppedDecoding(const std::string &id, const std::string) { } -std::map<std::string, std::string> VideoControls::getSettings() +std::map<std::string, std::string> VideoManager::getSettings() { return std::map<std::string, std::string>(); } -bool VideoControls::hasCameraStarted() +bool VideoManager::hasCameraStarted() { return false; } -void VideoControls::startCamera() +void VideoManager::startCamera() { } -void VideoControls::stopCamera() +void VideoManager::stopCamera() { } -std::weak_ptr<sfl_video::VideoFrameActiveWriter> VideoControls::getVideoCamera() +std::weak_ptr<sfl_video::VideoFrameActiveWriter> VideoManager::getVideoCamera() { return std::weak_ptr<sfl_video::VideoFrameActiveWriter>(); } diff --git a/daemon/src/conference.cpp b/daemon/src/conference.cpp index d098495ba2..49d96d9b93 100644 --- a/daemon/src/conference.cpp +++ b/daemon/src/conference.cpp @@ -39,7 +39,7 @@ #ifdef SFL_VIDEO #include "sip/sipvoiplink.h" #include "sip/sipcall.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #include "video/video_input.h" #endif diff --git a/daemon/src/managerimpl.cpp b/daemon/src/managerimpl.cpp index 4d29a100f3..25880421aa 100644 --- a/daemon/src/managerimpl.cpp +++ b/daemon/src/managerimpl.cpp @@ -74,7 +74,7 @@ #include "client/callmanager.h" #ifdef SFL_VIDEO -#include "client/video_controls.h" +#include "client/videomanager.h" #endif #include "conference.h" @@ -1370,7 +1370,7 @@ void ManagerImpl::saveConfig() hookPreference.serialize(emitter); audioPreference.serialize(emitter); #ifdef SFL_VIDEO - getVideoControls()->getVideoPreferences().serialize(emitter); + getVideoManager()->getVideoPreferences().serialize(emitter); #endif shortcutPreferences.serialize(emitter); @@ -2615,7 +2615,7 @@ int ManagerImpl::loadAccountMap(Conf::YamlParser &parser) int errorCount = 0; #ifdef SFL_VIDEO - VideoControls *controls(getVideoControls()); + VideoManager *controls(getVideoManager()); try { MappingNode *videoNode = parser.getVideoNode(); if (videoNode) @@ -2955,9 +2955,9 @@ ManagerImpl::getClient() } #ifdef SFL_VIDEO -VideoControls * -ManagerImpl::getVideoControls() +VideoManager * +ManagerImpl::getVideoManager() { - return client_.getVideoControls(); + return client_.getVideoManager(); } #endif diff --git a/daemon/src/managerimpl.h b/daemon/src/managerimpl.h index dae7950c78..90ce71cccf 100644 --- a/daemon/src/managerimpl.h +++ b/daemon/src/managerimpl.h @@ -945,7 +945,7 @@ class ManagerImpl { */ Client* getClient(); #ifdef SFL_VIDEO - VideoControls * getVideoControls(); + VideoManager * getVideoManager(); #endif /** diff --git a/daemon/src/sip/sipcall.cpp b/daemon/src/sip/sipcall.cpp index 3af942e9b8..01633bfd35 100644 --- a/daemon/src/sip/sipcall.cpp +++ b/daemon/src/sip/sipcall.cpp @@ -37,7 +37,7 @@ #include "sdp.h" #include "manager.h" #ifdef SFL_VIDEO -#include "client/video_controls.h" +#include "client/videomanager.h" #endif namespace { @@ -52,7 +52,7 @@ SIPCall::SIPCall(const std::string& id, Call::CallType type, , audiortp_(this) #ifdef SFL_VIDEO // The ID is used to associate video streams to calls - , videortp_(id, Manager::instance().getClient()->getVideoControls()->getSettings()) + , videortp_(id, Manager::instance().getClient()->getVideoManager()->getSettings()) #endif , pool_(pj_pool_create(&caching_pool->factory, id.c_str(), INITIAL_SIZE, INCREMENT_SIZE, NULL)) , local_sdp_(new Sdp(pool_)) diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index d1949b2008..a3c4d62a76 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -59,7 +59,7 @@ #ifdef SFL_VIDEO #include "video/video_rtp_session.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #endif #include "client/client.h" diff --git a/daemon/src/video/video_input.cpp b/daemon/src/video/video_input.cpp index b3a79050e7..bd031ff25f 100644 --- a/daemon/src/video/video_input.cpp +++ b/daemon/src/video/video_input.cpp @@ -34,7 +34,7 @@ #include "check.h" #include "manager.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #include <map> #include <string> @@ -117,7 +117,7 @@ bool VideoInput::setup() /* Sink setup */ EXIT_IF_FAIL(sink_.start(), "Cannot start shared memory sink"); if (attach(&sink_)) { - Manager::instance().getVideoControls()->startedDecoding(id_, sink_.openedName(), + Manager::instance().getVideoManager()->startedDecoding(id_, sink_.openedName(), decoder_->getWidth(), decoder_->getHeight()); DEBUG("LOCAL: shm sink <%s> started: size = %dx%d", sink_.openedName().c_str(), decoder_->getWidth(), decoder_->getHeight()); @@ -132,7 +132,7 @@ void VideoInput::process() void VideoInput::cleanup() { if (detach(&sink_)) { - Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName()); + Manager::instance().getVideoManager()->stoppedDecoding(id_, sink_.openedName()); sink_.stop(); } diff --git a/daemon/src/video/video_input_selector.cpp b/daemon/src/video/video_input_selector.cpp index 2815591a59..b884ef2199 100644 --- a/daemon/src/video/video_input_selector.cpp +++ b/daemon/src/video/video_input_selector.cpp @@ -33,7 +33,7 @@ #include "check.h" #include "manager.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #include <unistd.h> @@ -83,7 +83,7 @@ static std::map<std::string, std::string> initCamera(const std::string& device) { std::map<std::string, std::string> map = - Manager::instance().getVideoControls()->getSettingsFor(device); + Manager::instance().getVideoManager()->getSettingsFor(device); map["format"] = "video4linux2"; map["mirror"] = "true"; // only the key matters diff --git a/daemon/src/video/video_mixer.cpp b/daemon/src/video/video_mixer.cpp index 16879b3290..b89baf53a2 100644 --- a/daemon/src/video/video_mixer.cpp +++ b/daemon/src/video/video_mixer.cpp @@ -32,7 +32,7 @@ #include "libav_deps.h" #include "video_mixer.h" #include "check.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #include "manager.h" #include "logger.h" @@ -51,7 +51,7 @@ VideoMixer::VideoMixer(const std::string &id) : , mutex_() , sink_(id + VIDEO_MIXER_SUFFIX) { - auto videoCtrl = Manager::instance().getVideoControls(); + auto videoCtrl = Manager::instance().getVideoManager(); if (!videoCtrl->hasCameraStarted()) { videoCtrl->startCamera(); MYSLEEP(1); @@ -64,7 +64,7 @@ VideoMixer::VideoMixer(const std::string &id) : VideoMixer::~VideoMixer() { - auto videoCtrl = Manager::instance().getVideoControls(); + auto videoCtrl = Manager::instance().getVideoManager(); if (auto shared = videoCtrl->getVideoCamera().lock()) shared->detach(this); stop_sink(); @@ -144,7 +144,7 @@ void VideoMixer::start_sink() { if (sink_.start()) { if (this->attach(&sink_)) { - Manager::instance().getVideoControls()->startedDecoding(id_, sink_.openedName(), width_, height_); + Manager::instance().getVideoManager()->startedDecoding(id_, sink_.openedName(), width_, height_); DEBUG("MX: shm sink <%s> started: size = %dx%d", sink_.openedName().c_str(), width_, height_); } @@ -155,7 +155,7 @@ void VideoMixer::start_sink() void VideoMixer::stop_sink() { if (this->detach(&sink_)) { - Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName()); + Manager::instance().getVideoManager()->stoppedDecoding(id_, sink_.openedName()); sink_.stop(); } } diff --git a/daemon/src/video/video_receive_thread.cpp b/daemon/src/video/video_receive_thread.cpp index e6f71f9fd5..285001571d 100644 --- a/daemon/src/video/video_receive_thread.cpp +++ b/daemon/src/video/video_receive_thread.cpp @@ -35,7 +35,7 @@ #include "video_receive_thread.h" #include "socket_pair.h" #include "manager.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #include "check.h" #include <unistd.h> @@ -154,7 +154,7 @@ void VideoReceiveThread::process() void VideoReceiveThread::cleanup() { if (detach(&sink_)) - Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName()); + Manager::instance().getVideoManager()->stoppedDecoding(id_, sink_.openedName()); sink_.stop(); if (videoDecoder_) @@ -214,7 +214,7 @@ void VideoReceiveThread::enterConference() return; if (detach(&sink_)) { - Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName()); + Manager::instance().getVideoManager()->stoppedDecoding(id_, sink_.openedName()); DEBUG("RX: shm sink <%s> detached", sink_.openedName().c_str()); } } @@ -226,7 +226,7 @@ void VideoReceiveThread::exitConference() if (dstWidth_ > 0 && dstHeight_ > 0) { if (attach(&sink_)) { - Manager::instance().getVideoControls()->startedDecoding(id_, sink_.openedName(), dstWidth_, dstHeight_); + Manager::instance().getVideoManager()->startedDecoding(id_, sink_.openedName(), dstWidth_, dstHeight_); DEBUG("RX: shm sink <%s> started: size = %dx%d", sink_.openedName().c_str(), dstWidth_, dstHeight_); } diff --git a/daemon/src/video/video_rtp_session.cpp b/daemon/src/video/video_rtp_session.cpp index a3b753be45..1e1aab939b 100644 --- a/daemon/src/video/video_rtp_session.cpp +++ b/daemon/src/video/video_rtp_session.cpp @@ -29,7 +29,7 @@ * as that of the covered work. */ -#include "client/video_controls.h" +#include "client/videomanager.h" #include "video_rtp_session.h" #include "video_sender.h" #include "video_receive_thread.h" @@ -145,7 +145,7 @@ void VideoRtpSession::start(int localPort) if (sending_) { // Local video startup if needed - auto videoCtrl = Manager::instance().getVideoControls(); + auto videoCtrl = Manager::instance().getVideoManager(); const bool firstStart = not videoCtrl->hasCameraStarted(); videoCtrl->startCamera(); if (firstStart) @@ -214,7 +214,7 @@ void VideoRtpSession::stop() receiveThread_.reset(); sender_.reset(); socketPair_.reset(); - auto videoCtrl = Manager::instance().getVideoControls(); + auto videoCtrl = Manager::instance().getVideoManager(); videoCtrl->stopCamera(); } diff --git a/daemon/src/video/video_sender.cpp b/daemon/src/video/video_sender.cpp index 46485ee286..ae23cd4105 100644 --- a/daemon/src/video/video_sender.cpp +++ b/daemon/src/video/video_sender.cpp @@ -32,7 +32,7 @@ #include "video_sender.h" #include "video_mixer.h" #include "socket_pair.h" -#include "client/video_controls.h" +#include "client/videomanager.h" #include "check.h" #include "manager.h" diff --git a/daemon/src/video/video_v4l2_list.cpp b/daemon/src/video/video_v4l2_list.cpp index 8c4ea80eef..4998b835b2 100644 --- a/daemon/src/video/video_v4l2_list.cpp +++ b/daemon/src/video/video_v4l2_list.cpp @@ -51,7 +51,7 @@ extern "C" { #include "video_v4l2_list.h" #include "manager.h" -#include "client/video_controls.h" +#include "client/videomanager.h" namespace sfl_video { @@ -243,7 +243,7 @@ void VideoV4l2ListThread::run() DEBUG("udev: adding %s", node); try { if (addDevice(node)) { - Manager::instance().getVideoControls()->deviceEvent(); + Manager::instance().getVideoManager()->deviceEvent(); } } catch (const std::runtime_error &e) { ERROR("%s", e.what()); @@ -280,7 +280,7 @@ void VideoV4l2ListThread::delDevice(const string &node) if (itr != devices_.end()) { devices_.erase(itr); - Manager::instance().getVideoControls()->deviceEvent(); + Manager::instance().getVideoManager()->deviceEvent(); } } -- GitLab