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

Side by Side Diff: media/filters/video_renderer_impl.cc

Issue 400853002: Drop time from media::{Audio,Video}Renderer::StartPlayingFrom(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/video_renderer_impl.h ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/video_renderer_impl.h" 5 #include "media/filters/video_renderer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 if (!thread_to_join.is_null()) { 102 if (!thread_to_join.is_null()) {
103 base::AutoUnlock auto_unlock(lock_); 103 base::AutoUnlock auto_unlock(lock_);
104 base::PlatformThread::Join(thread_to_join); 104 base::PlatformThread::Join(thread_to_join);
105 } 105 }
106 106
107 video_frame_stream_.reset(); 107 video_frame_stream_.reset();
108 task_runner_->PostTask(FROM_HERE, callback); 108 task_runner_->PostTask(FROM_HERE, callback);
109 } 109 }
110 110
111 void VideoRendererImpl::StartPlayingFrom(base::TimeDelta timestamp) { 111 void VideoRendererImpl::StartPlaying() {
112 DCHECK(task_runner_->BelongsToCurrentThread()); 112 DCHECK(task_runner_->BelongsToCurrentThread());
113 base::AutoLock auto_lock(lock_); 113 base::AutoLock auto_lock(lock_);
114 DCHECK_EQ(state_, kFlushed); 114 DCHECK_EQ(state_, kFlushed);
115 DCHECK(!pending_read_); 115 DCHECK(!pending_read_);
116 DCHECK(ready_frames_.empty()); 116 DCHECK(ready_frames_.empty());
117 DCHECK_EQ(buffering_state_, BUFFERING_HAVE_NOTHING); 117 DCHECK_EQ(buffering_state_, BUFFERING_HAVE_NOTHING);
118 118
119 state_ = kPlaying; 119 state_ = kPlaying;
120 start_timestamp_ = timestamp; 120 start_timestamp_ = get_time_cb_.Run();
121 AttemptRead_Locked(); 121 AttemptRead_Locked();
122 } 122 }
123 123
124 void VideoRendererImpl::Initialize(DemuxerStream* stream, 124 void VideoRendererImpl::Initialize(DemuxerStream* stream,
125 bool low_delay, 125 bool low_delay,
126 const PipelineStatusCB& init_cb, 126 const PipelineStatusCB& init_cb,
127 const StatisticsCB& statistics_cb, 127 const StatisticsCB& statistics_cb,
128 const TimeCB& max_time_cb, 128 const TimeCB& max_time_cb,
129 const BufferingStateCB& buffering_state_cb, 129 const BufferingStateCB& buffering_state_cb,
130 const base::Closure& ended_cb, 130 const base::Closure& ended_cb,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 statistics_cb_.Run(statistics); 492 statistics_cb_.Run(statistics);
493 493
494 frames_decoded_ = 0; 494 frames_decoded_ = 0;
495 frames_dropped_ = 0; 495 frames_dropped_ = 0;
496 } 496 }
497 497
498 frame_available_.TimedWait(wait_duration); 498 frame_available_.TimedWait(wait_duration);
499 } 499 }
500 500
501 } // namespace media 501 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_renderer_impl.h ('k') | media/filters/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698