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

Unified Diff: media/filters/video_renderer_impl.cc

Issue 229453004: Rename VideoFrame::{Get,Set}Timestamp() to {set_}timestamp(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile failure Created 6 years, 8 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/filters/skcanvas_video_renderer_unittest.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_impl.cc
diff --git a/media/filters/video_renderer_impl.cc b/media/filters/video_renderer_impl.cc
index 3b9851ff6f3866c06df28d7365757142d873e3e8..93deb573de1c69ef85a6aa973e57fed06e2eba6b 100644
--- a/media/filters/video_renderer_impl.cc
+++ b/media/filters/video_renderer_impl.cc
@@ -294,8 +294,8 @@ void VideoRendererImpl::ThreadMain() {
// the accuracy of our frame timing code. http://crbug.com/149829
if (drop_frames_ && last_timestamp_ != kNoTimestamp()) {
base::TimeDelta now = get_time_cb_.Run();
- base::TimeDelta deadline = ready_frames_.front()->GetTimestamp() +
- (ready_frames_.front()->GetTimestamp() - last_timestamp_) / 2;
+ base::TimeDelta deadline = ready_frames_.front()->timestamp() +
+ (ready_frames_.front()->timestamp() - last_timestamp_) / 2;
if (now > deadline) {
DropNextReadyFrame_Locked();
@@ -318,7 +318,7 @@ void VideoRendererImpl::PaintNextReadyFrame_Locked() {
ready_frames_.pop_front();
frames_decoded_++;
- last_timestamp_ = next_frame->GetTimestamp();
+ last_timestamp_ = next_frame->timestamp();
paint_cb_.Run(next_frame);
@@ -332,7 +332,7 @@ void VideoRendererImpl::DropNextReadyFrame_Locked() {
lock_.AssertAcquired();
- last_timestamp_ = ready_frames_.front()->GetTimestamp();
+ last_timestamp_ = ready_frames_.front()->timestamp();
ready_frames_.pop_front();
frames_decoded_++;
frames_dropped_++;
@@ -396,7 +396,7 @@ void VideoRendererImpl::FrameReady(VideoFrameStream::Status status,
// Maintain the latest frame decoded so the correct frame is displayed after
// prerolling has completed.
if (state_ == kPrerolling && preroll_timestamp_ != kNoTimestamp() &&
- frame->GetTimestamp() <= preroll_timestamp_) {
+ frame->timestamp() <= preroll_timestamp_) {
ready_frames_.clear();
}
@@ -429,15 +429,15 @@ void VideoRendererImpl::AddReadyFrame_Locked(
// frame rate. Another way for this to happen is for the container to state
// a smaller duration than the largest packet timestamp.
base::TimeDelta duration = get_duration_cb_.Run();
- if (frame->GetTimestamp() > duration) {
- frame->SetTimestamp(duration);
+ if (frame->timestamp() > duration) {
+ frame->set_timestamp(duration);
}
ready_frames_.push_back(frame);
DCHECK_LE(ready_frames_.size(),
static_cast<size_t>(limits::kMaxVideoFrames));
- max_time_cb_.Run(frame->GetTimestamp());
+ max_time_cb_.Run(frame->timestamp());
// Avoid needlessly waking up |thread_| unless playing.
if (state_ == kPlaying)
@@ -499,7 +499,7 @@ base::TimeDelta VideoRendererImpl::CalculateSleepDuration(
float playback_rate) {
// Determine the current and next presentation timestamps.
base::TimeDelta now = get_time_cb_.Run();
- base::TimeDelta next_pts = next_frame->GetTimestamp();
+ base::TimeDelta next_pts = next_frame->timestamp();
// Scale our sleep based on the playback rate.
base::TimeDelta sleep = next_pts - now;
« no previous file with comments | « media/filters/skcanvas_video_renderer_unittest.cc ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698