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

Side by Side Diff: talk/session/media/channelmanager.cc

Issue 1646253004: Split out dscp option from VideoOptions to new struct MediaChannelOptions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix accidentally broken combined_audio_video_bwe option. 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004 Google Inc. 3 * Copyright 2004 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 DestroyVoiceChannel_w(voice_channels_.back()); 245 DestroyVoiceChannel_w(voice_channels_.back());
246 } 246 }
247 media_engine_->Terminate(); 247 media_engine_->Terminate();
248 } 248 }
249 249
250 VoiceChannel* ChannelManager::CreateVoiceChannel( 250 VoiceChannel* ChannelManager::CreateVoiceChannel(
251 webrtc::MediaControllerInterface* media_controller, 251 webrtc::MediaControllerInterface* media_controller,
252 TransportController* transport_controller, 252 TransportController* transport_controller,
253 const std::string& content_name, 253 const std::string& content_name,
254 bool rtcp, 254 bool rtcp,
255 const MediaChannelOptions& channel_options,
255 const AudioOptions& options) { 256 const AudioOptions& options) {
256 return worker_thread_->Invoke<VoiceChannel*>( 257 return worker_thread_->Invoke<VoiceChannel*>(
257 Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller, 258 Bind(&ChannelManager::CreateVoiceChannel_w, this, media_controller,
258 transport_controller, content_name, rtcp, options)); 259 transport_controller, content_name, rtcp, channel_options, options));
259 } 260 }
260 261
261 VoiceChannel* ChannelManager::CreateVoiceChannel_w( 262 VoiceChannel* ChannelManager::CreateVoiceChannel_w(
262 webrtc::MediaControllerInterface* media_controller, 263 webrtc::MediaControllerInterface* media_controller,
263 TransportController* transport_controller, 264 TransportController* transport_controller,
264 const std::string& content_name, 265 const std::string& content_name,
265 bool rtcp, 266 bool rtcp,
266 const AudioOptions& options) { 267 const MediaChannelOptions& options,
268 const AudioOptions& audio_options) {
267 ASSERT(initialized_); 269 ASSERT(initialized_);
268 ASSERT(worker_thread_ == rtc::Thread::Current()); 270 ASSERT(worker_thread_ == rtc::Thread::Current());
269 ASSERT(nullptr != media_controller); 271 ASSERT(nullptr != media_controller);
270 VoiceMediaChannel* media_channel = 272 VoiceMediaChannel* media_channel = media_engine_->CreateChannel(
271 media_engine_->CreateChannel(media_controller->call_w(), options); 273 media_controller->call_w(), options, audio_options);
272 if (!media_channel) 274 if (!media_channel)
273 return nullptr; 275 return nullptr;
274 276
275 VoiceChannel* voice_channel = 277 VoiceChannel* voice_channel =
276 new VoiceChannel(worker_thread_, media_engine_.get(), media_channel, 278 new VoiceChannel(worker_thread_, media_engine_.get(), media_channel,
277 transport_controller, content_name, rtcp); 279 transport_controller, content_name, rtcp);
278 if (!voice_channel->Init()) { 280 if (!voice_channel->Init()) {
279 delete voice_channel; 281 delete voice_channel;
280 return nullptr; 282 return nullptr;
281 } 283 }
(...skipping 21 matching lines...) Expand all
303 return; 305 return;
304 voice_channels_.erase(it); 306 voice_channels_.erase(it);
305 delete voice_channel; 307 delete voice_channel;
306 } 308 }
307 309
308 VideoChannel* ChannelManager::CreateVideoChannel( 310 VideoChannel* ChannelManager::CreateVideoChannel(
309 webrtc::MediaControllerInterface* media_controller, 311 webrtc::MediaControllerInterface* media_controller,
310 TransportController* transport_controller, 312 TransportController* transport_controller,
311 const std::string& content_name, 313 const std::string& content_name,
312 bool rtcp, 314 bool rtcp,
313 const VideoOptions& options) { 315 const MediaChannelOptions& options,
316 const VideoOptions& video_options) {
314 return worker_thread_->Invoke<VideoChannel*>( 317 return worker_thread_->Invoke<VideoChannel*>(
315 Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller, 318 Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller,
316 transport_controller, content_name, rtcp, options)); 319 transport_controller, content_name, rtcp, options, video_options));
317 } 320 }
318 321
319 VideoChannel* ChannelManager::CreateVideoChannel_w( 322 VideoChannel* ChannelManager::CreateVideoChannel_w(
320 webrtc::MediaControllerInterface* media_controller, 323 webrtc::MediaControllerInterface* media_controller,
321 TransportController* transport_controller, 324 TransportController* transport_controller,
322 const std::string& content_name, 325 const std::string& content_name,
323 bool rtcp, 326 bool rtcp,
324 const VideoOptions& options) { 327 const MediaChannelOptions& options,
328 const VideoOptions& video_options) {
325 ASSERT(initialized_); 329 ASSERT(initialized_);
326 ASSERT(worker_thread_ == rtc::Thread::Current()); 330 ASSERT(worker_thread_ == rtc::Thread::Current());
327 ASSERT(nullptr != media_controller); 331 ASSERT(nullptr != media_controller);
328 VideoMediaChannel* media_channel = 332 VideoMediaChannel* media_channel = media_engine_->CreateVideoChannel(
329 media_engine_->CreateVideoChannel(media_controller->call_w(), options); 333 media_controller->call_w(), options, video_options);
330 if (media_channel == NULL) { 334 if (media_channel == NULL) {
331 return NULL; 335 return NULL;
332 } 336 }
333 337
334 VideoChannel* video_channel = new VideoChannel( 338 VideoChannel* video_channel = new VideoChannel(
335 worker_thread_, media_channel, transport_controller, content_name, rtcp); 339 worker_thread_, media_channel, transport_controller, content_name, rtcp);
336 if (!video_channel->Init()) { 340 if (!video_channel->Init()) {
337 delete video_channel; 341 delete video_channel;
338 return NULL; 342 return NULL;
339 } 343 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 return worker_thread_->Invoke<bool>( 572 return worker_thread_->Invoke<bool>(
569 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); 573 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file));
570 } 574 }
571 575
572 void ChannelManager::StopRtcEventLog() { 576 void ChannelManager::StopRtcEventLog() {
573 worker_thread_->Invoke<void>( 577 worker_thread_->Invoke<void>(
574 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); 578 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get()));
575 } 579 }
576 580
577 } // namespace cricket 581 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698