| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 int num_queued_fragments() { return num_queued_fragments_; } | 326 int num_queued_fragments() { return num_queued_fragments_; } |
| 327 int num_decoded_frames() { return num_decoded_frames_; } | 327 int num_decoded_frames() { return num_decoded_frames_; } |
| 328 double frames_per_second(); | 328 double frames_per_second(); |
| 329 bool decoder_deleted() { return !decoder_.get(); } | 329 bool decoder_deleted() { return !decoder_.get(); } |
| 330 | 330 |
| 331 private: | 331 private: |
| 332 typedef std::map<int, media::PictureBuffer*> PictureBufferById; | 332 typedef std::map<int, media::PictureBuffer*> PictureBufferById; |
| 333 | 333 |
| 334 void SetState(ClientState new_state); | 334 void SetState(ClientState new_state); |
| 335 | 335 |
| 336 // Delete the associated OMX decoder helper. | 336 // Delete the associated decoder helper. |
| 337 void DeleteDecoder(); | 337 void DeleteDecoder(); |
| 338 | 338 |
| 339 // Compute & return the first encoded bytes (including a start frame) to send | 339 // Compute & return the first encoded bytes (including a start frame) to send |
| 340 // to the decoder, starting at |start_pos| and returning | 340 // to the decoder, starting at |start_pos| and returning |
| 341 // |num_fragments_per_decode| units. Skips to the first decodable position. | 341 // |num_fragments_per_decode| units. Skips to the first decodable position. |
| 342 std::string GetBytesForFirstFragments(size_t start_pos, size_t* end_pos); | 342 std::string GetBytesForFirstFragments(size_t start_pos, size_t* end_pos); |
| 343 // Compute & return the next encoded bytes to send to the decoder (based on | 343 // Compute & return the next encoded bytes to send to the decoder (based on |
| 344 // |start_pos| & |num_fragments_per_decode_|). | 344 // |start_pos| & |num_fragments_per_decode_|). |
| 345 std::string GetBytesForNextFragments(size_t start_pos, size_t* end_pos); | 345 std::string GetBytesForNextFragments(size_t start_pos, size_t* end_pos); |
| 346 // Helpers for GetRangeForNextFragments above. | 346 // Helpers for GetRangeForNextFragments above. |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 #elif defined(OS_CHROMEOS) | 1172 #elif defined(OS_CHROMEOS) |
| 1173 #if defined(ARCH_CPU_ARMEL) | 1173 #if defined(ARCH_CPU_ARMEL) |
| 1174 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); | 1174 content::ExynosVideoDecodeAccelerator::PreSandboxInitialization(); |
| 1175 #elif defined(ARCH_CPU_X86_FAMILY) | 1175 #elif defined(ARCH_CPU_X86_FAMILY) |
| 1176 content::VaapiWrapper::PreSandboxInitialization(); | 1176 content::VaapiWrapper::PreSandboxInitialization(); |
| 1177 #endif // ARCH_CPU_ARMEL | 1177 #endif // ARCH_CPU_ARMEL |
| 1178 #endif // OS_CHROMEOS | 1178 #endif // OS_CHROMEOS |
| 1179 | 1179 |
| 1180 return RUN_ALL_TESTS(); | 1180 return RUN_ALL_TESTS(); |
| 1181 } | 1181 } |
| OLD | NEW |