xref: /aosp_15_r20/external/webrtc/sdk/android/src/jni/dav1d_codec.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright 2021 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/av1/dav1d_decoder.h"
14 #include "sdk/android/generated_dav1d_jni/Dav1dDecoder_jni.h"
15 #include "sdk/android/src/jni/jni_helpers.h"
16 
17 namespace webrtc {
18 namespace jni {
19 
JNI_Dav1dDecoder_CreateDecoder(JNIEnv * jni)20 static jlong JNI_Dav1dDecoder_CreateDecoder(JNIEnv* jni) {
21   return jlongFromPointer(webrtc::CreateDav1dDecoder().release());
22 }
23 
24 }  // namespace jni
25 }  // namespace webrtc
26