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

Side by Side Diff: talk/session/media/channelmanager.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: Cleanups. 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 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 bool rtcp, 276 bool rtcp,
277 const AudioOptions& options) { 277 const AudioOptions& options) {
278 ASSERT(initialized_); 278 ASSERT(initialized_);
279 ASSERT(worker_thread_ == rtc::Thread::Current()); 279 ASSERT(worker_thread_ == rtc::Thread::Current());
280 ASSERT(nullptr != media_controller); 280 ASSERT(nullptr != media_controller);
281 VoiceMediaChannel* media_channel = 281 VoiceMediaChannel* media_channel =
282 media_engine_->CreateChannel(media_controller->call_w(), options); 282 media_engine_->CreateChannel(media_controller->call_w(), options);
283 if (!media_channel) 283 if (!media_channel)
284 return nullptr; 284 return nullptr;
285 285
286 VoiceChannel* voice_channel = 286 VoiceChannel* voice_channel = new VoiceChannel(
287 new VoiceChannel(worker_thread_, media_engine_.get(), media_channel, 287 worker_thread_, media_engine_.get(), media_channel, media_controller,
288 transport_controller, content_name, rtcp); 288 transport_controller, content_name, rtcp);
289 if (!voice_channel->Init()) { 289 if (!voice_channel->Init()) {
290 delete voice_channel; 290 delete voice_channel;
291 return nullptr; 291 return nullptr;
292 } 292 }
293 voice_channels_.push_back(voice_channel); 293 voice_channels_.push_back(voice_channel);
294 return voice_channel; 294 return voice_channel;
295 } 295 }
296 296
297 void ChannelManager::DestroyVoiceChannel(VoiceChannel* voice_channel) { 297 void ChannelManager::DestroyVoiceChannel(VoiceChannel* voice_channel) {
298 if (voice_channel) { 298 if (voice_channel) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 const VideoOptions& options) { 333 const VideoOptions& options) {
334 ASSERT(initialized_); 334 ASSERT(initialized_);
335 ASSERT(worker_thread_ == rtc::Thread::Current()); 335 ASSERT(worker_thread_ == rtc::Thread::Current());
336 ASSERT(nullptr != media_controller); 336 ASSERT(nullptr != media_controller);
337 VideoMediaChannel* media_channel = 337 VideoMediaChannel* media_channel =
338 media_engine_->CreateVideoChannel(media_controller->call_w(), options); 338 media_engine_->CreateVideoChannel(media_controller->call_w(), options);
339 if (media_channel == NULL) { 339 if (media_channel == NULL) {
340 return NULL; 340 return NULL;
341 } 341 }
342 342
343 VideoChannel* video_channel = new VideoChannel( 343 VideoChannel* video_channel =
344 worker_thread_, media_channel, transport_controller, content_name, rtcp); 344 new VideoChannel(worker_thread_, media_channel, media_controller,
345 transport_controller, content_name, rtcp);
345 if (!video_channel->Init()) { 346 if (!video_channel->Init()) {
346 delete video_channel; 347 delete video_channel;
347 return NULL; 348 return NULL;
348 } 349 }
349 video_channels_.push_back(video_channel); 350 video_channels_.push_back(video_channel);
350 return video_channel; 351 return video_channel;
351 } 352 }
352 353
353 void ChannelManager::DestroyVideoChannel(VideoChannel* video_channel) { 354 void ChannelManager::DestroyVideoChannel(VideoChannel* video_channel) {
354 if (video_channel) { 355 if (video_channel) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 } 625 }
625 } 626 }
626 } 627 }
627 628
628 bool ChannelManager::StartAecDump(rtc::PlatformFile file) { 629 bool ChannelManager::StartAecDump(rtc::PlatformFile file) {
629 return worker_thread_->Invoke<bool>( 630 return worker_thread_->Invoke<bool>(
630 Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file)); 631 Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file));
631 } 632 }
632 633
633 } // namespace cricket 634 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698