Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: webrtc/api/mediacontroller.cc

Issue 1670153003: Introduce struct MediaConfig, with construction-time settings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting tweaks. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/mediacontroller.cc
diff --git a/webrtc/api/mediacontroller.cc b/webrtc/api/mediacontroller.cc
index 28438fb2f6e0cd3e84c7b50bc33638e6d662f119..59837d0065e9bc2d056d1b09d25dc96ab62f9a83 100644
--- a/webrtc/api/mediacontroller.cc
+++ b/webrtc/api/mediacontroller.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/bind.h"
#include "webrtc/base/checks.h"
#include "webrtc/call.h"
+#include "webrtc/media/base/mediachannel.h"
namespace {
@@ -24,9 +25,12 @@ const int kMaxBandwidthBps = 2000000;
class MediaController : public webrtc::MediaControllerInterface,
public sigslot::has_slots<> {
public:
- MediaController(rtc::Thread* worker_thread,
+ MediaController(const cricket::MediaConfig& config,
+ rtc::Thread* worker_thread,
cricket::ChannelManager* channel_manager)
- : worker_thread_(worker_thread), channel_manager_(channel_manager) {
+ : worker_thread_(worker_thread),
+ config_(config),
+ channel_manager_(channel_manager) {
RTC_DCHECK(nullptr != worker_thread);
worker_thread_->Invoke<void>(
rtc::Bind(&MediaController::Construct_w, this,
@@ -44,6 +48,9 @@ class MediaController : public webrtc::MediaControllerInterface,
cricket::ChannelManager* channel_manager() const override {
return channel_manager_;
}
+ const cricket::MediaConfig& config() const override {
+ return config_;
+ }
private:
void Construct_w(cricket::MediaEngineInterface* media_engine) {
@@ -62,6 +69,7 @@ class MediaController : public webrtc::MediaControllerInterface,
}
rtc::Thread* const worker_thread_;
+ const cricket::MediaConfig config_;
cricket::ChannelManager* const channel_manager_;
rtc::scoped_ptr<webrtc::Call> call_;
@@ -72,8 +80,9 @@ class MediaController : public webrtc::MediaControllerInterface,
namespace webrtc {
MediaControllerInterface* MediaControllerInterface::Create(
+ const cricket::MediaConfig& config,
rtc::Thread* worker_thread,
cricket::ChannelManager* channel_manager) {
- return new MediaController(worker_thread, channel_manager);
+ return new MediaController(config, worker_thread, channel_manager);
}
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698