OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 } | 388 } |
389 | 389 |
390 void BufferFeeder::OnPushBufferComplete(BufferStatus status) { | 390 void BufferFeeder::OnPushBufferComplete(BufferStatus status) { |
391 DCHECK(thread_checker_.CalledOnValidThread()); | 391 DCHECK(thread_checker_.CalledOnValidThread()); |
392 pending_buffer_ = nullptr; | 392 pending_buffer_ = nullptr; |
393 EXPECT_FALSE(within_push_buffer_call_) | 393 EXPECT_FALSE(within_push_buffer_call_) |
394 << "OnPushBufferComplete() called during a call to PushBuffer()"; | 394 << "OnPushBufferComplete() called during a call to PushBuffer()"; |
395 EXPECT_TRUE(expecting_buffer_complete_) | 395 EXPECT_TRUE(expecting_buffer_complete_) |
396 << "OnPushBufferComplete() called unexpectedly"; | 396 << "OnPushBufferComplete() called unexpectedly"; |
397 expecting_buffer_complete_ = false; | 397 expecting_buffer_complete_ = false; |
398 ASSERT_NE(status, MediaPipelineBackend::kBufferFailed); | 398 if (!feed_continuous_pcm_ || !feeding_completed_) { |
| 399 ASSERT_NE(status, MediaPipelineBackend::kBufferFailed); |
| 400 } |
399 EXPECT_FALSE(eos_) << "Got OnPushBufferComplete() after OnEndOfStream()"; | 401 EXPECT_FALSE(eos_) << "Got OnPushBufferComplete() after OnEndOfStream()"; |
400 | 402 |
401 if (test_config_after_next_push_) { | 403 if (test_config_after_next_push_) { |
402 test_config_after_next_push_ = false; | 404 test_config_after_next_push_ = false; |
403 TestConfigs(); | 405 TestConfigs(); |
404 } | 406 } |
405 | 407 |
406 if (feeding_completed_) | 408 if (feeding_completed_) |
407 return; | 409 return; |
408 | 410 |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 set_sync_type(MediaPipelineDeviceParams::kModeSyncPts); | 1178 set_sync_type(MediaPipelineDeviceParams::kModeSyncPts); |
1177 ConfigureForFile("bear-640x360.webm"); | 1179 ConfigureForFile("bear-640x360.webm"); |
1178 PauseBeforeEos(); | 1180 PauseBeforeEos(); |
1179 AddEffectsStreams(); | 1181 AddEffectsStreams(); |
1180 Start(); | 1182 Start(); |
1181 base::RunLoop().Run(); | 1183 base::RunLoop().Run(); |
1182 } | 1184 } |
1183 | 1185 |
1184 } // namespace media | 1186 } // namespace media |
1185 } // namespace chromecast | 1187 } // namespace chromecast |
OLD | NEW |