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

Issue 269673005: media: Add MediaOzonePlatform support (Closed)

Created:
6 years, 7 months ago by vignatti (out of this project)
Modified:
6 years, 6 months ago
CC:
chromium-reviews, rjkroege, ozone-reviews_chromium.org, jam, mcasas+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, wjia+watch_chromium.org, inactive_dshwang_plz_cc_intel
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

media: Add MediaOzonePlatform support This CL adds MediaOzonePlatform, a new Ozone component for abstracting media and related. In particular it adds CreateVideoDecodeAccelerator method so Ozone implementations can use that for abstracting video decoding acceleration (i.e. GPU based video decoding). Eventually MediaOzonePlatform will be used as well for many windowing systems abstractions related to media, e.g. video encode, audio, etc. We will add support for these others as needed. Media platform is called and created on demand whenever a video playback is set to play. Different than ui::OzonePlatform methods, the one added in here is non-pure virtual so the implementations can decide themselves whether a video implementation is actually wanted, based on its hardware capabilities. This work is aimed at internal implementations like Ozone-DRI, Ozone-test but also for externals like Ozone-Wayland. Different targets like Chromium Browser, Chrome OS, ChromeCast and others can now take advantage of it. BUG=380884 TEST=manually on Ozone-Wayland, using: $ export GYP_DEFINES='chromeos=0 use_ozone=1 proprietary_codecs=1 ffmpeg_branding=Chrome' $ ninja -j16 -C out/Release content and to run: ~/git/chromium/src/out/Debug$ ./chrome --no-sandbox --user-data-dir=/tmp/chrome --ignore-gpu-blacklist ../../third_party/WebKit/PerformanceTests/resources/bear-1280x720.mp4 --vmodule=*/ozone/ui*=3 --v=0 additionally, in Release builds you can start chrome with --disable-accelerated-video-decode to compare the results. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276552

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix up dependency cycle #

Total comments: 7

Patch Set 3 : #

Patch Set 4 : using OzonePlatformMedia #

Total comments: 11

Patch Set 5 : fixed pointed issues. #

Total comments: 2

Patch Set 6 : #

Total comments: 18

Patch Set 7 : address xhwang's issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -0 lines) Patch
M content/common/gpu/media/gpu_video_decode_accelerator.cc View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M media/DEPS View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 2 chunks +45 lines, -0 lines 0 comments Download
A media/ozone/media_ozone_platform.h View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
A media/ozone/media_ozone_platform.cc View 1 2 3 4 5 6 1 chunk +93 lines, -0 lines 0 comments Download

Messages

Total messages: 73 (0 generated)
vignatti (out of this project)
rjkroege@ this is what I had on my mind for the Ozone media abstraction... I ...
6 years, 7 months ago (2014-05-05 22:26:54 UTC) #1
vignatti (out of this project)
+fischman@, +scherkus@ can you please take a look on the media side? I think eventually ...
6 years, 7 months ago (2014-05-05 22:35:14 UTC) #2
Ami GONE FROM CHROMIUM
AFAICT content/common/gpu/media/ asks ui/ozone for a factory which is satisfied using one defined in content/common/gpu/media/, ...
6 years, 7 months ago (2014-05-05 22:40:42 UTC) #3
Ami GONE FROM CHROMIUM
BTW what's the relationship between this and https://codereview.chromium.org/240113009/ ? On Mon, May 5, 2014 at ...
6 years, 7 months ago (2014-05-05 22:43:00 UTC) #4
vignatti (out of this project)
On 2014/05/05 22:40:42, Ami Fischman wrote: > AFAICT content/common/gpu/media/ asks ui/ozone for a factory which ...
6 years, 7 months ago (2014-05-05 23:03:02 UTC) #5
vignatti (out of this project)
On 2014/05/05 22:43:00, Ami Fischman wrote: > BTW what's the relationship between this and > ...
6 years, 7 months ago (2014-05-05 23:07:54 UTC) #6
Ami GONE FROM CHROMIUM
perhaps the root of my confusion is being unclear about how concrete you intend content::VideoDecodeFactoryOzone ...
6 years, 7 months ago (2014-05-05 23:29:24 UTC) #7
vignatti (out of this project)
On 2014/05/05 23:29:24, Ami Fischman wrote: > perhaps the root of my confusion is being ...
6 years, 7 months ago (2014-05-06 15:00:10 UTC) #8
vignatti (out of this project)
+dnicoara@, +spang
6 years, 7 months ago (2014-05-06 15:01:43 UTC) #9
spang
One way to fix up this kind of dependency cycle is: - Create a new ...
6 years, 7 months ago (2014-05-06 15:38:42 UTC) #10
dshwang
Thank you. ozone needs hw video. https://codereview.chromium.org/269673005/diff/1/content/common/gpu/media/ozone_video_decode_accelerator.cc File content/common/gpu/media/ozone_video_decode_accelerator.cc (right): https://codereview.chromium.org/269673005/diff/1/content/common/gpu/media/ozone_video_decode_accelerator.cc#newcode25 content/common/gpu/media/ozone_video_decode_accelerator.cc:25: return VideoDecodeFactoryOzone::GetInstance()->Initialize(profile, client); ...
6 years, 7 months ago (2014-05-06 17:07:45 UTC) #11
vignatti (out of this project)
On 2014/05/06 15:38:42, spang wrote: > One way to fix up this kind of dependency ...
6 years, 7 months ago (2014-05-06 20:33:00 UTC) #12
Ami GONE FROM CHROMIUM
On Tue, May 6, 2014 at 8:38 AM, <spang@chromium.org> wrote: > One way to fix ...
6 years, 7 months ago (2014-05-07 00:42:18 UTC) #13
spang
On 2014/05/07 00:42:18, Ami Fischman wrote: > On Tue, May 6, 2014 at 8:38 AM, ...
6 years, 7 months ago (2014-05-07 01:58:22 UTC) #14
Ami GONE FROM CHROMIUM
Is it desired to build multiple ozones into a single binary? Can the approach taken ...
6 years, 7 months ago (2014-05-07 02:09:07 UTC) #15
chromium-reviews
On Tue, May 6, 2014 at 6:58 PM, <spang@chromium.org> wrote: > On 2014/05/07 00:42:18, Ami ...
6 years, 7 months ago (2014-05-07 02:50:09 UTC) #16
qing.zhang
Looks the "(USE_OZONE)" should parallel with "(USE_X11)" in this CL.But since the OZONE is abstract ...
6 years, 7 months ago (2014-05-07 03:01:31 UTC) #17
spang
On 2014/05/07 02:09:07, Ami Fischman wrote: > Is it desired to build multiple ozones into ...
6 years, 7 months ago (2014-05-07 16:15:13 UTC) #18
Ami GONE FROM CHROMIUM
> > Can the approach taken by c/c/g/m/v4l2device be used? > > It looks like ...
6 years, 7 months ago (2014-05-07 16:54:23 UTC) #19
Ami GONE FROM CHROMIUM
On Tue, May 6, 2014 at 8:01 PM, <qing.zhang@intel.com> wrote: > Looks the "(USE_OZONE)" should ...
6 years, 7 months ago (2014-05-07 16:55:09 UTC) #20
Ami GONE FROM CHROMIUM
On Tue, May 6, 2014 at 7:49 PM, Antoine Labour <piman@google.com> wrote: > > Drive-by ...
6 years, 7 months ago (2014-05-07 16:59:08 UTC) #21
spang
On 2014/05/07 16:54:23, Ami Fischman wrote: > > > > Can the approach taken by ...
6 years, 7 months ago (2014-05-07 17:20:02 UTC) #22
Ami GONE FROM CHROMIUM
On Wed, May 7, 2014 at 10:20 AM, <spang@chromium.org> wrote: > Ports can't currently #include ...
6 years, 7 months ago (2014-05-07 17:25:28 UTC) #23
spang
On Wed, May 7, 2014 at 1:25 PM, Ami Fischman <fischman@chromium.org> wrote: > > On ...
6 years, 7 months ago (2014-05-07 17:31:17 UTC) #24
Ami GONE FROM CHROMIUM
So what prevents ports from depending on media/video/*.h? On Wed, May 7, 2014 at 10:30 ...
6 years, 7 months ago (2014-05-07 17:40:37 UTC) #25
spang
There's at least one cycle that prevents the straightforward fix: media -> ui/gl -> ui/ozone ...
6 years, 7 months ago (2014-05-07 18:13:18 UTC) #26
vignatti (out of this project)
alright guys. I believe I understood your (valuable) comments so now I've managed to fix ...
6 years, 7 months ago (2014-05-07 22:28:43 UTC) #27
spang
On 2014/05/07 22:28:43, vignatti wrote: > alright guys. I believe I understood your (valuable) comments ...
6 years, 7 months ago (2014-05-07 22:43:14 UTC) #28
vignatti (out of this project)
On 2014/05/07 22:43:14, spang wrote: > Even supposing there's consensus on allowing this split, the ...
6 years, 7 months ago (2014-05-07 22:50:33 UTC) #29
Ami GONE FROM CHROMIUM
Thanks; the concrete media/types helped me understand better what you're thinking. https://codereview.chromium.org/269673005/diff/20001/media/types/video_decode_accelerator_impl.h File media/types/video_decode_accelerator_impl.h (right): ...
6 years, 7 months ago (2014-05-07 22:51:27 UTC) #30
spang
I tried extracting the VideoDecodeAccelerator interface into a new component as I suggested and it ...
6 years, 7 months ago (2014-05-08 00:02:00 UTC) #31
vignatti (out of this project)
hi! I'm back on this work. I've updated the patchset here (v3) given that I ...
6 years, 6 months ago (2014-06-02 19:21:42 UTC) #32
Ami GONE FROM CHROMIUM
I think you missed some comment(s) I made on PS#2 (https://codereview.chromium.org/269673005/#ps20001) that e.g. mean media/types ...
6 years, 6 months ago (2014-06-02 19:40:34 UTC) #33
vignatti (out of this project)
On 2014/06/02 19:40:34, Ami leaving Chromium June 9th wrote: > I think you missed some ...
6 years, 6 months ago (2014-06-02 20:17:21 UTC) #34
Ami GONE FROM CHROMIUM
On 2014/06/02 20:17:21, vignatti wrote: > On 2014/06/02 19:40:34, Ami leaving Chromium June 9th wrote: ...
6 years, 6 months ago (2014-06-02 20:30:19 UTC) #35
spang
On 2014/06/02 20:30:19, Ami leaving Chromium June 9th wrote: > On 2014/06/02 20:17:21, vignatti wrote: ...
6 years, 6 months ago (2014-06-03 16:55:14 UTC) #36
vignatti (out of this project)
patch was updated now. It relies on https://codereview.chromium.org/317083003/ that must be applied before. PTAL.
6 years, 6 months ago (2014-06-06 21:43:35 UTC) #37
Ami GONE FROM CHROMIUM
defer to scherkus/spang for future review (this CL is about ozone & plumbing, not about ...
6 years, 6 months ago (2014-06-06 22:09:17 UTC) #38
spang
On 2014/06/06 22:09:17, Ami leaving Chromium June 6th wrote: > defer to scherkus/spang for future ...
6 years, 6 months ago (2014-06-06 22:23:34 UTC) #39
vignatti (out of this project)
On 2014/06/06 22:23:34, spang wrote: > On 2014/06/06 22:09:17, Ami leaving Chromium June 6th wrote: ...
6 years, 6 months ago (2014-06-09 17:57:00 UTC) #40
spang
https://codereview.chromium.org/269673005/diff/50001/media/media.gyp File media/media.gyp (right): https://codereview.chromium.org/269673005/diff/50001/media/media.gyp#newcode721 media/media.gyp:721: ['use_ozone==1', { (question for media/ owners) should we move ...
6 years, 6 months ago (2014-06-09 19:01:58 UTC) #41
spang
https://codereview.chromium.org/269673005/diff/50001/content/common/gpu/media/gpu_video_decode_accelerator.cc File content/common/gpu/media/gpu_video_decode_accelerator.cc (right): https://codereview.chromium.org/269673005/diff/50001/content/common/gpu/media/gpu_video_decode_accelerator.cc#newcode284 content/common/gpu/media/gpu_video_decode_accelerator.cc:284: make_context_current_)); Probably need to check for NULL return here: ...
6 years, 6 months ago (2014-06-09 19:17:33 UTC) #42
vignatti (out of this project)
PTAL in patchset 5 now. Thank you. https://codereview.chromium.org/269673005/diff/50001/content/common/gpu/media/gpu_video_decode_accelerator.cc File content/common/gpu/media/gpu_video_decode_accelerator.cc (right): https://codereview.chromium.org/269673005/diff/50001/content/common/gpu/media/gpu_video_decode_accelerator.cc#newcode284 content/common/gpu/media/gpu_video_decode_accelerator.cc:284: make_context_current_)); On ...
6 years, 6 months ago (2014-06-09 20:30:27 UTC) #43
spang
lgtm https://codereview.chromium.org/269673005/diff/70001/content/common/gpu/media/DEPS File content/common/gpu/media/DEPS (right): https://codereview.chromium.org/269673005/diff/70001/content/common/gpu/media/DEPS#newcode3 content/common/gpu/media/DEPS:3: "+media/ozone", I don't think you need this. https://codereview.chromium.org/269673005/diff/70001/media/ozone/media_ozone_platform.cc ...
6 years, 6 months ago (2014-06-09 20:53:57 UTC) #44
vignatti (out of this project)
The CQ bit was checked by tiago.vignatti@intel.com
6 years, 6 months ago (2014-06-09 21:01:53 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiago.vignatti@intel.com/269673005/90001
6 years, 6 months ago (2014-06-09 21:04:02 UTC) #46
vignatti (out of this project)
adding xhwang@ for media/ and content/common/gpu/media/ can you take a look? Thank you.
6 years, 6 months ago (2014-06-09 22:14:47 UTC) #47
xhwang
On 2014/06/09 22:14:47, vignatti wrote: > adding xhwang@ for media/ and content/common/gpu/media/ > > can ...
6 years, 6 months ago (2014-06-09 23:53:08 UTC) #48
xhwang
And here are some trivial comments. https://codereview.chromium.org/269673005/diff/90001/media/media.gyp File media/media.gyp (right): https://codereview.chromium.org/269673005/diff/90001/media/media.gyp#newcode727 media/media.gyp:727: '<(SHARED_INTERMEDIATE_DIR)', Comment about ...
6 years, 6 months ago (2014-06-09 23:53:34 UTC) #49
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-10 09:12:04 UTC) #50
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-10 11:20:40 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/72589)
6 years, 6 months ago (2014-06-10 11:20:42 UTC) #52
vignatti (out of this project)
On 2014/06/09 23:53:08, xhwang wrote: > I am not super familiar with this area, so ...
6 years, 6 months ago (2014-06-10 14:11:15 UTC) #53
vignatti (out of this project)
patchset 7 uploaded. PTAL. https://codereview.chromium.org/269673005/diff/90001/media/media.gyp File media/media.gyp (right): https://codereview.chromium.org/269673005/diff/90001/media/media.gyp#newcode727 media/media.gyp:727: '<(SHARED_INTERMEDIATE_DIR)', On 2014/06/09 23:53:33, xhwang ...
6 years, 6 months ago (2014-06-10 14:50:29 UTC) #54
spang
https://codereview.chromium.org/269673005/diff/90001/media/ozone/media_ozone_platform.cc File media/ozone/media_ozone_platform.cc (right): https://codereview.chromium.org/269673005/diff/90001/media/ozone/media_ozone_platform.cc#newcode82 media/ozone/media_ozone_platform.cc:82: ui::PlatformObject<MediaOzonePlatform>::Create(); On 2014/06/09 23:53:34, xhwang wrote: > Is it ...
6 years, 6 months ago (2014-06-10 15:24:23 UTC) #55
spang
https://codereview.chromium.org/269673005/diff/90001/media/ozone/media_ozone_platform.cc File media/ozone/media_ozone_platform.cc (right): https://codereview.chromium.org/269673005/diff/90001/media/ozone/media_ozone_platform.cc#newcode84 media/ozone/media_ozone_platform.cc:84: // TODO(spang): Currently need to leak this object. On ...
6 years, 6 months ago (2014-06-10 15:37:40 UTC) #56
xhwang
Thanks for the explanations. LGTM
6 years, 6 months ago (2014-06-10 15:48:07 UTC) #57
xhwang
BTW, you have two BUG= line in the CL description. Remove the BUG=none one?
6 years, 6 months ago (2014-06-10 15:48:58 UTC) #58
spang
On 2014/06/10 15:48:58, xhwang wrote: > BTW, you have two BUG= line in the CL ...
6 years, 6 months ago (2014-06-10 15:51:09 UTC) #59
vignatti (out of this project)
The CQ bit was checked by tiago.vignatti@intel.com
6 years, 6 months ago (2014-06-10 16:09:51 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiago.vignatti@intel.com/269673005/110001
6 years, 6 months ago (2014-06-10 16:14:25 UTC) #61
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 02:24:34 UTC) #62
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 05:01:40 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/builds/25683)
6 years, 6 months ago (2014-06-11 05:01:41 UTC) #64
vignatti (out of this project)
The CQ bit was checked by tiago.vignatti@intel.com
6 years, 6 months ago (2014-06-11 13:42:38 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiago.vignatti@intel.com/269673005/110001
6 years, 6 months ago (2014-06-11 13:44:52 UTC) #66
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 20:34:42 UTC) #67
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 20:40:07 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/builds/26081)
6 years, 6 months ago (2014-06-11 20:40:08 UTC) #69
vignatti (out of this project)
The CQ bit was checked by tiago.vignatti@intel.com
6 years, 6 months ago (2014-06-12 02:56:03 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tiago.vignatti@intel.com/269673005/110001
6 years, 6 months ago (2014-06-12 02:57:54 UTC) #71
commit-bot: I haz the power
Change committed as 276552
6 years, 6 months ago (2014-06-12 06:47:54 UTC) #72
mcasas
5 years, 7 months ago (2015-05-08 23:08:21 UTC) #73
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:110001) has been created in
https://codereview.chromium.org/1127343003/ by mcasas@chromium.org.

The reason for reverting is: Not used at the moment.

Agreed with kalyan.kondapally@intel.com,
tiago.vignatti@intel.com and 
joone.hur@intel.com..

Powered by Google App Engine
This is Rietveld 408576698