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

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

Issue 275303002: Non-const impls. for WebMediaPlayer::didLoadingProgress(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove mutable bools. Created 6 years, 7 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 | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/base/pipeline.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Get approximate time ranges of buffered media. 166 // Get approximate time ranges of buffered media.
167 Ranges<base::TimeDelta> GetBufferedTimeRanges(); 167 Ranges<base::TimeDelta> GetBufferedTimeRanges();
168 168
169 // Get the duration of the media in microseconds. If the duration has not 169 // Get the duration of the media in microseconds. If the duration has not
170 // been determined yet, then returns 0. 170 // been determined yet, then returns 0.
171 base::TimeDelta GetMediaDuration() const; 171 base::TimeDelta GetMediaDuration() const;
172 172
173 // Return true if loading progress has been made since the last time this 173 // Return true if loading progress has been made since the last time this
174 // method was called. 174 // method was called.
175 bool DidLoadingProgress() const; 175 bool DidLoadingProgress();
176 176
177 // Gets the current pipeline statistics. 177 // Gets the current pipeline statistics.
178 PipelineStatistics GetStatistics() const; 178 PipelineStatistics GetStatistics() const;
179 179
180 void SetClockForTesting(Clock* clock); 180 void SetClockForTesting(Clock* clock);
181 void SetErrorForTesting(PipelineStatus status); 181 void SetErrorForTesting(PipelineStatus status);
182 182
183 private: 183 private:
184 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges); 184 FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges);
185 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback); 185 FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 mutable base::Lock lock_; 328 mutable base::Lock lock_;
329 329
330 // Whether or not the pipeline is running. 330 // Whether or not the pipeline is running.
331 bool running_; 331 bool running_;
332 332
333 // Amount of available buffered data as reported by |demuxer_|. 333 // Amount of available buffered data as reported by |demuxer_|.
334 Ranges<base::TimeDelta> buffered_time_ranges_; 334 Ranges<base::TimeDelta> buffered_time_ranges_;
335 335
336 // True when AddBufferedTimeRange() has been called more recently than 336 // True when AddBufferedTimeRange() has been called more recently than
337 // DidLoadingProgress(). 337 // DidLoadingProgress().
338 mutable bool did_loading_progress_; 338 bool did_loading_progress_;
339 339
340 // Current volume level (from 0.0f to 1.0f). This value is set immediately 340 // Current volume level (from 0.0f to 1.0f). This value is set immediately
341 // via SetVolume() and a task is dispatched on the task runner to notify the 341 // via SetVolume() and a task is dispatched on the task runner to notify the
342 // filters. 342 // filters.
343 float volume_; 343 float volume_;
344 344
345 // Current playback rate (>= 0.0f). This value is set immediately via 345 // Current playback rate (>= 0.0f). This value is set immediately via
346 // SetPlaybackRate() and a task is dispatched on the task runner to notify 346 // SetPlaybackRate() and a task is dispatched on the task runner to notify
347 // the filters. 347 // the filters.
348 float playback_rate_; 348 float playback_rate_;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 scoped_ptr<SerialRunner> pending_callbacks_; 411 scoped_ptr<SerialRunner> pending_callbacks_;
412 412
413 base::ThreadChecker thread_checker_; 413 base::ThreadChecker thread_checker_;
414 414
415 DISALLOW_COPY_AND_ASSIGN(Pipeline); 415 DISALLOW_COPY_AND_ASSIGN(Pipeline);
416 }; 416 };
417 417
418 } // namespace media 418 } // namespace media
419 419
420 #endif // MEDIA_BASE_PIPELINE_H_ 420 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698