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

Unified Diff: media/base/pipeline_impl.cc

Issue 7932005: Reland r101418: Fix aspect ratio and clarify video frame dimensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « media/base/pipeline_impl.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.cc
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 0d3c1dd14d5b3003cd10832b9a5c252f95587697..263441c90875171564089b2f15f50da9d13bb65f 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -310,12 +310,10 @@ int64 PipelineImpl::GetTotalBytes() const {
return total_bytes_;
}
-void PipelineImpl::GetVideoSize(size_t* width_out, size_t* height_out) const {
- CHECK(width_out);
- CHECK(height_out);
+void PipelineImpl::GetNaturalVideoSize(gfx::Size* out_size) const {
+ CHECK(out_size);
base::AutoLock auto_lock(lock_);
- *width_out = video_width_;
- *height_out = video_height_;
+ *out_size = natural_size_;
}
bool PipelineImpl::IsStreaming() const {
@@ -371,8 +369,7 @@ void PipelineImpl::ResetState() {
streaming_ = false;
loaded_ = false;
total_bytes_ = 0;
- video_width_ = 0;
- video_height_ = 0;
+ natural_size_.SetSize(0, 0);
volume_ = 1.0f;
preload_ = AUTO;
playback_rate_ = 0.0f;
@@ -536,13 +533,13 @@ void PipelineImpl::SetBufferedBytes(int64 buffered_bytes) {
buffered_bytes_ = buffered_bytes;
}
-void PipelineImpl::SetVideoSize(size_t width, size_t height) {
+void PipelineImpl::SetNaturalVideoSize(const gfx::Size& size) {
DCHECK(IsRunning());
- media_log_->AddEvent(media_log_->CreateVideoSizeSetEvent(width, height));
+ media_log_->AddEvent(media_log_->CreateVideoSizeSetEvent(
+ size.width(), size.height()));
base::AutoLock auto_lock(lock_);
- video_width_ = width;
- video_height_ = height;
+ natural_size_ = size;
}
void PipelineImpl::SetStreaming(bool streaming) {
« no previous file with comments | « media/base/pipeline_impl.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698