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

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: Addressed test nit; use reference. 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
« no previous file with comments | « webrtc/api/mediacontroller.h ('k') | webrtc/api/peerconnection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/mediacontroller.cc
diff --git a/webrtc/api/mediacontroller.cc b/webrtc/api/mediacontroller.cc
index 0c7d73389e5f4da0555f1c74f554dc4b0be99c8d..341c013ed153c3d29efd03eb6b93a4a69460f30b 100644
--- a/webrtc/api/mediacontroller.cc
+++ b/webrtc/api/mediacontroller.cc
@@ -14,6 +14,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/call.h"
#include "webrtc/pc/channelmanager.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,7 @@ 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 +67,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 +78,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
« no previous file with comments | « webrtc/api/mediacontroller.h ('k') | webrtc/api/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698