|
|
Created:
3 years, 11 months ago by xjz Modified:
3 years, 11 months ago Reviewers:
sandersd (OOO until July 31) CC:
chromium-reviews, feature-media-reviews_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org, apacible+watch_chromium.org, erickung+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionInform MediaObserver when video natural size changes.
BUG=678339
Review-Url: https://codereview.chromium.org/2620433002
Cr-Commit-Position: refs/heads/master@{#442107}
Committed: https://chromium.googlesource.com/chromium/src/+/516ef6d9c0c19352fb80ecaa4e635e60501125fb
Patch Set 1 #
Total comments: 6
Patch Set 2 : Addressed comments. #Messages
Total messages: 17 (9 generated)
The CQ bit was checked by xjz@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Inform MediaObserver when video natural size changes. BUG=678339 ========== to ========== Inform MediaObserver when video natural size changes. BUG=678339 ==========
xjz@chromium.org changed reviewers: + sandersd@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
sandersd@: As discussed in crbug/678339, this CL informs MediaObserver when OnVideoNaturalSizeChanged() is called. PTAL. Thanks!
https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... media/blink/webmediaplayer_impl.cc:1321: pipeline_metadata_.natural_size = rotated_size; Looks like there is a pre-existing bug here, CreateWatchTimeReporter() shouldn't be called until after |pipeline_metadata_.natural_size| is updated. Please fix. https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... media/blink/webmediaplayer_impl.cc:1326: metadata.natural_size = size; Almost certainly you want the rotated_size. Since that's what's in |pipeline_metadata_|, just pass that?
sandersd: Thanks for reviewing. Addressed your comments. PTAL again. https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... media/blink/webmediaplayer_impl.cc:1321: pipeline_metadata_.natural_size = rotated_size; On 2017/01/06 19:29:18, sandersd wrote: > Looks like there is a pre-existing bug here, CreateWatchTimeReporter() shouldn't > be called until after |pipeline_metadata_.natural_size| is updated. > > Please fix. Done. https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... media/blink/webmediaplayer_impl.cc:1326: metadata.natural_size = size; On 2017/01/06 19:29:18, sandersd wrote: > Almost certainly you want the rotated_size. Since that's what's in > |pipeline_metadata_|, just pass that? The size will be rotated in RemotingRendererController if needed (https://cs.chromium.org/chromium/src/media/remoting/remoting_renderer_control...). Therefore pass the original size here. Actually it is confusing to have some PipelineMetadata store orginal natural size, and some store the rotated size. Since now all application requires roted size, how about let it always store the rotated size? That is, we only need to rotate it once in PipelineImpl when this metadata is created. If this sgty, I can do the refactoring in a separate CL.
https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... media/blink/webmediaplayer_impl.cc:1326: metadata.natural_size = size; On 2017/01/06 21:59:15, xjz wrote: > On 2017/01/06 19:29:18, sandersd wrote: > > Almost certainly you want the rotated_size. Since that's what's in > > |pipeline_metadata_|, just pass that? > > The size will be rotated in RemotingRendererController if needed > (https://cs.chromium.org/chromium/src/media/remoting/remoting_renderer_control...). > Therefore pass the original size here. Actually it is confusing to have some > PipelineMetadata store orginal natural size, and some store the rotated size. > Since now all application requires roted size, how about let it always store the > rotated size? That is, we only need to rotate it once in PipelineImpl when this > metadata is created. If this sgty, I can do the refactoring in a separate CL. OnMetadata() also applies the rotation, so if RemotingRendererController is also applying a rotation it's probably wrong. Moving this up the stack in a followup SGTM.
https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... media/blink/webmediaplayer_impl.cc:1326: metadata.natural_size = size; On 2017/01/06 22:18:07, sandersd wrote: > On 2017/01/06 21:59:15, xjz wrote: > > On 2017/01/06 19:29:18, sandersd wrote: > > > Almost certainly you want the rotated_size. Since that's what's in > > > |pipeline_metadata_|, just pass that? > > > > The size will be rotated in RemotingRendererController if needed > > > (https://cs.chromium.org/chromium/src/media/remoting/remoting_renderer_control...). > > Therefore pass the original size here. Actually it is confusing to have some > > PipelineMetadata store orginal natural size, and some store the rotated size. > > Since now all application requires roted size, how about let it always store > the > > rotated size? That is, we only need to rotate it once in PipelineImpl when > this > > metadata is created. If this sgty, I can do the refactoring in a separate CL. > > OnMetadata() also applies the rotation, so if RemotingRendererController is also > applying a rotation it's probably wrong. > > Moving this up the stack in a followup SGTM. OnMetadata() also passed the original size (not the rotated one) to MediaObserver (https://cs.chromium.org/chromium/src/media/blink/webmediaplayer_impl.cc?rcl=1...). I will do a follow up refactoring CL.
On 2017/01/06 22:23:57, xjz wrote: > https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... > File media/blink/webmediaplayer_impl.cc (right): > > https://codereview.chromium.org/2620433002/diff/1/media/blink/webmediaplayer_... > media/blink/webmediaplayer_impl.cc:1326: metadata.natural_size = size; > On 2017/01/06 22:18:07, sandersd wrote: > > On 2017/01/06 21:59:15, xjz wrote: > > > On 2017/01/06 19:29:18, sandersd wrote: > > > > Almost certainly you want the rotated_size. Since that's what's in > > > > |pipeline_metadata_|, just pass that? > > > > > > The size will be rotated in RemotingRendererController if needed > > > > > > (https://cs.chromium.org/chromium/src/media/remoting/remoting_renderer_control...). > > > Therefore pass the original size here. Actually it is confusing to have some > > > PipelineMetadata store orginal natural size, and some store the rotated > size. > > > Since now all application requires roted size, how about let it always store > > the > > > rotated size? That is, we only need to rotate it once in PipelineImpl when > > this > > > metadata is created. If this sgty, I can do the refactoring in a separate > CL. > > > > OnMetadata() also applies the rotation, so if RemotingRendererController is > also > > applying a rotation it's probably wrong. > > > > Moving this up the stack in a followup SGTM. > > OnMetadata() also passed the original size (not the rotated one) to > MediaObserver > (https://cs.chromium.org/chromium/src/media/blink/webmediaplayer_impl.cc?rcl=1...). > I will do a follow up refactoring CL. Ah I see, thanks. lgtm.
The CQ bit was checked by xjz@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1483742234203260, "parent_rev": "df4f7e43c1e79a85246f8297f1f0111a967e6a56", "commit_rev": "516ef6d9c0c19352fb80ecaa4e635e60501125fb"}
Message was sent while issue was closed.
Description was changed from ========== Inform MediaObserver when video natural size changes. BUG=678339 ========== to ========== Inform MediaObserver when video natural size changes. BUG=678339 Review-Url: https://codereview.chromium.org/2620433002 Cr-Commit-Position: refs/heads/master@{#442107} Committed: https://chromium.googlesource.com/chromium/src/+/516ef6d9c0c19352fb80ecaa4e63... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/516ef6d9c0c19352fb80ecaa4e63... |