Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: media/gpu/video_encode_accelerator_unittest.cc

Issue 2274493002: V4L2VEA: Improve H264 stream header handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/gpu/v4l2_video_encode_accelerator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « media/gpu/v4l2_video_encode_accelerator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698