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

Unified Diff: talk/session/media/channel.cc

Issue 1270333002: Get rid of media_engine_ from BaseChannel; only VoiceChannel needs it. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 4 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 | « talk/session/media/channel.h ('k') | talk/session/media/channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/session/media/channel.cc
diff --git a/talk/session/media/channel.cc b/talk/session/media/channel.cc
index 4aa2d7be704450678726abc789cb439c115fa1a7..dc7a478510ccd0fb1eb482005b715467bf64081f 100644
--- a/talk/session/media/channel.cc
+++ b/talk/session/media/channel.cc
@@ -151,11 +151,9 @@ static const MediaContentDescription* GetContentDescription(
}
BaseChannel::BaseChannel(rtc::Thread* thread,
- MediaEngineInterface* media_engine,
MediaChannel* media_channel, BaseSession* session,
const std::string& content_name, bool rtcp)
: worker_thread_(thread),
- media_engine_(media_engine),
session_(session),
media_channel_(media_channel),
content_name_(content_name),
@@ -1295,8 +1293,9 @@ VoiceChannel::VoiceChannel(rtc::Thread* thread,
BaseSession* session,
const std::string& content_name,
bool rtcp)
- : BaseChannel(thread, media_engine, media_channel, session, content_name,
+ : BaseChannel(thread, media_channel, session, content_name,
rtcp),
+ media_engine_(media_engine),
received_media_(false) {
}
@@ -1439,7 +1438,7 @@ bool VoiceChannel::MuteStream_w(uint32 ssrc, bool mute) {
}
int VoiceChannel::GetInputLevel_w() {
- return media_engine()->GetInputLevel();
+ return media_engine_->GetInputLevel();
}
int VoiceChannel::GetOutputLevel_w() {
@@ -1685,12 +1684,11 @@ void VoiceChannel::GetSrtpCiphers(std::vector<std::string>* ciphers) const {
}
VideoChannel::VideoChannel(rtc::Thread* thread,
- MediaEngineInterface* media_engine,
VideoMediaChannel* media_channel,
BaseSession* session,
const std::string& content_name,
bool rtcp)
- : BaseChannel(thread, media_engine, media_channel, session, content_name,
+ : BaseChannel(thread, media_channel, session, content_name,
rtcp),
renderer_(NULL),
previous_we_(rtc::WE_CLOSE) {
@@ -2128,8 +2126,7 @@ DataChannel::DataChannel(rtc::Thread* thread,
BaseSession* session,
const std::string& content_name,
bool rtcp)
- // MediaEngine is NULL
- : BaseChannel(thread, NULL, media_channel, session, content_name, rtcp),
+ : BaseChannel(thread, media_channel, session, content_name, rtcp),
data_channel_type_(cricket::DCT_NONE),
ready_to_send_data_(false) {
}
« no previous file with comments | « talk/session/media/channel.h ('k') | talk/session/media/channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698