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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2620433002: Inform MediaObserver when video natural size changes. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index b6a56c2cd26dce38c4fc4676e610e77460f315e6..696f05b98f57291fcf9ecc6a8bc0f4bf82669ba1 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1320,6 +1320,12 @@ void WebMediaPlayerImpl::OnVideoNaturalSizeChange(const gfx::Size& size) {
pipeline_metadata_.natural_size = rotated_size;
sandersd (OOO until July 31) 2017/01/06 19:29:18 Looks like there is a pre-existing bug here, Creat
xjz 2017/01/06 21:59:15 Done.
client_->sizeChanged();
+
+ if (observer_) {
+ PipelineMetadata metadata = pipeline_metadata_;
+ metadata.natural_size = size;
sandersd (OOO until July 31) 2017/01/06 19:29:18 Almost certainly you want the rotated_size. Since
xjz 2017/01/06 21:59:15 The size will be rotated in RemotingRendererContro
sandersd (OOO until July 31) 2017/01/06 22:18:07 OnMetadata() also applies the rotation, so if Remo
xjz 2017/01/06 22:23:57 OnMetadata() also passed the original size (not th
+ observer_->OnMetadataChanged(metadata);
+ }
}
void WebMediaPlayerImpl::OnVideoOpacityChange(bool opaque) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698