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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/time.h" | 9 #include "base/time/time.h" |
10 #include "media/base/audio_buffer.h" | 10 #include "media/base/audio_buffer.h" |
11 #include "media/base/audio_buffer_queue.h" | 11 #include "media/base/audio_buffer_queue.h" |
12 #include "media/base/audio_bus.h" | 12 #include "media/base/audio_bus.h" |
13 #include "media/base/buffers.h" | 13 #include "media/base/buffers.h" |
14 #include "media/base/test_helpers.h" | 14 #include "media/base/test_helpers.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 static void VerifyResult(float* channel_data, | 19 static void VerifyResult(float* channel_data, |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 // Read all 10 frames in buffer2. | 447 // Read all 10 frames in buffer2. |
448 EXPECT_EQ(10, buffer.ReadFrames(10, bus.get())); | 448 EXPECT_EQ(10, buffer.ReadFrames(10, bus.get())); |
449 EXPECT_EQ(kNoTimestamp(), buffer.current_time()); | 449 EXPECT_EQ(kNoTimestamp(), buffer.current_time()); |
450 | 450 |
451 // Try to read more frames (which don't exist), timestamp should remain. | 451 // Try to read more frames (which don't exist), timestamp should remain. |
452 EXPECT_EQ(0, buffer.ReadFrames(5, bus.get())); | 452 EXPECT_EQ(0, buffer.ReadFrames(5, bus.get())); |
453 EXPECT_EQ(kNoTimestamp(), buffer.current_time()); | 453 EXPECT_EQ(kNoTimestamp(), buffer.current_time()); |
454 } | 454 } |
455 | 455 |
456 } // namespace media | 456 } // namespace media |
OLD | NEW |