diff options
author | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-16 00:00:09 +0000 |
---|---|---|
committer | vrk@google.com <vrk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-16 00:00:09 +0000 |
commit | a1d41ed5a126c9426f986930fb420e0c9c3f7faa (patch) | |
tree | 1f0a43e9b1a0edb2748dde1bc68a7915bba6b525 /media/tools | |
parent | 8a6bf98805e68f6e00c7cc8a1aaa258fd2c2c7a5 (diff) | |
download | chromium_src-a1d41ed5a126c9426f986930fb420e0c9c3f7faa.zip chromium_src-a1d41ed5a126c9426f986930fb420e0c9c3f7faa.tar.gz chromium_src-a1d41ed5a126c9426f986930fb420e0c9c3f7faa.tar.bz2 |
Fix aspect ratio and clarify video frame dimensions
BUG=18941,94861
TEST=video-aspect-ratio.html
Review URL: http://codereview.chromium.org/7864009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r-- | media/tools/player_wtl/wtl_renderer.cc | 3 | ||||
-rw-r--r-- | media/tools/player_x11/gl_video_renderer.cc | 3 | ||||
-rw-r--r-- | media/tools/player_x11/x11_video_renderer.cc | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/media/tools/player_wtl/wtl_renderer.cc b/media/tools/player_wtl/wtl_renderer.cc index baec88e..c5d9fd3 100644 --- a/media/tools/player_wtl/wtl_renderer.cc +++ b/media/tools/player_wtl/wtl_renderer.cc @@ -13,7 +13,8 @@ WtlVideoRenderer::WtlVideoRenderer(WtlVideoWindow* window) WtlVideoRenderer::~WtlVideoRenderer() {} bool WtlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { - window_->SetSize(decoder->width(), decoder->height()); + window_->SetSize( + decoder->natural_size().width(), decoder->natural_size().height()); return true; } diff --git a/media/tools/player_x11/gl_video_renderer.cc b/media/tools/player_x11/gl_video_renderer.cc index b58b4df..6c6cda4 100644 --- a/media/tools/player_x11/gl_video_renderer.cc +++ b/media/tools/player_x11/gl_video_renderer.cc @@ -128,7 +128,8 @@ bool GlVideoRenderer::OnInitialize(media::VideoDecoder* decoder) { LOG(INFO) << "Initializing GL Renderer..."; // Resize the window to fit that of the video. - XResizeWindow(display_, window_, decoder->width(), decoder->height()); + XResizeWindow(display_, window_, decoder->natural_size().width(), + decoder->natural_size().height()); gl_context_ = InitGLContext(display_, window_); if (!gl_context_) diff --git a/media/tools/player_x11/x11_video_renderer.cc b/media/tools/player_x11/x11_video_renderer.cc index 055e54b..a06f6b8 100644 --- a/media/tools/player_x11/x11_video_renderer.cc +++ b/media/tools/player_x11/x11_video_renderer.cc @@ -94,8 +94,8 @@ bool X11VideoRenderer::OnInitialize(media::VideoDecoder* decoder) { LOG(INFO) << "Initializing X11 Renderer..."; // Resize the window to fit that of the video. - int width = decoder->width(); - int height = decoder->height(); + int width = decoder->natural_size().width(); + int height = decoder->natural_size().height(); XResizeWindow(display_, window_, width, height); // Allocate an XImage for caching RGB result. |