| OLD | NEW |
| 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_VIDEO_RENDERER_H_ | 5 #ifndef MEDIA_BASE_VIDEO_RENDERER_H_ |
| 6 #define MEDIA_BASE_VIDEO_RENDERER_H_ | 6 #define MEDIA_BASE_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 // Used to update the pipeline's clock time. The parameter is the time that | 22 // Used to update the pipeline's clock time. The parameter is the time that |
| 23 // the clock should not exceed. | 23 // the clock should not exceed. |
| 24 typedef base::Callback<void(base::TimeDelta)> TimeCB; | 24 typedef base::Callback<void(base::TimeDelta)> TimeCB; |
| 25 | 25 |
| 26 // Used to query the current time or duration of the media. | 26 // Used to query the current time or duration of the media. |
| 27 typedef base::Callback<base::TimeDelta()> TimeDeltaCB; | 27 typedef base::Callback<base::TimeDelta()> TimeDeltaCB; |
| 28 | 28 |
| 29 VideoRenderer(); | 29 VideoRenderer(); |
| 30 | 30 |
| 31 // Stops all operations and drops all pending callbacks. | 31 // Stops all operations and fires all pending callbacks. |
| 32 // TODO(xhwang): Fires all pending callbacks to be consistent with the rest of | |
| 33 // media pipeline. | |
| 34 virtual ~VideoRenderer(); | 32 virtual ~VideoRenderer(); |
| 35 | 33 |
| 36 // Initializes a VideoRenderer with |stream|, executing |init_cb| upon | 34 // Initializes a VideoRenderer with |stream|, executing |init_cb| upon |
| 37 // completion. | 35 // completion. |
| 38 // | 36 // |
| 39 // |statistics_cb| is executed periodically with video rendering stats, such | 37 // |statistics_cb| is executed periodically with video rendering stats, such |
| 40 // as dropped frames. | 38 // as dropped frames. |
| 41 // | 39 // |
| 42 // |time_cb| is executed whenever time has advanced by way of video rendering. | 40 // |time_cb| is executed whenever time has advanced by way of video rendering. |
| 43 // | 41 // |
| (...skipping 30 matching lines...) Expand all Loading... |
| 74 // Only valid to call after a successful Initialize() or Flush(). | 72 // Only valid to call after a successful Initialize() or Flush(). |
| 75 virtual void StartPlaying() = 0; | 73 virtual void StartPlaying() = 0; |
| 76 | 74 |
| 77 private: | 75 private: |
| 78 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); | 76 DISALLOW_COPY_AND_ASSIGN(VideoRenderer); |
| 79 }; | 77 }; |
| 80 | 78 |
| 81 } // namespace media | 79 } // namespace media |
| 82 | 80 |
| 83 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ | 81 #endif // MEDIA_BASE_VIDEO_RENDERER_H_ |
| OLD | NEW |