blob: 8ec51ae336efdfa168f8ad2701587d12d411fd6d [file] [log] [blame]
Anders Carlssondc1b9f12017-11-10 13:15:04 +01001/*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include <jni.h>
12
13#include "modules/video_coding/codecs/vp9/include/vp9.h"
14#include "sdk/android/src/jni/jni_helpers.h"
15
16namespace webrtc {
17namespace jni {
18
19JNI_FUNCTION_DECLARATION(jlong,
20 VP9Encoder_createNativeEncoder,
21 JNIEnv* jni,
Sami Kalliomäkiaea1d1a2017-11-23 14:42:21 +010022 jobject) {
Magnus Jedvert46a27652017-11-13 14:10:02 +010023 return jlongFromPointer(VP9Encoder::Create().release());
Anders Carlssondc1b9f12017-11-10 13:15:04 +010024}
25
Anders Carlsson6cb76502017-11-14 13:09:12 +010026JNI_FUNCTION_DECLARATION(jboolean,
27 VP9Encoder_isSupported,
28 JNIEnv* jni,
29 jclass) {
30 return VP9Encoder::IsSupported();
31}
32
Anders Carlssondc1b9f12017-11-10 13:15:04 +010033JNI_FUNCTION_DECLARATION(jlong,
34 VP9Decoder_createNativeDecoder,
35 JNIEnv* jni,
Sami Kalliomäkiaea1d1a2017-11-23 14:42:21 +010036 jobject) {
Magnus Jedvert46a27652017-11-13 14:10:02 +010037 return jlongFromPointer(VP9Decoder::Create().release());
Anders Carlssondc1b9f12017-11-10 13:15:04 +010038}
39
Anders Carlsson6cb76502017-11-14 13:09:12 +010040JNI_FUNCTION_DECLARATION(jboolean,
41 VP9Decoder_isSupported,
42 JNIEnv* jni,
43 jclass) {
44 return VP9Decoder::IsSupported();
45}
46
Anders Carlssondc1b9f12017-11-10 13:15:04 +010047} // namespace jni
48} // namespace webrtc