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

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: Rebase. 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
« no previous file with comments | « talk/session/media/channelmanager.h ('k') | talk/session/media/channelmanager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 AudioOptions& options) { 255 const MediaChannelOptions& options,
256 const AudioOptions& audio_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, options, audio_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 =
271 media_engine_->CreateChannel(media_controller->call_w(), options); 273 media_engine_->CreateChannel(
274 media_controller->call_w(), options, audio_options);
272 if (!media_channel) 275 if (!media_channel)
273 return nullptr; 276 return nullptr;
274 277
275 VoiceChannel* voice_channel = 278 VoiceChannel* voice_channel =
276 new VoiceChannel(worker_thread_, media_engine_.get(), media_channel, 279 new VoiceChannel(worker_thread_, media_engine_.get(), media_channel,
277 transport_controller, content_name, rtcp); 280 transport_controller, content_name, rtcp);
278 if (!voice_channel->Init()) { 281 if (!voice_channel->Init()) {
279 delete voice_channel; 282 delete voice_channel;
280 return nullptr; 283 return nullptr;
281 } 284 }
(...skipping 21 matching lines...) Expand all
303 return; 306 return;
304 voice_channels_.erase(it); 307 voice_channels_.erase(it);
305 delete voice_channel; 308 delete voice_channel;
306 } 309 }
307 310
308 VideoChannel* ChannelManager::CreateVideoChannel( 311 VideoChannel* ChannelManager::CreateVideoChannel(
309 webrtc::MediaControllerInterface* media_controller, 312 webrtc::MediaControllerInterface* media_controller,
310 TransportController* transport_controller, 313 TransportController* transport_controller,
311 const std::string& content_name, 314 const std::string& content_name,
312 bool rtcp, 315 bool rtcp,
313 const VideoOptions& options) { 316 const MediaChannelOptions& options,
317 const VideoOptions& video_options) {
314 return worker_thread_->Invoke<VideoChannel*>( 318 return worker_thread_->Invoke<VideoChannel*>(
315 Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller, 319 Bind(&ChannelManager::CreateVideoChannel_w, this, media_controller,
316 transport_controller, content_name, rtcp, options)); 320 transport_controller, content_name, rtcp, options, video_options));
317 } 321 }
318 322
319 VideoChannel* ChannelManager::CreateVideoChannel_w( 323 VideoChannel* ChannelManager::CreateVideoChannel_w(
320 webrtc::MediaControllerInterface* media_controller, 324 webrtc::MediaControllerInterface* media_controller,
321 TransportController* transport_controller, 325 TransportController* transport_controller,
322 const std::string& content_name, 326 const std::string& content_name,
323 bool rtcp, 327 bool rtcp,
324 const VideoOptions& options) { 328 const MediaChannelOptions& options,
329 const VideoOptions& video_options) {
325 ASSERT(initialized_); 330 ASSERT(initialized_);
326 ASSERT(worker_thread_ == rtc::Thread::Current()); 331 ASSERT(worker_thread_ == rtc::Thread::Current());
327 ASSERT(nullptr != media_controller); 332 ASSERT(nullptr != media_controller);
328 VideoMediaChannel* media_channel = 333 VideoMediaChannel* media_channel =
329 media_engine_->CreateVideoChannel(media_controller->call_w(), options); 334 media_engine_->CreateVideoChannel(
335 media_controller->call_w(), options, video_options);
330 if (media_channel == NULL) { 336 if (media_channel == NULL) {
331 return NULL; 337 return NULL;
332 } 338 }
333 339
334 VideoChannel* video_channel = new VideoChannel( 340 VideoChannel* video_channel = new VideoChannel(
335 worker_thread_, media_channel, transport_controller, content_name, rtcp); 341 worker_thread_, media_channel, transport_controller, content_name, rtcp);
336 if (!video_channel->Init()) { 342 if (!video_channel->Init()) {
337 delete video_channel; 343 delete video_channel;
338 return NULL; 344 return NULL;
339 } 345 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 return worker_thread_->Invoke<bool>( 574 return worker_thread_->Invoke<bool>(
569 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file)); 575 Bind(&MediaEngineInterface::StartRtcEventLog, media_engine_.get(), file));
570 } 576 }
571 577
572 void ChannelManager::StopRtcEventLog() { 578 void ChannelManager::StopRtcEventLog() {
573 worker_thread_->Invoke<void>( 579 worker_thread_->Invoke<void>(
574 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get())); 580 Bind(&MediaEngineInterface::StopRtcEventLog, media_engine_.get()));
575 } 581 }
576 582
577 } // namespace cricket 583 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/session/media/channelmanager.h ('k') | talk/session/media/channelmanager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698