OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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, and GLES2. | 7 // - RenderingHelper is charged with interacting with X11, EGL, and GLES2. |
8 // - ClientState is an enum for the state of the decode client used by the test. | 8 // - ClientState is an enum for the state of the decode client used by the test. |
9 // - ClientStateNotification is a barrier abstraction that allows the test code | 9 // - ClientStateNotification is a barrier abstraction that allows the test code |
10 // to be written sequentially and wait for the decode client to see certain | 10 // to be written sequentially and wait for the decode client to see certain |
11 // state transitions. | 11 // state transitions. |
12 // - EglRenderingVDAClient is a VideoDecodeAccelerator::Client implementation | 12 // - EglRenderingVDAClient is a VideoDecodeAccelerator::Client implementation |
13 // - Finally actual TEST cases are at the bottom of this file, using the above | 13 // - Finally actual TEST cases are at the bottom of this file, using the above |
14 // infrastructure. | 14 // infrastructure. |
15 | 15 |
16 #include <fcntl.h> | 16 #include <fcntl.h> |
17 #include <math.h> | 17 #include <math.h> |
18 #include <sys/stat.h> | 18 #include <sys/stat.h> |
19 #include <sys/types.h> | 19 #include <sys/types.h> |
20 | 20 |
21 // Include gtest.h out of order because <X11/X.h> #define's Bool & None, which | 21 // Include gtest.h out of order because <X11/X.h> #define's Bool & None, which |
22 // gtest uses as struct names (inside a namespace). This means that | 22 // gtest uses as struct names (inside a namespace). This means that |
23 // #include'ing gtest after anything that pulls in X.h fails to compile. | 23 // #include'ing gtest after anything that pulls in X.h fails to compile. |
24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
25 | 25 |
26 #include "base/at_exit.h" | 26 #include "base/at_exit.h" |
27 #include "base/file_util.h" | 27 #include "base/file_util.h" |
28 #include "base/stl_util-inl.h" | 28 #include "base/stl_util.h" |
29 #include "base/stringize_macros.h" | 29 #include "base/stringize_macros.h" |
30 #include "base/synchronization/condition_variable.h" | 30 #include "base/synchronization/condition_variable.h" |
31 #include "base/synchronization/lock.h" | 31 #include "base/synchronization/lock.h" |
32 #include "base/synchronization/waitable_event.h" | 32 #include "base/synchronization/waitable_event.h" |
33 #include "base/threading/thread.h" | 33 #include "base/threading/thread.h" |
34 #include "content/common/gpu/media/omx_video_decode_accelerator.h" | 34 #include "content/common/gpu/media/omx_video_decode_accelerator.h" |
35 #include "third_party/angle/include/EGL/egl.h" | 35 #include "third_party/angle/include/EGL/egl.h" |
36 #include "third_party/angle/include/GLES2/gl2.h" | 36 #include "third_party/angle/include/GLES2/gl2.h" |
37 | 37 |
38 #if !defined(OS_CHROMEOS) || !defined(ARCH_CPU_ARMEL) | 38 #if !defined(OS_CHROMEOS) || !defined(ARCH_CPU_ARMEL) |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 MakeTuple(1, kMaxSupportedNumConcurrentDecoders + 0, CS_RESET), | 862 MakeTuple(1, kMaxSupportedNumConcurrentDecoders + 0, CS_RESET), |
863 MakeTuple(1, kMaxSupportedNumConcurrentDecoders + 1, CS_RESET))); | 863 MakeTuple(1, kMaxSupportedNumConcurrentDecoders + 1, CS_RESET))); |
864 | 864 |
865 // TODO(fischman, vrk): add more tests! In particular: | 865 // TODO(fischman, vrk): add more tests! In particular: |
866 // - Test life-cycle: Seek/Stop/Pause/Play/RePlay for a single decoder. | 866 // - Test life-cycle: Seek/Stop/Pause/Play/RePlay for a single decoder. |
867 // - Test alternate configurations | 867 // - Test alternate configurations |
868 // - Test failure conditions. | 868 // - Test failure conditions. |
869 // - Test frame size changes mid-stream | 869 // - Test frame size changes mid-stream |
870 | 870 |
871 } // namespace | 871 } // namespace |
OLD | NEW |