Automate conversion from c++ VideoCodeType to java VideoCodecType
Bug: b/148146536 Change-Id: I030c7c6c2a1a9d002bcc60f45c8d6025bd0935b8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167301 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30751}
This commit is contained in:
committed by
Commit Bot
parent
984dc32776
commit
59f3b71c04
@ -213,10 +213,8 @@ int32_t MediaCodecVideoDecoder::InitDecodeOnCodecThread() {
|
||||
|
||||
ResetVariables();
|
||||
|
||||
ScopedJavaLocalRef<jobject> j_video_codec_enum =
|
||||
Java_VideoCodecType_fromNativeIndex(jni, codecType_);
|
||||
bool success = Java_MediaCodecVideoDecoder_initDecode(
|
||||
jni, j_media_codec_video_decoder_, j_video_codec_enum, codec_.width,
|
||||
jni, j_media_codec_video_decoder_, codecType_, codec_.width,
|
||||
codec_.height);
|
||||
|
||||
if (CheckException(jni) || !success) {
|
||||
|
||||
@ -512,11 +512,9 @@ int32_t MediaCodecVideoEncoder::InitEncodeInternal(int width,
|
||||
frames_received_since_last_key_ = kMinKeyFrameInterval;
|
||||
|
||||
// We enforce no extra stride/padding in the format creation step.
|
||||
ScopedJavaLocalRef<jobject> j_video_codec_enum =
|
||||
Java_VideoCodecType_fromNativeIndex(jni, codec_type);
|
||||
const bool encode_status = Java_MediaCodecVideoEncoder_initEncode(
|
||||
jni, j_media_codec_video_encoder_, j_video_codec_enum, profile_, width,
|
||||
height, kbps, fps, use_surface);
|
||||
jni, j_media_codec_video_encoder_, codec_type, profile_, width, height,
|
||||
kbps, fps, use_surface);
|
||||
|
||||
if (!encode_status) {
|
||||
ALOGE << "Failed to configure encoder.";
|
||||
|
||||
Reference in New Issue
Block a user