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 | 9 |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 base::Unretained(cast_environment_->logger())))); | 84 base::Unretained(cast_environment_->logger())))); |
85 } | 85 } |
86 | 86 |
87 void CastSessionDelegateBase::StatusNotificationCB( | 87 void CastSessionDelegateBase::StatusNotificationCB( |
88 const ErrorCallback& error_callback, | 88 const ErrorCallback& error_callback, |
89 media::cast::CastTransportStatus status) { | 89 media::cast::CastTransportStatus status) { |
90 DCHECK(io_task_runner_->BelongsToCurrentThread()); | 90 DCHECK(io_task_runner_->BelongsToCurrentThread()); |
91 std::string error_message; | 91 std::string error_message; |
92 | 92 |
93 switch (status) { | 93 switch (status) { |
94 case media::cast::TRANSPORT_AUDIO_UNINITIALIZED: | 94 case media::cast::TRANSPORT_STREAM_UNINITIALIZED: |
95 case media::cast::TRANSPORT_VIDEO_UNINITIALIZED: | 95 case media::cast::TRANSPORT_STREAM_INITIALIZED: |
96 case media::cast::TRANSPORT_AUDIO_INITIALIZED: | |
97 case media::cast::TRANSPORT_VIDEO_INITIALIZED: | |
98 return; // Not errors, do nothing. | 96 return; // Not errors, do nothing. |
99 case media::cast::TRANSPORT_INVALID_CRYPTO_CONFIG: | 97 case media::cast::TRANSPORT_INVALID_CRYPTO_CONFIG: |
100 error_callback.Run("Invalid encrypt/decrypt configuration."); | 98 error_callback.Run("Invalid encrypt/decrypt configuration."); |
101 break; | 99 break; |
102 case media::cast::TRANSPORT_SOCKET_ERROR: | 100 case media::cast::TRANSPORT_SOCKET_ERROR: |
103 error_callback.Run("Socket error."); | 101 error_callback.Run("Socket error."); |
104 break; | 102 break; |
105 } | 103 } |
106 } | 104 } |
107 | 105 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 error_callback.Run(base::StringPrintf("%s codec runtime error.", | 303 error_callback.Run(base::StringPrintf("%s codec runtime error.", |
306 is_for_audio ? "Audio" : "Video")); | 304 is_for_audio ? "Audio" : "Video")); |
307 break; | 305 break; |
308 } | 306 } |
309 } | 307 } |
310 | 308 |
311 void CastSessionDelegate::ReceivePacket( | 309 void CastSessionDelegate::ReceivePacket( |
312 std::unique_ptr<media::cast::Packet> packet) { | 310 std::unique_ptr<media::cast::Packet> packet) { |
313 // Do nothing (frees packet) | 311 // Do nothing (frees packet) |
314 } | 312 } |
OLD | NEW |