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 <inttypes.h> | 5 #include <inttypes.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 | 584 |
585 switch (nalu.nal_unit_type) { | 585 switch (nalu.nal_unit_type) { |
586 case H264NALU::kIDRSlice: | 586 case H264NALU::kIDRSlice: |
587 ASSERT_TRUE(seen_sps_); | 587 ASSERT_TRUE(seen_sps_); |
588 ASSERT_TRUE(seen_pps_); | 588 ASSERT_TRUE(seen_pps_); |
589 seen_idr_ = true; | 589 seen_idr_ = true; |
590 keyframe = true; | 590 keyframe = true; |
591 // fallthrough | 591 // fallthrough |
592 case H264NALU::kNonIDRSlice: { | 592 case H264NALU::kNonIDRSlice: { |
593 ASSERT_TRUE(seen_idr_); | 593 ASSERT_TRUE(seen_idr_); |
| 594 seen_sps_ = seen_pps_ = false; |
594 if (!frame_cb_.Run(keyframe)) | 595 if (!frame_cb_.Run(keyframe)) |
595 return; | 596 return; |
596 break; | 597 break; |
597 } | 598 } |
598 | 599 |
599 case H264NALU::kSPS: { | 600 case H264NALU::kSPS: { |
600 int sps_id; | 601 int sps_id; |
601 ASSERT_EQ(H264Parser::kOk, h264_parser_.ParseSPS(&sps_id)); | 602 ASSERT_EQ(H264Parser::kOk, h264_parser_.ParseSPS(&sps_id)); |
602 seen_sps_ = true; | 603 seen_sps_ = true; |
603 break; | 604 break; |
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 | 1941 |
1941 media::g_env = | 1942 media::g_env = |
1942 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>( | 1943 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>( |
1943 testing::AddGlobalTestEnvironment( | 1944 testing::AddGlobalTestEnvironment( |
1944 new media::VideoEncodeAcceleratorTestEnvironment( | 1945 new media::VideoEncodeAcceleratorTestEnvironment( |
1945 std::move(test_stream_data), log_path, run_at_fps, | 1946 std::move(test_stream_data), log_path, run_at_fps, |
1946 needs_encode_latency, verify_all_output))); | 1947 needs_encode_latency, verify_all_output))); |
1947 | 1948 |
1948 return RUN_ALL_TESTS(); | 1949 return RUN_ALL_TESTS(); |
1949 } | 1950 } |
OLD | NEW |