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 <stddef.h> |
| 6 #include <stdint.h> |
| 7 |
| 8 #include "base/macros.h" |
5 #include "media/ffmpeg/ffmpeg_common.h" | 9 #include "media/ffmpeg/ffmpeg_common.h" |
6 #include "media/filters/ffmpeg_aac_bitstream_converter.h" | 10 #include "media/filters/ffmpeg_aac_bitstream_converter.h" |
7 #include "media/filters/ffmpeg_demuxer.h" | 11 #include "media/filters/ffmpeg_demuxer.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
9 | 13 |
10 namespace media { | 14 namespace media { |
11 | 15 |
12 namespace { | 16 namespace { |
13 const int kAacMainProfile = 0; | 17 const int kAacMainProfile = 0; |
14 const int kAacLowComplexityProfile = 1; | 18 const int kAacLowComplexityProfile = 1; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 168 |
165 // Check that the ADTS header frame length matches the packet size | 169 // Check that the ADTS header frame length matches the packet size |
166 frame_length = ((second_test_packet->data[3] & 0x03) << 11) | | 170 frame_length = ((second_test_packet->data[3] & 0x03) << 11) | |
167 ((second_test_packet->data[4] & 0xFF) << 3) | | 171 ((second_test_packet->data[4] & 0xFF) << 3) | |
168 ((second_test_packet->data[5] & 0xE0) >> 5); | 172 ((second_test_packet->data[5] & 0xE0) >> 5); |
169 | 173 |
170 EXPECT_EQ(frame_length, second_test_packet->size); | 174 EXPECT_EQ(frame_length, second_test_packet->size); |
171 } | 175 } |
172 | 176 |
173 } // namespace media | 177 } // namespace media |
OLD | NEW |