Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(1)

Issue 2977643002: Add texture support to HardwareVideoDecoder. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 months, 1 week ago by mellem
Modified:
2 months ago
Reviewers:
AlexG, aburago, pthatcher1, sakal
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add texture support to HardwareVideoDecoder. HardwareVideoDecoder is now a listener for SurfaceTextureHelper. It takes a SurfaceTextureHelper on construction. If it is non-null, it operates in texture mode instead of byte-buffer mode. When in texture mode, the HardwareVideoDecoder renders output frames to a Surface, listens for the texture frame to become available, wraps it in a VideoFrame, and pushes it to the decoder callback. As in MediaCodecVideoDecoder, it may queue up to three buffers while waiting for the surface to become available for rendering. If more buffers are queued, it will drop the oldest. This change also implements the VideoFrame.TextureBuffer and reorganizes code for wrapping an existing ByteBuffer into an I420Buffer. This makes it easier to implement the texture buffer's ToI420() method. BUG=webrtc:7760 R=pthatcher@webrtc.org, sakal@webrtc.org Review-Url: https://codereview.webrtc.org/2977643002 . Cr-Commit-Position: refs/heads/master@{#19081} Committed: https://chromium.googlesource.com/external/webrtc/+/8fb23618d8e3c2a20832006d361f99161b4980bd

Patch Set 1 #

Total comments: 19

Patch Set 2 : Address review comments #

Patch Set 3 : Remove unused imports #

Total comments: 8

Patch Set 4 : Remove unused variables, add comments, and fix the matrix helper #

Patch Set 5 : Remove unused variables, add comments, and fix the matrix helper #

Unified diffs Side-by-side diffs Delta from patch set Stats (+452 lines, -145 lines) Patch
M webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java View 1 2 chunks +18 lines, -1 line 0 comments Download
M webrtc/sdk/android/api/org/webrtc/RendererCommon.java View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M webrtc/sdk/android/api/org/webrtc/SurfaceTextureHelper.java View 1 2 3 2 chunks +93 lines, -0 lines 0 comments Download
M webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoDecoderTest.java View 1 6 chunks +113 lines, -3 lines 0 comments Download
M webrtc/sdk/android/instrumentationtests/src/org/webrtc/HardwareVideoEncoderTest.java View 1 1 chunk +1 line, -1 line 0 comments Download
M webrtc/sdk/android/src/java/org/webrtc/HardwareVideoDecoder.java View 1 2 3 9 chunks +146 lines, -122 lines 0 comments Download
M webrtc/sdk/android/src/java/org/webrtc/I420BufferImpl.java View 1 3 chunks +66 lines, -18 lines 0 comments Download
Commit queue not available (can’t edit this change).

Messages

Total messages: 32 (12 generated)
mellem
2 months, 1 week ago (2017-07-11 00:15:35 UTC) #3
pthatcher1
https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java File webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java (right): https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java#newcode47 webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java:47: public VideoDecoder createDecoder(String codecType) { Would it make more ...
2 months, 1 week ago (2017-07-11 18:30:25 UTC) #5
pthatcher1
On 2017/07/11 18:30:25, pthatcher1 wrote: > https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java > File webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java (right): > > https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java#newcode47 > ...
2 months, 1 week ago (2017-07-11 18:30:45 UTC) #6
mellem
https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java File webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java (right): https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java#newcode47 webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java:47: public VideoDecoder createDecoder(String codecType) { On 2017/07/11 18:30:24, pthatcher1 ...
2 months, 1 week ago (2017-07-11 20:51:42 UTC) #7
mellem
I noticed Sami is out. Alex, would you please take a look instead?
2 months, 1 week ago (2017-07-12 00:15:20 UTC) #9
mellem
I noticed Sami is out. Alex, would you please take a look instead?
2 months, 1 week ago (2017-07-12 00:15:23 UTC) #10
pthatcher1
On 2017/07/11 20:51:42, mellem wrote: > https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java > File webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java (right): > > https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java#newcode47 > ...
2 months, 1 week ago (2017-07-12 22:41:02 UTC) #11
pthatcher1
lgtm
2 months, 1 week ago (2017-07-12 22:41:07 UTC) #12
sakal
https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java File webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java (right): https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java#newcode32 webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java:32: @Deprecated // Not removed yet to avoid breaking callers. ...
2 months ago (2017-07-17 13:44:56 UTC) #13
mellem
https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java File webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java (right): https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java#newcode32 webrtc/sdk/android/api/org/webrtc/HardwareVideoDecoderFactory.java:32: @Deprecated // Not removed yet to avoid breaking callers. ...
2 months ago (2017-07-17 21:57:15 UTC) #14
sakal
lgtm with comments addressed https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/src/java/org/webrtc/HardwareVideoDecoder.java File webrtc/sdk/android/src/java/org/webrtc/HardwareVideoDecoder.java (right): https://codereview.webrtc.org/2977643002/diff/1/webrtc/sdk/android/src/java/org/webrtc/HardwareVideoDecoder.java#newcode428 webrtc/sdk/android/src/java/org/webrtc/HardwareVideoDecoder.java:428: while (!decodedTextureBuffers.isEmpty() && !surfaceTextureHelper.isTextureInUse()) { ...
2 months ago (2017-07-18 08:53:40 UTC) #15
sakal
When working on my CL today I noticed my matrix conversion methods were incorrect. I ...
2 months ago (2017-07-18 14:33:19 UTC) #16
mellem
On 2017/07/18 14:33:19, sakal wrote: > When working on my CL today I noticed my ...
2 months ago (2017-07-18 16:49:57 UTC) #17
mellem
https://codereview.webrtc.org/2977643002/diff/40001/webrtc/sdk/android/api/org/webrtc/SurfaceTextureHelper.java File webrtc/sdk/android/api/org/webrtc/SurfaceTextureHelper.java (right): https://codereview.webrtc.org/2977643002/diff/40001/webrtc/sdk/android/api/org/webrtc/SurfaceTextureHelper.java#newcode283 webrtc/sdk/android/api/org/webrtc/SurfaceTextureHelper.java:283: public TextureBuffer createTextureBuffer(int width, int height, float[] transformMatrix) { ...
2 months ago (2017-07-18 16:50:03 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2977643002/60001
2 months ago (2017-07-18 16:50:40 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_baremetal/builds/22845)
2 months ago (2017-07-18 17:13:31 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2977643002/80001
2 months ago (2017-07-18 17:31:48 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_baremetal/builds/22847)
2 months ago (2017-07-18 17:54:04 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2977643002/80001
2 months ago (2017-07-18 18:18:12 UTC) #30
mellem
2 months ago (2017-07-18 18:33:49 UTC) #32
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
8fb23618d8e3c2a20832006d361f99161b4980bd (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld b40b6558b