OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
5 #include "base/files/memory_mapped_file.h" | 8 #include "base/files/memory_mapped_file.h" |
6 #include "media/base/test_data_util.h" | 9 #include "media/base/test_data_util.h" |
7 #include "media/filters/ivf_parser.h" | 10 #include "media/filters/ivf_parser.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
9 | 12 |
10 namespace media { | 13 namespace media { |
11 | 14 |
12 TEST(IvfParserTest, StreamFileParsing) { | 15 TEST(IvfParserTest, StreamFileParsing) { |
13 base::FilePath file_path = GetTestDataFilePath("test-25fps.vp8"); | 16 base::FilePath file_path = GetTestDataFilePath("test-25fps.vp8"); |
14 | 17 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 EXPECT_EQ( | 50 EXPECT_EQ( |
48 static_cast<ptrdiff_t>(sizeof(file_header) + sizeof(frame_header)), | 51 static_cast<ptrdiff_t>(sizeof(file_header) + sizeof(frame_header)), |
49 payload - stream.data()); | 52 payload - stream.data()); |
50 } | 53 } |
51 } | 54 } |
52 | 55 |
53 EXPECT_EQ(file_header.num_frames, num_parsed_frames); | 56 EXPECT_EQ(file_header.num_frames, num_parsed_frames); |
54 } | 57 } |
55 | 58 |
56 } // namespace media | 59 } // namespace media |
OLD | NEW |