Add libaom AV1 encoder java buildtargets.
Bug: webrtc:13573 Change-Id: Iec5d52a0e095e8b69427239ff7ff7b1a5b56db35 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254581 Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36172}
This commit is contained in:
parent
09d488b352
commit
870ffe7443
@ -499,6 +499,17 @@ if (is_android) {
|
||||
]
|
||||
}
|
||||
|
||||
rtc_android_library("libaom_av1_encoder_java") {
|
||||
visibility = [ "*" ]
|
||||
sources = [ "api/org/webrtc/LibaomAv1Encoder.java" ]
|
||||
deps = [
|
||||
":base_java",
|
||||
":video_api_java",
|
||||
":video_java",
|
||||
"//rtc_base:base_java",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_android_library("libaom_av1_java") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
@ -848,6 +859,18 @@ if (current_os == "linux" || is_android) {
|
||||
]
|
||||
}
|
||||
|
||||
rtc_library("libaom_av1_encoder_jni") {
|
||||
visibility = [ "*" ]
|
||||
allow_poison = [ "software_video_codecs" ]
|
||||
sources = [ "src/jni/libaom_av1_encoder.cc" ]
|
||||
deps = [
|
||||
":base_jni",
|
||||
":generated_libaom_av1_encoder_jni",
|
||||
":video_jni",
|
||||
"../../modules/video_coding/codecs/av1:libaom_av1_encoder",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_library("libaom_av1_jni_if_supported") {
|
||||
visibility = [ "*" ]
|
||||
allow_poison = [ "software_video_codecs" ]
|
||||
@ -1313,6 +1336,13 @@ if (current_os == "linux" || is_android) {
|
||||
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||||
}
|
||||
|
||||
generate_jni("generated_libaom_av1_encoder_jni") {
|
||||
sources = [ "api/org/webrtc/LibaomAv1Encoder.java" ]
|
||||
|
||||
namespace = "webrtc::jni"
|
||||
jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h"
|
||||
}
|
||||
|
||||
generate_jni("generated_libaom_av1_jni_if_supported") {
|
||||
sources = [
|
||||
"api/org/webrtc/LibaomAv1Decoder.java",
|
||||
|
||||
25
sdk/android/api/org/webrtc/LibaomAv1Encoder.java
Normal file
25
sdk/android/api/org/webrtc/LibaomAv1Encoder.java
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (c) 2021 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
package org.webrtc;
|
||||
|
||||
public class LibaomAv1Encoder extends WrappedNativeVideoEncoder {
|
||||
@Override
|
||||
public long createNativeVideoEncoder() {
|
||||
return nativeCreateEncoder();
|
||||
}
|
||||
|
||||
static native long nativeCreateEncoder();
|
||||
|
||||
@Override
|
||||
public boolean isHardwareEncoder() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
25
sdk/android/src/jni/libaom_av1_encoder.cc
Normal file
25
sdk/android/src/jni/libaom_av1_encoder.cc
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2021 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "modules/video_coding/codecs/av1/libaom_av1_encoder.h"
|
||||
#include "sdk/android/generated_libaom_av1_encoder_jni/LibaomAv1Encoder_jni.h"
|
||||
#include "sdk/android/src/jni/jni_helpers.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace jni {
|
||||
|
||||
static jlong JNI_LibaomAv1Encoder_CreateEncoder(JNIEnv* jni) {
|
||||
return jlongFromPointer(webrtc::CreateLibaomAv1Encoder().release());
|
||||
}
|
||||
|
||||
} // namespace jni
|
||||
} // namespace webrtc
|
||||
Loading…
x
Reference in New Issue
Block a user