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

Unified Diff: talk/app/webrtc/mediacontroller.cc

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing updated_options Created 5 years, 2 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: talk/app/webrtc/mediacontroller.cc
diff --git a/talk/app/webrtc/mediacontroller.cc b/talk/app/webrtc/mediacontroller.cc
index 28b007e15b787e94fe92aa9ad385a1165350f139..f7d85116b19c6ff83bdc9c474777e5739f7e6a13 100644
--- a/talk/app/webrtc/mediacontroller.cc
+++ b/talk/app/webrtc/mediacontroller.cc
@@ -27,6 +27,7 @@
#include "talk/app/webrtc/mediacontroller.h"
+#include "talk/session/media/channelmanager.h"
#include "webrtc/base/bind.h"
#include "webrtc/base/checks.h"
#include "webrtc/call.h"
@@ -37,14 +38,16 @@ const int kMinBandwidthBps = 30000;
const int kStartBandwidthBps = 300000;
const int kMaxBandwidthBps = 2000000;
-class MediaController : public webrtc::MediaControllerInterface {
+class MediaController : public webrtc::MediaControllerInterface,
+ public sigslot::has_slots<> {
public:
MediaController(rtc::Thread* worker_thread,
- webrtc::VoiceEngine* voice_engine)
- : worker_thread_(worker_thread) {
+ cricket::ChannelManager* channel_manager)
+ : worker_thread_(worker_thread), channel_manager_(channel_manager) {
RTC_DCHECK(nullptr != worker_thread);
worker_thread_->Invoke<void>(
- rtc::Bind(&MediaController::Construct_w, this, voice_engine));
+ rtc::Bind(&MediaController::Construct_w, this,
+ channel_manager_->media_engine()->GetVoE()));
}
~MediaController() override {
worker_thread_->Invoke<void>(
@@ -56,6 +59,10 @@ class MediaController : public webrtc::MediaControllerInterface {
return call_.get();
}
+ cricket::ChannelManager* channel_manager() const override {
+ return channel_manager_;
+ }
+
private:
void Construct_w(webrtc::VoiceEngine* voice_engine) {
RTC_DCHECK(worker_thread_->IsCurrent());
@@ -68,10 +75,11 @@ class MediaController : public webrtc::MediaControllerInterface {
}
void Destruct_w() {
RTC_DCHECK(worker_thread_->IsCurrent());
- call_.reset(nullptr);
+ call_.reset();
}
- rtc::Thread* worker_thread_;
+ rtc::Thread* const worker_thread_;
+ cricket::ChannelManager* const channel_manager_;
rtc::scoped_ptr<webrtc::Call> call_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController);
@@ -81,7 +89,8 @@ class MediaController : public webrtc::MediaControllerInterface {
namespace webrtc {
MediaControllerInterface* MediaControllerInterface::Create(
- rtc::Thread* worker_thread, webrtc::VoiceEngine* voice_engine) {
- return new MediaController(worker_thread, voice_engine);
+ rtc::Thread* worker_thread,
+ cricket::ChannelManager* channel_manager) {
+ return new MediaController(worker_thread, channel_manager);
}
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698