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