diff --git a/src/conference.cpp b/src/conference.cpp index ea86ef290691b45e3a35715632906eb57646922b..f77996f9ca8c6467c28f385d378a5c054cbdf5f5 100644 --- a/src/conference.cpp +++ b/src/conference.cpp @@ -309,7 +309,7 @@ Conference::setState(State state) } void -Conference::setLocalHostDefaultMediaSource() +Conference::initSourcesForHost() { hostSources_.clear(); // Setup local audio source @@ -907,7 +907,7 @@ Conference::attachHost() if (getState() == State::ACTIVE_DETACHED) { setState(State::ACTIVE_ATTACHED); - setLocalHostDefaultMediaSource(); + initSourcesForHost(); bindHostAudio(); #ifdef ENABLE_VIDEO if (videoMixer_) { @@ -946,7 +946,7 @@ Conference::detachHost() return; } - setLocalHostDefaultMediaSource(); + initSourcesForHost(); setState(State::ACTIVE_DETACHED); } diff --git a/src/conference.h b/src/conference.h index e5de287ac040d2a0d427341cb89dadd3301d847b..976375c3bf46f6b035a37adfc3b8cf32278a91dd 100644 --- a/src/conference.h +++ b/src/conference.h @@ -248,11 +248,6 @@ public: const char* getStateStr() const { return getStateStr(confState_); } - /** - * Set default media source for the local host - */ - void setLocalHostDefaultMediaSource(); - /** * Set the mute state of the local host */ @@ -263,14 +258,6 @@ public: */ bool isMediaSourceMuted(MediaType type) const; - /** - * Take over media control from the call. - * When a call joins a conference, the media control (mainly mute/un-mute - * state of the local media source) will be handled by the conference and - * the mixer. - */ - void takeOverMediaSourceControl(const std::string& callId); - /** * Process a media change request. * Used to change the media attributes of the host. @@ -516,6 +503,19 @@ private: std::function<void(int)> shutdownCb_; clock::time_point duration_start_; + /** + * Initialize sources for host (takes default camera/audio) + */ + void initSourcesForHost(); + + /** + * Take over media control from the call. + * When a call joins a conference, the media control (mainly mute/un-mute + * state of the local media source) will be handled by the conference and + * the mixer. + */ + void takeOverMediaSourceControl(const std::string& callId); + /** * Bind host's audio */