1 // Copyright 2019 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef C2_E2E_TEST_E2E_TEST_JNI_H_
6 #define C2_E2E_TEST_E2E_TEST_JNI_H_
7 
8 #include <android/native_window.h>
9 
10 namespace android {
11 
12 // Callback to communicate from the test back to the Activity.
13 class ConfigureCallback {
14 public:
15     // Provides a reference to the current test's codec, or clears the reference.
16     virtual void OnCodecReady(void* codec) = 0;
17     // Configures the surface with the size of the current video.
18     virtual void OnSizeChanged(int width, int height) = 0;
19     virtual ~ConfigureCallback() = default;
20 };
21 
22 }  // namespace android
23 
24 int RunDecoderTests(char** test_args, int test_args_count, ANativeWindow* window,
25                     android::ConfigureCallback* cb);
26 
27 int RunEncoderTests(char** test_args, int test_args_count, android::ConfigureCallback* cb);
28 
29 #endif  // C2_E2E_TEST_E2E_TEST_JNI_H_
30