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

Issue 1422963003: Android MediaCodecVideoDecoder: Manage lifetime of texture frames (Closed)

Created:
5 years, 1 month ago by perkj_webrtc
Modified:
5 years, 1 month ago
Reviewers:
magjed_webrtc, AlexG
CC:
webrtc-reviews_webrtc.org, yujie_mao (webrtc), Andrew MacDonald, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Patchset 1 is a pure revert of "Revert of "Android MediaCodecVideoDecoder: Manage lifetime of texture frames" https://codereview.webrtc.org/1378033003/ Following patchsets move the responsibility of calculating the decode time to Java. TESTED= Apprtc loopback using H264 and VP8 on N5, N6, N7, S5 Committed: https://crrev.com/9cb8982e64f08d3d630bf7c3d2bcc78c10db88e2 Cr-Commit-Position: refs/heads/master@{#10597}

Patch Set 1 : Pure revert of the revert. #

Patch Set 2 : #

Total comments: 29

Patch Set 3 : Addressed comments and further refactored. #

Total comments: 15

Patch Set 4 : Rebased #

Patch Set 5 : Fix #

Total comments: 29

Patch Set 6 : Addressed comments. #

Patch Set 7 : Added frame dropping. #

Total comments: 6

Patch Set 8 : Addressed comments. #

Total comments: 18

Patch Set 9 : rebased #

Patch Set 10 : Addressed comments. #

Total comments: 2

Patch Set 11 : Moved FrameDelay to Java. #

Total comments: 4

Patch Set 12 : Addressed magjeds comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -272 lines) Patch
M talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java View 1 2 3 4 5 6 7 4 chunks +4 lines, -8 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/SurfaceViewRenderer.java View 1 2 3 4 5 6 7 2 chunks +1 line, -18 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java View 1 2 3 2 chunks +3 lines, -18 lines 0 comments Download
M talk/app/webrtc/java/jni/androidmediadecoder_jni.cc View 1 2 3 4 5 6 7 8 9 10 22 chunks +91 lines, -81 lines 0 comments Download
M talk/app/webrtc/java/jni/androidvideocapturer_jni.h View 2 chunks +2 lines, -2 lines 0 comments Download
M talk/app/webrtc/java/jni/androidvideocapturer_jni.cc View 2 chunks +6 lines, -12 lines 0 comments Download
M talk/app/webrtc/java/jni/classreferenceholder.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M talk/app/webrtc/java/jni/native_handle_impl.h View 1 chunk +6 lines, -31 lines 0 comments Download
M talk/app/webrtc/java/jni/native_handle_impl.cc View 2 chunks +4 lines, -32 lines 0 comments Download
M talk/app/webrtc/java/jni/peerconnection_jni.cc View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M talk/app/webrtc/java/jni/surfacetexturehelper_jni.h View 1 chunk +1 line, -1 line 0 comments Download
M talk/app/webrtc/java/jni/surfacetexturehelper_jni.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +211 lines, -57 lines 0 comments Download
M talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java View 3 chunks +17 lines, -6 lines 0 comments Download

Messages

Total messages: 34 (12 generated)
perkj_webrtc
Hi, can you take a look and we can discuss the idea? https://codereview.webrtc.org/1422963003/diff/40001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java ...
5 years, 1 month ago (2015-10-27 20:46:15 UTC) #4
magjed_webrtc
This approach looks good. https://codereview.webrtc.org/1422963003/diff/40001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): https://codereview.webrtc.org/1422963003/diff/40001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode601 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:601: output_timestamps_ms = timestamp_ns / rtc::kNumNanosecsPerMillisec; ...
5 years, 1 month ago (2015-10-28 11:57:16 UTC) #6
perkj_webrtc
PTAL I will do the generic_decoder changes in a separate cl. https://codereview.webrtc.org/1422963003/diff/40001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): ...
5 years, 1 month ago (2015-10-28 21:12:40 UTC) #7
magjed_webrtc
https://codereview.webrtc.org/1422963003/diff/40001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1422963003/diff/40001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode472 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:472: outputBuffers = mediaCodec.getOutputBuffers(); On 2015/10/28 21:12:39, perkj1 wrote: > ...
5 years, 1 month ago (2015-10-29 09:44:13 UTC) #8
perkj_webrtc
PTAL https://codereview.webrtc.org/1422963003/diff/60001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): https://codereview.webrtc.org/1422963003/diff/60001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode206 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:206: jni, *j_media_codec_video_decoder_class_, "dequeueTextureBuffer", On 2015/10/29 09:44:13, magjed_webrtc wrote: ...
5 years, 1 month ago (2015-10-29 19:26:45 UTC) #10
magjed_webrtc
https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode501 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:501: frames_received_, frames_decoded_); Revert indentation change? https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode719 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:719: ALOGV("Decoder frame ...
5 years, 1 month ago (2015-10-30 12:28:11 UTC) #11
perkj_webrtc
Hi, Alex, can you take a first pass as well even though I have not ...
5 years, 1 month ago (2015-10-30 14:07:59 UTC) #13
AlexG
https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode719 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:719: ALOGV("Decoder frame out # %d. %d x %d. %d ...
5 years, 1 month ago (2015-10-30 21:06:10 UTC) #14
perkj_webrtc
PTAL https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode501 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:501: frames_received_, frames_decoded_); On 2015/10/30 12:28:10, magjed_webrtc wrote: > ...
5 years, 1 month ago (2015-11-06 14:31:12 UTC) #17
magjed_webrtc
https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1422963003/diff/120001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode513 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:513: // rendered at the time. On 2015/11/06 14:31:12, perkj1 ...
5 years, 1 month ago (2015-11-09 16:30:52 UTC) #18
perkj_webrtc
PTAL I will land the generic_decoder changes in https://codereview.webrtc.org/1414693006/. Except for that, are you ok ...
5 years, 1 month ago (2015-11-09 16:53:50 UTC) #20
magjed_webrtc
lgtm
5 years, 1 month ago (2015-11-09 17:10:39 UTC) #21
AlexG
With this change will updateTexImage be called on decoder thread? Can it lead to video ...
5 years, 1 month ago (2015-11-10 01:21:39 UTC) #22
perkj_webrtc
I will try to reproduce the tearing issue with the old renderer tomorrow. If I ...
5 years, 1 month ago (2015-11-10 13:58:15 UTC) #23
AlexG
lgtm Hopefully last comments. Please also check if tearing problem is solved before submitting this ...
5 years, 1 month ago (2015-11-11 01:54:06 UTC) #24
perkj_webrtc
https://codereview.webrtc.org/1422963003/diff/240001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc File talk/app/webrtc/java/jni/androidmediadecoder_jni.cc (right): https://codereview.webrtc.org/1422963003/diff/240001/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc#newcode708 talk/app/webrtc/java/jni/androidmediadecoder_jni.cc:708: int64_t frame_delayed_ms = 0; On 2015/11/11 01:54:06, AlexG wrote: ...
5 years, 1 month ago (2015-11-11 07:15:31 UTC) #25
magjed_webrtc
https://codereview.webrtc.org/1422963003/diff/300001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1422963003/diff/300001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode388 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:388: // Since there there is only one texture, this ...
5 years, 1 month ago (2015-11-11 10:09:53 UTC) #26
perkj_webrtc
https://codereview.webrtc.org/1422963003/diff/300001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1422963003/diff/300001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode388 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:388: // Since there there is only one texture, this ...
5 years, 1 month ago (2015-11-11 10:34:30 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1422963003/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1422963003/320001
5 years, 1 month ago (2015-11-11 10:34:56 UTC) #31
commit-bot: I haz the power
Committed patchset #12 (id:320001)
5 years, 1 month ago (2015-11-11 11:27:06 UTC) #32
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/9cb8982e64f08d3d630bf7c3d2bcc78c10db88e2 Cr-Commit-Position: refs/heads/master@{#10597}
5 years, 1 month ago (2015-11-11 11:27:13 UTC) #33
perkj_webrtc
5 years, 1 month ago (2015-11-13 14:56:42 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #12 id:320001) has been created in
https://codereview.webrtc.org/1441363002/ by perkj@webrtc.org.

The reason for reverting is: Causes fallback to SW decoder if a renderer is put
in the background..

Powered by Google App Engine
This is Rietveld 408576698