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

Side by Side Diff: media/base/pipeline_impl.h

Issue 2616703002: Fix race condition in media Pipeline::GetMediaTime() after seeking. (Closed)
Patch Set: Feedback 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/base/pipeline_impl.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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_ 5 #ifndef MEDIA_BASE_PIPELINE_IMPL_H_
6 #define MEDIA_BASE_PIPELINE_IMPL_H_ 6 #define MEDIA_BASE_PIPELINE_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // filters. 166 // filters.
167 float volume_; 167 float volume_;
168 168
169 // Current duration as reported by Demuxer. 169 // Current duration as reported by Demuxer.
170 base::TimeDelta duration_; 170 base::TimeDelta duration_;
171 171
172 // Set by GetMediaTime(), used to prevent the current media time value as 172 // Set by GetMediaTime(), used to prevent the current media time value as
173 // reported to JavaScript from going backwards in time. 173 // reported to JavaScript from going backwards in time.
174 mutable base::TimeDelta last_media_time_; 174 mutable base::TimeDelta last_media_time_;
175 175
176 // Set by Seek(), used in place of asking the renderer for current media time
177 // while a seek is pending. Renderer's time cannot be trusted until the seek
178 // has completed.
179 base::TimeDelta seek_time_;
180
176 base::ThreadChecker thread_checker_; 181 base::ThreadChecker thread_checker_;
177 base::WeakPtrFactory<PipelineImpl> weak_factory_; 182 base::WeakPtrFactory<PipelineImpl> weak_factory_;
178 183
179 DISALLOW_COPY_AND_ASSIGN(PipelineImpl); 184 DISALLOW_COPY_AND_ASSIGN(PipelineImpl);
180 }; 185 };
181 186
182 } // namespace media 187 } // namespace media
183 188
184 #endif // MEDIA_BASE_PIPELINE_IMPL_H_ 189 #endif // MEDIA_BASE_PIPELINE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698