Set is_hardware_accelerated=true in JNI decoder wrapper

Assume that all Java decoders are hardware-accelerated.

Bug: b/261160916, webrtc:14852
Change-Id: I4c61839258c86ec9322b82d291542e2df6fd2ff1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295863
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39457}
This commit is contained in:
Sergey Silkin 2023-03-02 13:55:23 +01:00 committed by WebRTC LUCI CQ
parent d2afbaf33f
commit c494846bdf
2 changed files with 9 additions and 0 deletions

View File

@ -150,6 +150,13 @@ const char* VideoDecoderWrapper::ImplementationName() const {
return implementation_name_.c_str();
}
VideoDecoder::DecoderInfo VideoDecoderWrapper::GetDecoderInfo() const {
VideoDecoder::DecoderInfo decoder_info;
decoder_info.implementation_name = implementation_name_;
decoder_info.is_hardware_accelerated = true;
return decoder_info;
}
void VideoDecoderWrapper::OnDecodedFrame(
JNIEnv* env,
const JavaRef<jobject>& j_frame,

View File

@ -48,6 +48,8 @@ class VideoDecoderWrapper : public VideoDecoder {
const char* ImplementationName() const override;
DecoderInfo GetDecoderInfo() const override;
// Wraps the frame to a AndroidVideoBuffer and passes it to the callback.
void OnDecodedFrame(JNIEnv* env,
const JavaRef<jobject>& j_frame,