diff --git a/daemon/src/client/Makefile.am b/daemon/src/client/Makefile.am index 6708dc215b551390a01bd6dcb0a02484a1d897eb..b84213ff3996e05c588d48bc20f32c727aefe5ad 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 50ca6609697e3a1c24e94084727b4b8b439b12f2..c4f4d07bfb936c1d5db0c8bb5587e5277b5b3f32 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 a7f09fe03a3723cf20fbffceb44f196158593651..410c84c69336bf6bc6f2014ad0dd70984cdab452 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 7db4a433c5a2315d9f358333754c4edd606e9665..2e3b46364ffc0bc4adcdcf47e5aa320d6fb8d5bc 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 8e7fa2c929664c130912330ae60db19a8bd9be02..93e507cfc11f8e0bacaf5ab71d2b2d2e4e30c7c0 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 16cad00957bba2de5bbff4dc4f6c5bf2c2829fb1..170733ab9d067ff1d8080a98881edc86b38e35f6 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 29f3930e41aa38ab49feb39176321d780301ba7c..154cecb085bf2bc373da6d2466b33371f0c080e7 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 518239a449f68b4692effe0a7a8b51204ae06dd2..dca62f709d1544a58c3d1e2c8b05e1935c67ae86 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 62b0fa3b3a44216ec84655fd75db58039462405b..c6ff700c6bd2704049afb75441f1afe3c527cb6a 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 d098495ba2e4b1edea3134622a6d2500883cbf51..49d96d9b93fae8bd43de02e8a5d3e2e0f18d0e88 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 4d29a100f3d3912913663257d06a059ba6730b4f..25880421aa5b0c2daec058c73350aae4aef7c526 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 dae7950c78fa204140c46886d4f6777421f5e22a..90ce71cccfc90a48a922df4fd7fbf787a72b7f69 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 3af942e9b81491cb6cf4b570ab7dd0f3de1489de..01633bfd3552ec3998929d8e7e6280b59c7b798f 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 d1949b20086cd5c30aca70f82bb72da8f35e8f08..a3c4d62a76e7bbfaa2280a76be46cfa631dbe094 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 b3a79050e750c275abc947b870b58b564f12f933..bd031ff25f56fb6d3de3a8edbab5699244099759 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 2815591a594e9c68febbef94c106a374445e5392..b884ef2199ce8da544a3a326bffd942f6bc6a4d4 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 16879b3290f7be7a34af23392618c3adb821442e..b89baf53a2bd80d8c3a714e962ab3be392193e35 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 e6f71f9fd5df15ee80526460ac54b8873e73d646..285001571d6cbd860048afeeb80c636f361e2410 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 a3b753be45f84081cb8885d1a1de324402000d5a..1e1aab939b0bfb059b01171d44c9b1a0331cc814 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 46485ee286396519d96247c4bd043e39e3670cd2..ae23cd4105043b433acbf1426be9b75196ff2cad 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 8c4ea80eefff2e4eb0f988feb90c86c5e43318b4..4998b835b2c21c0a7488544e65c48dcd5ced2548 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(); } }