| 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> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 avc_config.pps_list[0].push_back(0x68); | 441 avc_config.pps_list[0].push_back(0x68); |
| 442 avc_config.pps_list[0].push_back(0x56); | 442 avc_config.pps_list[0].push_back(0x56); |
| 443 avc_config.pps_list[0].push_back(0x78); | 443 avc_config.pps_list[0].push_back(0x78); |
| 444 | 444 |
| 445 for (size_t i = 0; i < arraysize(test_cases); ++i) { | 445 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
| 446 std::vector<uint8_t> buf; | 446 std::vector<uint8_t> buf; |
| 447 std::vector<SubsampleEntry> subsamples; | 447 std::vector<SubsampleEntry> subsamples; |
| 448 | 448 |
| 449 StringToAnnexB(test_cases[i].input, &buf, &subsamples); | 449 StringToAnnexB(test_cases[i].input, &buf, &subsamples); |
| 450 | 450 |
| 451 EXPECT_TRUE(AVC::InsertParamSetsAnnexB(avc_config, &buf, &subsamples)) | 451 EXPECT_TRUE(AVC::InsertParamSetsAnnexB(avc_config, &buf, &subsamples, true)) |
| 452 << "'" << test_cases[i].input << "' insert failed."; | 452 << "'" << test_cases[i].input << "' insert failed."; |
| 453 EXPECT_TRUE(AVC::IsValidAnnexB(buf, subsamples)) | 453 EXPECT_TRUE(AVC::IsValidAnnexB(buf, subsamples)) |
| 454 << "'" << test_cases[i].input << "' created invalid AnnexB."; | 454 << "'" << test_cases[i].input << "' created invalid AnnexB."; |
| 455 EXPECT_EQ(test_cases[i].expected, AnnexBToString(buf, subsamples)) | 455 EXPECT_EQ(test_cases[i].expected, AnnexBToString(buf, subsamples)) |
| 456 << "'" << test_cases[i].input << "' generated unexpected output."; | 456 << "'" << test_cases[i].input << "' generated unexpected output."; |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 | 459 |
| 460 } // namespace mp4 | 460 } // namespace mp4 |
| 461 } // namespace media | 461 } // namespace media |
| OLD | NEW |