| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/media/cast_session_delegate.h" | 5 #include "chrome/renderer/media/cast_session_delegate.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "chrome/common/chrome_version_info.h" | 10 #include "chrome/common/chrome_version_info.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 using media::cast::CastSender; | 26 using media::cast::CastSender; |
| 27 using media::cast::VideoSenderConfig; | 27 using media::cast::VideoSenderConfig; |
| 28 | 28 |
| 29 static base::LazyInstance<CastThreads> g_cast_threads = | 29 static base::LazyInstance<CastThreads> g_cast_threads = |
| 30 LAZY_INSTANCE_INITIALIZER; | 30 LAZY_INSTANCE_INITIALIZER; |
| 31 | 31 |
| 32 CastSessionDelegate::CastSessionDelegate() | 32 CastSessionDelegate::CastSessionDelegate() |
| 33 : io_message_loop_proxy_( | 33 : io_message_loop_proxy_( |
| 34 content::RenderThread::Get()->GetIOMessageLoopProxy()), | 34 content::RenderThread::Get()->GetIOMessageLoopProxy()), |
| 35 weak_factory_(this) { | 35 weak_factory_(this) { |
| 36 DCHECK(io_message_loop_proxy_); | 36 DCHECK(io_message_loop_proxy_.get()); |
| 37 } | 37 } |
| 38 | 38 |
| 39 CastSessionDelegate::~CastSessionDelegate() { | 39 CastSessionDelegate::~CastSessionDelegate() { |
| 40 DCHECK(io_message_loop_proxy_->BelongsToCurrentThread()); | 40 DCHECK(io_message_loop_proxy_->BelongsToCurrentThread()); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void CastSessionDelegate::StartAudio( | 43 void CastSessionDelegate::StartAudio( |
| 44 const AudioSenderConfig& config, | 44 const AudioSenderConfig& config, |
| 45 const AudioFrameInputAvailableCallback& callback, | 45 const AudioFrameInputAvailableCallback& callback, |
| 46 const ErrorCallback& error_callback) { | 46 const ErrorCallback& error_callback) { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 } else { | 249 } else { |
| 250 cast_environment_->Logging()->InsertFrameEvent( | 250 cast_environment_->Logging()->InsertFrameEvent( |
| 251 it->timestamp, | 251 it->timestamp, |
| 252 it->type, | 252 it->type, |
| 253 it->media_type, | 253 it->media_type, |
| 254 it->rtp_timestamp, | 254 it->rtp_timestamp, |
| 255 it->frame_id); | 255 it->frame_id); |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 } | 258 } |
| OLD | NEW |