| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "media/cast/logging/logging_defines.h" | 27 #include "media/cast/logging/logging_defines.h" |
| 28 #include "media/cast/logging/proto/raw_events.pb.h" | 28 #include "media/cast/logging/proto/raw_events.pb.h" |
| 29 #include "media/cast/logging/raw_event_subscriber_bundle.h" | 29 #include "media/cast/logging/raw_event_subscriber_bundle.h" |
| 30 #include "media/cast/net/cast_transport.h" | 30 #include "media/cast/net/cast_transport.h" |
| 31 #include "media/cast/net/cast_transport_config.h" | 31 #include "media/cast/net/cast_transport_config.h" |
| 32 | 32 |
| 33 using media::cast::CastEnvironment; | 33 using media::cast::CastEnvironment; |
| 34 using media::cast::CastSender; | 34 using media::cast::CastSender; |
| 35 using media::cast::FrameSenderConfig; | 35 using media::cast::FrameSenderConfig; |
| 36 | 36 |
| 37 static base::LazyInstance<CastThreads> g_cast_threads = | 37 static base::LazyInstance<CastThreads>::DestructorAtExit g_cast_threads = |
| 38 LAZY_INSTANCE_INITIALIZER; | 38 LAZY_INSTANCE_INITIALIZER; |
| 39 | 39 |
| 40 CastSessionDelegateBase::CastSessionDelegateBase() | 40 CastSessionDelegateBase::CastSessionDelegateBase() |
| 41 : io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()), | 41 : io_task_runner_(content::RenderThread::Get()->GetIOTaskRunner()), |
| 42 weak_factory_(this) { | 42 weak_factory_(this) { |
| 43 DCHECK(io_task_runner_.get()); | 43 DCHECK(io_task_runner_.get()); |
| 44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 45 // Note that this also increases the accuracy of PostDelayTask, | 45 // Note that this also increases the accuracy of PostDelayTask, |
| 46 // which is is very helpful to cast. | 46 // which is is very helpful to cast. |
| 47 if (!base::Time::ActivateHighResolutionTimer(true)) { | 47 if (!base::Time::ActivateHighResolutionTimer(true)) { |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 error_callback.Run(base::StringPrintf("%s codec runtime error.", | 325 error_callback.Run(base::StringPrintf("%s codec runtime error.", |
| 326 is_for_audio ? "Audio" : "Video")); | 326 is_for_audio ? "Audio" : "Video")); |
| 327 break; | 327 break; |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 | 330 |
| 331 void CastSessionDelegate::ReceivePacket( | 331 void CastSessionDelegate::ReceivePacket( |
| 332 std::unique_ptr<media::cast::Packet> packet) { | 332 std::unique_ptr<media::cast::Packet> packet) { |
| 333 // Do nothing (frees packet) | 333 // Do nothing (frees packet) |
| 334 } | 334 } |
| OLD | NEW |