| 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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
| 6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
| 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
| 8 // Win/EGL. | 8 // Win/EGL. |
| 9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
| 10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 if (result != H264Parser::kOk) { | 1002 if (result != H264Parser::kOk) { |
| 1003 // Let the VDA figure out there's something wrong with the stream. | 1003 // Let the VDA figure out there's something wrong with the stream. |
| 1004 return false; | 1004 return false; |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 return nalu.nal_unit_type == H264NALU::kSPS; | 1007 return nalu.nal_unit_type == H264NALU::kSPS; |
| 1008 } else if (profile >= VP8PROFILE_MIN && profile <= VP9PROFILE_MAX) { | 1008 } else if (profile >= VP8PROFILE_MIN && profile <= VP9PROFILE_MAX) { |
| 1009 return (size > 0 && !(data[0] & 0x01)); | 1009 return (size > 0 && !(data[0] & 0x01)); |
| 1010 } | 1010 } |
| 1011 // Shouldn't happen at this point. | 1011 // Shouldn't happen at this point. |
| 1012 LOG(FATAL) << "Invalid profile: " << profile; | 1012 LOG(FATAL) << "Invalid profile: " << GetProfileName(profile); |
| 1013 return false; | 1013 return false; |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 void GLRenderingVDAClient::DecodeNextFragment() { | 1016 void GLRenderingVDAClient::DecodeNextFragment() { |
| 1017 if (decoder_deleted()) | 1017 if (decoder_deleted()) |
| 1018 return; | 1018 return; |
| 1019 if (encoded_data_next_pos_to_decode_ == encoded_data_.size()) | 1019 if (encoded_data_next_pos_to_decode_ == encoded_data_.size()) |
| 1020 return; | 1020 return; |
| 1021 size_t end_pos; | 1021 size_t end_pos; |
| 1022 std::string next_fragment_bytes; | 1022 std::string next_fragment_bytes; |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1841 | 1841 |
| 1842 media::g_env = | 1842 media::g_env = |
| 1843 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( | 1843 reinterpret_cast<media::VideoDecodeAcceleratorTestEnvironment*>( |
| 1844 testing::AddGlobalTestEnvironment( | 1844 testing::AddGlobalTestEnvironment( |
| 1845 new media::VideoDecodeAcceleratorTestEnvironment())); | 1845 new media::VideoDecodeAcceleratorTestEnvironment())); |
| 1846 | 1846 |
| 1847 return base::LaunchUnitTestsSerially( | 1847 return base::LaunchUnitTestsSerially( |
| 1848 argc, argv, | 1848 argc, argv, |
| 1849 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); | 1849 base::Bind(&media::VDATestSuite::Run, base::Unretained(&test_suite))); |
| 1850 } | 1850 } |
| OLD | NEW |