OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
| 6 |
| 7 #include "base/macros.h" |
5 #include "media/ffmpeg/ffmpeg_common.h" | 8 #include "media/ffmpeg/ffmpeg_common.h" |
6 #include "media/filters/ffmpeg_demuxer.h" | 9 #include "media/filters/ffmpeg_demuxer.h" |
7 #include "media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.h" | 10 #include "media/filters/ffmpeg_h264_to_annex_b_bitstream_converter.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 data arrays. | 15 // Test data arrays. |
13 static const uint8_t kHeaderDataOkWithFieldLen4[] = { | 16 static const uint8_t kHeaderDataOkWithFieldLen4[] = { |
14 0x01, 0x42, 0x00, 0x28, 0xFF, 0xE1, 0x00, 0x08, 0x67, 0x42, 0x00, 0x28, | 17 0x01, 0x42, 0x00, 0x28, 0xFF, 0xE1, 0x00, 0x08, 0x67, 0x42, 0x00, 0x28, |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 CreatePacket(test_packet.get(), kPacketDataOkWithFieldLen4, | 346 CreatePacket(test_packet.get(), kPacketDataOkWithFieldLen4, |
344 sizeof(kPacketDataOkWithFieldLen4)); | 347 sizeof(kPacketDataOkWithFieldLen4)); |
345 | 348 |
346 // Try out the actual conversion. This should fail due to missing extradata. | 349 // Try out the actual conversion. This should fail due to missing extradata. |
347 EXPECT_FALSE(converter.ConvertPacket(test_packet.get())); | 350 EXPECT_FALSE(converter.ConvertPacket(test_packet.get())); |
348 | 351 |
349 // Converted will be automatically cleaned up. | 352 // Converted will be automatically cleaned up. |
350 } | 353 } |
351 | 354 |
352 } // namespace media | 355 } // namespace media |
OLD | NEW |