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

Issue 1988043002: Call java SurfaceTextureHelper.dispose from the corresponding C++ destructor. (Closed)

Created:
4 years, 7 months ago by nisse-webrtc
Modified:
4 years, 6 months ago
Reviewers:
magjed_webrtc, tommi
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Call java SurfaceTextureHelper.dispose from the corresponding C++ destructor. This makes it clearer that the C++ SurfaceTextureHelper owns its associated java object it. In addition, arrange so that the SurfaceTextureHelper.stopListening method (in java) can be called from any thread. BUG= Committed: https://crrev.com/a44e72c44f4dcc2332819ffd089f182385aea08c Cr-Commit-Position: refs/heads/master@{#12941}

Patch Set 1 #

Patch Set 2 : Improve comment. #

Patch Set 3 : Use stopListening, and make it thread safe. #

Total comments: 9

Patch Set 4 : Define a helper invokeAtFrontUninterruptibly, and use it. #

Patch Set 5 : Rebase. #

Patch Set 6 : Make invokeAtFrontUninterruptibly work also on the handler's own thread. #

Patch Set 7 : Delete non-AtFront method. #

Patch Set 8 : Break a long line. #

Total comments: 2

Patch Set 9 : Indentation tweak. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -53 lines) Patch
M webrtc/api/androidtests/src/org/webrtc/SurfaceTextureHelperTest.java View 1 2 3 4 5 6 5 chunks +9 lines, -17 lines 0 comments Download
M webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -20 lines 0 comments Download
M webrtc/api/java/jni/androidvideocapturer_jni.cc View 1 2 3 4 1 chunk +0 lines, -7 lines 0 comments Download
M webrtc/api/java/jni/surfacetexturehelper_jni.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/api/java/jni/surfacetexturehelper_jni.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M webrtc/api/java/src/org/webrtc/MediaCodecVideoDecoder.java View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/base/java/src/org/webrtc/ThreadUtils.java View 1 2 3 4 5 6 7 2 chunks +25 lines, -6 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
nisse-webrtc
I don't quite understand the required ordering in this code. The method MediaCodecVideoDecoder.TextureListener.release used to ...
4 years, 7 months ago (2016-05-18 07:30:17 UTC) #2
magjed_webrtc
lgtm It's ok to call SurfaceTextureHelper.returnTextureFrame() after SurfaceTextureHelper.dispose(). The only important thing to make sure ...
4 years, 7 months ago (2016-05-18 08:57:25 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988043002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988043002/20001
4 years, 7 months ago (2016-05-18 11:14:50 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-18 13:20:13 UTC) #8
nisse-webrtc
I'm looking into how to support calling stopListening on any thread. The simplest approach would ...
4 years, 7 months ago (2016-05-23 13:07:47 UTC) #9
nisse-webrtc
Tried to make stopListening work on any thread, using the same post-and-barrier trick as dispose. ...
4 years, 7 months ago (2016-05-23 13:31:57 UTC) #10
magjed_webrtc
https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (left): https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#oldcode380 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:380: handler.removeCallbacks(setListenerRunnable); On 2016/05/23 13:31:57, nisse-webrtc wrote: > Is it ...
4 years, 7 months ago (2016-05-24 09:09:55 UTC) #11
nisse-webrtc
https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (left): https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#oldcode380 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:380: handler.removeCallbacks(setListenerRunnable); On 2016/05/24 09:09:55, magjed_webrtc wrote: > On 2016/05/23 ...
4 years, 7 months ago (2016-05-24 10:18:00 UTC) #12
magjed_webrtc
https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#newcode377 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:377: if (handler.getLooper().getThread() == Thread.currentThread()) { > Not sure what's ...
4 years, 7 months ago (2016-05-24 14:29:56 UTC) #13
nisse-webrtc
https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#newcode377 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:377: if (handler.getLooper().getThread() == Thread.currentThread()) { On 2016/05/24 14:29:56, magjed_webrtc ...
4 years, 7 months ago (2016-05-25 07:35:59 UTC) #14
magjed_webrtc
lgtm https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#newcode377 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:377: if (handler.getLooper().getThread() == Thread.currentThread()) { On 2016/05/25 07:35:59, ...
4 years, 7 months ago (2016-05-25 09:03:07 UTC) #15
nisse-webrtc
I'll try to land this now. https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/1988043002/diff/40001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#newcode377 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:377: if (handler.getLooper().getThread() == ...
4 years, 7 months ago (2016-05-25 11:35:51 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988043002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988043002/120001
4 years, 7 months ago (2016-05-25 11:36:04 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/5843)
4 years, 7 months ago (2016-05-25 11:42:40 UTC) #21
nisse-webrtc
Hi tommi, I need owners approval, primarily for ThreadUtils.java and MediaCodecVideoDecoder.java. I Per's absense, can ...
4 years, 7 months ago (2016-05-25 12:01:11 UTC) #24
tommi
lgtm https://codereview.webrtc.org/1988043002/diff/140001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/1988043002/diff/140001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#newcode382 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:382: @Override public void run() { is the indent ...
4 years, 7 months ago (2016-05-26 13:36:58 UTC) #25
nisse-webrtc
Fixed indent now. https://codereview.webrtc.org/1988043002/diff/140001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java File webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/1988043002/diff/140001/webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java#newcode382 webrtc/api/java/android/org/webrtc/SurfaceTextureHelper.java:382: @Override public void run() { On ...
4 years, 7 months ago (2016-05-26 13:55:14 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988043002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988043002/160001
4 years, 7 months ago (2016-05-26 13:55:37 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 7 months ago (2016-05-26 15:55:58 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1988043002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1988043002/160001
4 years, 6 months ago (2016-05-27 07:23:04 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 6 months ago (2016-05-27 07:28:05 UTC) #35
commit-bot: I haz the power
4 years, 6 months ago (2016-05-27 07:28:13 UTC) #37
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/a44e72c44f4dcc2332819ffd089f182385aea08c
Cr-Commit-Position: refs/heads/master@{#12941}

Powered by Google App Engine
This is Rietveld 408576698