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

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

Issue 16823003: Replace erroneous use of base::Time with base::TimeTicks throughout media code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/PresubmitPromptWarning/PresubmitPromptOrNotify/ Created 7 years, 6 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/base/clock_unittest.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"
11 #include "base/synchronization/condition_variable.h" 11 #include "base/synchronization/condition_variable.h"
12 #include "base/synchronization/lock.h" 12 #include "base/synchronization/lock.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "base/time/default_clock.h" 14 #include "base/time/default_tick_clock.h"
15 #include "media/base/audio_renderer.h" 15 #include "media/base/audio_renderer.h"
16 #include "media/base/demuxer.h" 16 #include "media/base/demuxer.h"
17 #include "media/base/media_export.h" 17 #include "media/base/media_export.h"
18 #include "media/base/pipeline_status.h" 18 #include "media/base/pipeline_status.h"
19 #include "media/base/ranges.h" 19 #include "media/base/ranges.h"
20 #include "media/base/serial_runner.h" 20 #include "media/base/serial_runner.h"
21 #include "ui/gfx/size.h" 21 #include "ui/gfx/size.h"
22 22
23 namespace base { 23 namespace base {
24 class MessageLoopProxy; 24 class MessageLoopProxy;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 // Current volume level (from 0.0f to 1.0f). This value is set immediately 366 // Current volume level (from 0.0f to 1.0f). This value is set immediately
367 // via SetVolume() and a task is dispatched on the message loop to notify the 367 // via SetVolume() and a task is dispatched on the message loop to notify the
368 // filters. 368 // filters.
369 float volume_; 369 float volume_;
370 370
371 // Current playback rate (>= 0.0f). This value is set immediately via 371 // Current playback rate (>= 0.0f). This value is set immediately via
372 // SetPlaybackRate() and a task is dispatched on the message loop to notify 372 // SetPlaybackRate() and a task is dispatched on the message loop to notify
373 // the filters. 373 // the filters.
374 float playback_rate_; 374 float playback_rate_;
375 375
376 // base::Clock used by |clock_|. 376 // base::TickClock used by |clock_|.
377 base::DefaultClock default_clock_; 377 base::DefaultTickClock default_tick_clock_;
378 378
379 // Reference clock. Keeps track of current playback time. Uses system 379 // Reference clock. Keeps track of current playback time. Uses system
380 // clock and linear interpolation, but can have its time manually set 380 // clock and linear interpolation, but can have its time manually set
381 // by filters. 381 // by filters.
382 scoped_ptr<Clock> clock_; 382 scoped_ptr<Clock> clock_;
383 383
384 // If this value is set to true, then |clock_| is paused and we are waiting 384 // If this value is set to true, then |clock_| is paused and we are waiting
385 // for an update of the clock greater than or equal to the elapsed time to 385 // for an update of the clock greater than or equal to the elapsed time to
386 // start the clock. 386 // start the clock.
387 bool waiting_for_clock_update_; 387 bool waiting_for_clock_update_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 // Holds the initialized renderers. Used for setting the volume, 433 // Holds the initialized renderers. Used for setting the volume,
434 // playback rate, and determining when playback has finished. 434 // playback rate, and determining when playback has finished.
435 scoped_ptr<AudioRenderer> audio_renderer_; 435 scoped_ptr<AudioRenderer> audio_renderer_;
436 scoped_ptr<VideoRenderer> video_renderer_; 436 scoped_ptr<VideoRenderer> video_renderer_;
437 437
438 PipelineStatistics statistics_; 438 PipelineStatistics statistics_;
439 439
440 // Time of pipeline creation; is non-zero only until the pipeline first 440 // Time of pipeline creation; is non-zero only until the pipeline first
441 // reaches "kStarted", at which point it is used & zeroed out. 441 // reaches "kStarted", at which point it is used & zeroed out.
442 base::Time creation_time_; 442 base::TimeTicks creation_time_;
443 443
444 scoped_ptr<SerialRunner> pending_callbacks_; 444 scoped_ptr<SerialRunner> pending_callbacks_;
445 445
446 base::ThreadChecker thread_checker_; 446 base::ThreadChecker thread_checker_;
447 447
448 DISALLOW_COPY_AND_ASSIGN(Pipeline); 448 DISALLOW_COPY_AND_ASSIGN(Pipeline);
449 }; 449 };
450 450
451 } // namespace media 451 } // namespace media
452 452
453 #endif // MEDIA_BASE_PIPELINE_H_ 453 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/clock_unittest.cc ('k') | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698