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

Issue 2461073002: Use MediaCodec.setOutputSurface() for fullscreen transitions on M. (Closed)

Created:
4 years, 1 month ago by DaleCurtis
Modified:
4 years, 1 month ago
CC:
agrieve+watch_chromium.org, avayvod+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, miu+watch_chromium.org, mlamouri+watch-media_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use MediaCodec.setOutputSurface() for fullscreen transitions on M. Turns out this isn't so hard to do that we need to wait for the completion of DialogSurface and AVDAv2. This dramatically improves the fullscreen transition; it's much faster and does not cause audio jank. BUG=662251 TEST=enter/exit fullscreen on M+ device. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/4b632fce277d847aa2c5a533478da715086c0b55 Cr-Commit-Position: refs/heads/master@{#431114}

Patch Set 1 #

Patch Set 2 : Fix IPC, but now everything explodes :( #

Total comments: 4

Patch Set 3 : Get into fullscreen working. #

Patch Set 4 : Get exit from fullscreen working. #

Patch Set 5 : Cleanup. #

Patch Set 6 : Simplify APIs. #

Total comments: 16

Patch Set 7 : Rebase. #

Patch Set 8 : Fix GL_INVALID_ENUM errors. #

Patch Set 9 : Rework logic. Fix nits. #

Total comments: 25

Patch Set 10 : Address comments. #

Patch Set 11 : Cleanup terms. #

Total comments: 2

Patch Set 12 : Add init_cb check. #

Total comments: 6

Patch Set 13 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+324 lines, -149 lines) Patch
M media/base/android/java/src/org/chromium/media/MediaCodecBridge.java View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -0 lines 0 comments Download
M media/base/android/sdk_media_codec_bridge.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M media/base/android/sdk_media_codec_bridge.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M media/base/surface_manager.h View 1 chunk +1 line, -1 line 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -3 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +29 lines, -26 lines 0 comments Download
M media/filters/gpu_video_decoder.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -1 line 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +36 lines, -14 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.h View 1 2 3 4 5 6 7 4 chunks +14 lines, -0 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +98 lines, -22 lines 0 comments Download
M media/gpu/avda_codec_image.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -8 lines 0 comments Download
M media/gpu/avda_codec_image.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -1 line 0 comments Download
M media/gpu/avda_picture_buffer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -6 lines 0 comments Download
M media/gpu/avda_picture_buffer_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +32 lines, -59 lines 0 comments Download
M media/gpu/avda_shared_state.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M media/gpu/ipc/client/gpu_video_decode_accelerator_host.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/gpu/ipc/client/gpu_video_decode_accelerator_host.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M media/gpu/ipc/common/media_messages.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M media/gpu/ipc/common/media_param_traits_macros.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M media/gpu/ipc/service/gpu_video_decode_accelerator.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M media/gpu/ipc/service/gpu_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M media/video/video_decode_accelerator.h View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -7 lines 0 comments Download
M media/video/video_decode_accelerator.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 48 (10 generated)
DaleCurtis
Is missing support for a couple edge cases, but the idea is wholesome! // TODO(dalecurtis): ...
4 years, 1 month ago (2016-10-28 21:34:13 UTC) #2
DaleCurtis
Not entirely wholesome haha, forgot to send the IPC message over to actually call SetSurface, ...
4 years, 1 month ago (2016-10-28 22:01:01 UTC) #3
DaleCurtis
http://pastebin.com/3frHyTq7 has the failure, will take another look next week.
4 years, 1 month ago (2016-10-28 22:29:29 UTC) #4
liberato (no reviews please)
i've thought about doing something similar several times, but always talked myself out of it. ...
4 years, 1 month ago (2016-10-29 18:57:20 UTC) #5
liberato (no reviews please)
On 2016/10/29 18:57:20, liberato wrote: > i've thought about doing something similar several times, but ...
4 years, 1 month ago (2016-10-30 06:19:31 UTC) #6
DaleCurtis
Latest patch set gets the transition to fullscreen working by waiting for all outstanding frames ...
4 years, 1 month ago (2016-10-31 22:05:57 UTC) #7
DaleCurtis
Okay entrance and exit work now, but it's messy. Here's why: 1. We specify texture ...
4 years, 1 month ago (2016-10-31 22:57:53 UTC) #8
liberato (no reviews please)
On 2016/10/31 22:57:53, DaleCurtis wrote: > Okay entrance and exit work now, but it's messy. ...
4 years, 1 month ago (2016-11-01 14:36:59 UTC) #9
DaleCurtis
I'm guessing #2 is actually just a bug in my implementation somewhere. I'm not setting ...
4 years, 1 month ago (2016-11-01 20:45:17 UTC) #10
DaleCurtis
On 2016/11/01 at 20:45:17, DaleCurtis wrote: > I'm guessing #2 is actually just a bug ...
4 years, 1 month ago (2016-11-01 20:46:47 UTC) #11
liberato (no reviews please)
personally, i think that getting rid of the surface texture is a good idea, since ...
4 years, 1 month ago (2016-11-01 20:57:17 UTC) #12
DaleCurtis
This relocates quite a bit of code that I'll split out into smaller CLs before ...
4 years, 1 month ago (2016-11-03 19:32:36 UTC) #14
watk
nice! idea looks good https://codereview.chromium.org/2461073002/diff/100001/content/browser/media/android/browser_surface_view_manager.cc File content/browser/media/android/browser_surface_view_manager.cc (right): https://codereview.chromium.org/2461073002/diff/100001/content/browser/media/android/browser_surface_view_manager.cc#newcode113 content/browser/media/android/browser_surface_view_manager.cc:113: base::android::BuildInfo::GetInstance()->sdk_int() < 23) { We ...
4 years, 1 month ago (2016-11-03 20:26:34 UTC) #15
liberato (no reviews please)
looks pretty solid. my only concern is the commented out service_id check in CopyTexImage. -fl ...
4 years, 1 month ago (2016-11-03 20:51:04 UTC) #16
DaleCurtis
https://codereview.chromium.org/2461073002/diff/100001/media/gpu/avda_picture_buffer_manager.cc File media/gpu/avda_picture_buffer_manager.cc (right): https://codereview.chromium.org/2461073002/diff/100001/media/gpu/avda_picture_buffer_manager.cc#newcode230 media/gpu/avda_picture_buffer_manager.cc:230: // always set BOUND for SV. On 2016/11/03 at ...
4 years, 1 month ago (2016-11-03 20:59:36 UTC) #17
DaleCurtis
https://codereview.chromium.org/2461073002/diff/100001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/2461073002/diff/100001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java#newcode631 media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:631: Log.e(TAG, "Cannot set output surface", e); On 2016/11/03 at ...
4 years, 1 month ago (2016-11-03 23:25:06 UTC) #18
DaleCurtis
Latest patch set resolves almost all comments and is rebased relative to the cleanup CL ...
4 years, 1 month ago (2016-11-04 01:07:22 UTC) #20
liberato (no reviews please)
On 2016/11/04 01:07:22, DaleCurtis wrote: > Latest patch set resolves almost all comments and is ...
4 years, 1 month ago (2016-11-07 19:42:50 UTC) #21
DaleCurtis
On 2016/11/07 at 19:42:50, liberato wrote: > On 2016/11/04 01:07:22, DaleCurtis wrote: > > Latest ...
4 years, 1 month ago (2016-11-07 19:45:04 UTC) #22
DaleCurtis
Hmm, if I disable the suppressor I get a different error (not the crash I ...
4 years, 1 month ago (2016-11-07 22:44:05 UTC) #23
DaleCurtis
Looks like the original error is coming from here: https://www.opengl.org/sdk/docs/man/docbook4/xhtml/glActiveTexture.xml
4 years, 1 month ago (2016-11-07 23:03:05 UTC) #24
liberato (no reviews please)
On 2016/11/07 23:03:05, DaleCurtis wrote: > Looks like the original error is coming from here: ...
4 years, 1 month ago (2016-11-07 23:10:35 UTC) #25
DaleCurtis
On 2016/11/07 at 23:10:35, liberato wrote: > On 2016/11/07 23:03:05, DaleCurtis wrote: > > Looks ...
4 years, 1 month ago (2016-11-07 23:30:17 UTC) #26
DaleCurtis
Ah, found the issue thanks to watk@. GVD handles clearing textures on the first picture ...
4 years, 1 month ago (2016-11-08 01:01:41 UTC) #28
DaleCurtis
PTAL. Reworked WMPI logic to be clearer. +dcheng for media/gpu/ipc/common/* review.
4 years, 1 month ago (2016-11-08 21:48:53 UTC) #32
watk
https://codereview.chromium.org/2461073002/diff/200001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/2461073002/diff/200001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java#newcode630 media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:630: } Seems like this should return an error? If ...
4 years, 1 month ago (2016-11-08 22:59:04 UTC) #33
DaleCurtis
https://codereview.chromium.org/2461073002/diff/200001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java File media/base/android/java/src/org/chromium/media/MediaCodecBridge.java (right): https://codereview.chromium.org/2461073002/diff/200001/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java#newcode630 media/base/android/java/src/org/chromium/media/MediaCodecBridge.java:630: } On 2016/11/08 at 22:59:03, watk wrote: > Seems ...
4 years, 1 month ago (2016-11-08 23:50:11 UTC) #34
watk
https://codereview.chromium.org/2461073002/diff/200001/media/filters/gpu_video_decoder.cc File media/filters/gpu_video_decoder.cc (right): https://codereview.chromium.org/2461073002/diff/200001/media/filters/gpu_video_decoder.cc#newcode344 media/filters/gpu_video_decoder.cc:344: return; On 2016/11/08 23:50:10, DaleCurtis wrote: > On 2016/11/08 ...
4 years, 1 month ago (2016-11-08 23:58:12 UTC) #35
DaleCurtis
https://codereview.chromium.org/2461073002/diff/200001/media/filters/gpu_video_decoder.cc File media/filters/gpu_video_decoder.cc (right): https://codereview.chromium.org/2461073002/diff/200001/media/filters/gpu_video_decoder.cc#newcode344 media/filters/gpu_video_decoder.cc:344: return; On 2016/11/08 at 23:58:12, watk wrote: > On ...
4 years, 1 month ago (2016-11-09 00:19:03 UTC) #36
watk
lgtm https://codereview.chromium.org/2461073002/diff/240001/media/filters/gpu_video_decoder.cc File media/filters/gpu_video_decoder.cc (right): https://codereview.chromium.org/2461073002/diff/240001/media/filters/gpu_video_decoder.cc#newcode335 media/filters/gpu_video_decoder.cc:335: base::ResetAndReturn(&init_cb_).Run(false); Need to check init_cb_ is not null ...
4 years, 1 month ago (2016-11-09 00:56:36 UTC) #37
DaleCurtis
https://codereview.chromium.org/2461073002/diff/240001/media/filters/gpu_video_decoder.cc File media/filters/gpu_video_decoder.cc (right): https://codereview.chromium.org/2461073002/diff/240001/media/filters/gpu_video_decoder.cc#newcode335 media/filters/gpu_video_decoder.cc:335: base::ResetAndReturn(&init_cb_).Run(false); On 2016/11/09 at 00:56:36, watk wrote: > Need ...
4 years, 1 month ago (2016-11-09 01:12:15 UTC) #38
watk
https://codereview.chromium.org/2461073002/diff/260001/media/gpu/avda_picture_buffer_manager.cc File media/gpu/avda_picture_buffer_manager.cc (right): https://codereview.chromium.org/2461073002/diff/260001/media/gpu/avda_picture_buffer_manager.cc#newcode117 media/gpu/avda_picture_buffer_manager.cc:117: gfx::Size AVDAPictureBufferManager::GetPictureBufferSize() const { Just realized the only caller ...
4 years, 1 month ago (2016-11-09 01:20:48 UTC) #39
dcheng
ipc lgtm https://codereview.chromium.org/2461073002/diff/260001/media/gpu/avda_codec_image.cc File media/gpu/avda_codec_image.cc (right): https://codereview.chromium.org/2461073002/diff/260001/media/gpu/avda_codec_image.cc#newcode144 media/gpu/avda_codec_image.cc:144: const scoped_refptr<AVDASharedState>& shared_state) { Nit: it's preferred ...
4 years, 1 month ago (2016-11-09 18:16:29 UTC) #40
liberato (no reviews please)
lgtm. nice!
4 years, 1 month ago (2016-11-09 18:25:28 UTC) #41
DaleCurtis
https://codereview.chromium.org/2461073002/diff/260001/media/gpu/avda_codec_image.cc File media/gpu/avda_codec_image.cc (right): https://codereview.chromium.org/2461073002/diff/260001/media/gpu/avda_codec_image.cc#newcode144 media/gpu/avda_codec_image.cc:144: const scoped_refptr<AVDASharedState>& shared_state) { On 2016/11/09 at 18:16:29, dcheng ...
4 years, 1 month ago (2016-11-09 21:58:18 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2461073002/280001
4 years, 1 month ago (2016-11-09 23:09:55 UTC) #45
commit-bot: I haz the power
Committed patchset #13 (id:280001)
4 years, 1 month ago (2016-11-10 00:52:50 UTC) #46
commit-bot: I haz the power
4 years, 1 month ago (2016-11-10 00:57:18 UTC) #48
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/4b632fce277d847aa2c5a533478da715086c0b55
Cr-Commit-Position: refs/heads/master@{#431114}

Powered by Google App Engine
This is Rietveld 408576698