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

Issue 1440343002: Reland again 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 yet again relands without modification https://codereview.webrtc.org/1422963003/ It do the following: The SurfaceTexture.updateTexImage() calls are moved from the video renderers into MediaCodecVideoDecoder, and the destructor of the texture frames will signal MediaCodecVideoDecoder that the frame has returned. This CL also removes the SurfaceTexture from the native handle and only exposes the texture matrix instead, because only the video source should access the SurfaceTexture. It moves the responsibility of calculating the decode time to Java. Patchset2 Refactor MediaCodecVideoDecoder to drop frames if a texture is not released. R=magjed@webrtc.org Committed: https://crrev.com/488e75f11b840dfbe636a9ea9bbc18252e7c59f0 Cr-Commit-Position: refs/heads/master@{#10706}

Patch Set 1 #

Patch Set 2 : Drop frames if texture is not returned #

Total comments: 13

Patch Set 3 : WIP #

Patch Set 4 : Changed decode drain code to call multiple times with low timeout. #

Total comments: 1

Patch Set 5 : Added comment. #

Total comments: 12

Patch Set 6 : Addressed magjeds comments. #

Patch Set 7 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+424 lines, -313 lines) Patch
M talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.java View 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 2 chunks +1 line, -18 lines 0 comments Download
M talk/app/webrtc/java/android/org/webrtc/VideoRendererGui.java View 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 22 chunks +133 lines, -116 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 chunk +1 line, -1 line 0 comments Download
M talk/app/webrtc/java/jni/native_handle_impl.h View 1 2 3 4 5 6 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 2 chunks +4 lines, -4 lines 0 comments Download
M talk/app/webrtc/java/jni/surfacetexturehelper_jni.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M talk/app/webrtc/java/jni/surfacetexturehelper_jni.cc View 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 12 chunks +241 lines, -63 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: 20 (6 generated)
perkj_webrtc
Please?
5 years, 1 month ago (2015-11-13 16:44:20 UTC) #3
magjed_webrtc
https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode463 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:463: You can set |isWaitingForTexture| to false here instead of ...
5 years, 1 month ago (2015-11-16 12:56:48 UTC) #4
perkj_webrtc
Still working on magjeds comments. Also, we can not wait on each frame. After starting ...
5 years, 1 month ago (2015-11-16 16:00:09 UTC) #5
AlexG
https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode573 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:573: DecodedOutputBuffer outputBuffer = dequeueOutputBuffer(dequeueTimeoutMs); If dequeueTimeoutMs > 0 (in ...
5 years, 1 month ago (2015-11-17 00:47:35 UTC) #6
perkj_webrtc
PTAL https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode573 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:573: DecodedOutputBuffer outputBuffer = dequeueOutputBuffer(dequeueTimeoutMs); On 2015/11/17 00:47:35, AlexG ...
5 years, 1 month ago (2015-11-17 11:02:19 UTC) #7
magjed_webrtc
https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode426 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:426: // |isWaitingForTexture| is true when waiting for the transition: ...
5 years, 1 month ago (2015-11-17 11:58:19 UTC) #8
perkj_webrtc
Looks pretty good now right? PTAL https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java File talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java (right): https://codereview.webrtc.org/1440343002/diff/20001/talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java#newcode426 talk/app/webrtc/java/src/org/webrtc/MediaCodecVideoDecoder.java:426: // |isWaitingForTexture| is ...
5 years, 1 month ago (2015-11-17 12:44:20 UTC) #9
magjed_webrtc
lgtm
5 years, 1 month ago (2015-11-17 12:53:12 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1440343002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1440343002/100001
5 years, 1 month ago (2015-11-19 06:59:51 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_rel/builds/9128)
5 years, 1 month ago (2015-11-19 07:31:04 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1440343002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1440343002/100001
5 years, 1 month ago (2015-11-19 09:10:38 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_rel/builds/9134)
5 years, 1 month ago (2015-11-19 09:17:35 UTC) #18
perkj_webrtc
Committed patchset #7 (id:120001) manually as 488e75f11b840dfbe636a9ea9bbc18252e7c59f0 (presubmit successful).
5 years, 1 month ago (2015-11-19 09:43:51 UTC) #19
commit-bot: I haz the power
5 years, 1 month ago (2015-11-19 09:43:59 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/488e75f11b840dfbe636a9ea9bbc18252e7c59f0
Cr-Commit-Position: refs/heads/master@{#10706}

Powered by Google App Engine
This is Rietveld 408576698