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

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

Issue 11607003: Add a Clock and TickClock interface for mocking out time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix warnings Created 7 years, 10 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 "media/base/audio_renderer.h" 15 #include "media/base/audio_renderer.h"
15 #include "media/base/demuxer.h" 16 #include "media/base/demuxer.h"
16 #include "media/base/media_export.h" 17 #include "media/base/media_export.h"
17 #include "media/base/pipeline_status.h" 18 #include "media/base/pipeline_status.h"
18 #include "media/base/ranges.h" 19 #include "media/base/ranges.h"
19 #include "media/base/serial_runner.h" 20 #include "media/base/serial_runner.h"
20 #include "ui/gfx/size.h" 21 #include "ui/gfx/size.h"
21 22
22 class MessageLoop; 23 class MessageLoop;
23 24
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // Current volume level (from 0.0f to 1.0f). This value is set immediately 398 // Current volume level (from 0.0f to 1.0f). This value is set immediately
398 // via SetVolume() and a task is dispatched on the message loop to notify the 399 // via SetVolume() and a task is dispatched on the message loop to notify the
399 // filters. 400 // filters.
400 float volume_; 401 float volume_;
401 402
402 // Current playback rate (>= 0.0f). This value is set immediately via 403 // Current playback rate (>= 0.0f). This value is set immediately via
403 // SetPlaybackRate() and a task is dispatched on the message loop to notify 404 // SetPlaybackRate() and a task is dispatched on the message loop to notify
404 // the filters. 405 // the filters.
405 float playback_rate_; 406 float playback_rate_;
406 407
408 // base::Clock used by |clock_|.
409 base::DefaultClock default_clock_;
410
407 // Reference clock. Keeps track of current playback time. Uses system 411 // Reference clock. Keeps track of current playback time. Uses system
408 // clock and linear interpolation, but can have its time manually set 412 // clock and linear interpolation, but can have its time manually set
409 // by filters. 413 // by filters.
410 scoped_ptr<Clock> clock_; 414 scoped_ptr<Clock> clock_;
411 415
412 // If this value is set to true, then |clock_| is paused and we are waiting 416 // If this value is set to true, then |clock_| is paused and we are waiting
413 // for an update of the clock greater than or equal to the elapsed time to 417 // for an update of the clock greater than or equal to the elapsed time to
414 // start the clock. 418 // start the clock.
415 bool waiting_for_clock_update_; 419 bool waiting_for_clock_update_;
416 420
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 scoped_ptr<SerialRunner> pending_callbacks_; 475 scoped_ptr<SerialRunner> pending_callbacks_;
472 476
473 base::ThreadChecker thread_checker_; 477 base::ThreadChecker thread_checker_;
474 478
475 DISALLOW_COPY_AND_ASSIGN(Pipeline); 479 DISALLOW_COPY_AND_ASSIGN(Pipeline);
476 }; 480 };
477 481
478 } // namespace media 482 } // namespace media
479 483
480 #endif // MEDIA_BASE_PIPELINE_H_ 484 #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