Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: talk/app/webrtc/java/jni/androidmediadecoder_jni.cc

Issue 1338943003: Android MediaCodecVideoDecoder: Remove redundant useSurface arguments (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Keep |useSurface| in MediaCodecVideoDecoder Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
index 6fb06d03f3804eb9eb58d861ce3ba19902696132..a6f7da3f61d0fa9e8d5476ba1d7eddf9e33f86cf 100644
--- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
+++ b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
@@ -188,7 +188,7 @@ MediaCodecVideoDecoder::MediaCodecVideoDecoder(
j_init_decode_method_ = GetMethodID(
jni, *j_media_codec_video_decoder_class_, "initDecode",
"(Lorg/webrtc/MediaCodecVideoDecoder$VideoCodecType;"
- "IIZLandroid/opengl/EGLContext;)Z");
+ "IILandroid/opengl/EGLContext;)Z");
j_release_method_ =
GetMethodID(jni, *j_media_codec_video_decoder_class_, "release", "()V");
j_dequeue_input_buffer_method_ = GetMethodID(
@@ -199,7 +199,7 @@ MediaCodecVideoDecoder::MediaCodecVideoDecoder(
jni, *j_media_codec_video_decoder_class_, "dequeueOutputBuffer",
"(I)Lorg/webrtc/MediaCodecVideoDecoder$DecoderOutputBufferInfo;");
j_release_output_buffer_method_ = GetMethodID(
- jni, *j_media_codec_video_decoder_class_, "releaseOutputBuffer", "(IZ)Z");
+ jni, *j_media_codec_video_decoder_class_, "releaseOutputBuffer", "(I)Z");
j_input_buffers_field_ = GetFieldID(
jni, *j_media_codec_video_decoder_class_,
@@ -235,7 +235,7 @@ MediaCodecVideoDecoder::MediaCodecVideoDecoder(
jni, j_decoder_output_buffer_info_class, "presentationTimestampUs", "J");
CHECK_EXCEPTION(jni) << "MediaCodecVideoDecoder ctor failed";
- use_surface_ = (render_egl_context_ != NULL) ? true : false;
+ use_surface_ = (render_egl_context_ != NULL);
ALOGD("MediaCodecVideoDecoder ctor. Use surface: %d", use_surface_);
memset(&codec_, 0, sizeof(codec_));
AllowBlockingCalls();
@@ -309,8 +309,7 @@ int32_t MediaCodecVideoDecoder::InitDecodeOnCodecThread() {
j_video_codec_enum,
codec_.width,
codec_.height,
- use_surface_,
- render_egl_context_);
+ use_surface_ ? render_egl_context_ : nullptr);
if (CheckException(jni) || !success) {
ALOGE("Codec initialization error - fallback to SW codec.");
sw_fallback_required_ = true;
@@ -666,8 +665,7 @@ bool MediaCodecVideoDecoder::DeliverPendingOutputs(
bool success = jni->CallBooleanMethod(
*j_media_codec_video_decoder_,
j_release_output_buffer_method_,
- output_buffer_index,
- use_surface_);
+ output_buffer_index);
if (CheckException(jni) || !success) {
ALOGE("releaseOutputBuffer error");
return false;
« no previous file with comments | « no previous file | talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698