OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // VideoRendererBase creates its own thread for the sole purpose of timing frame | 5 // VideoRendererBase creates its own thread for the sole purpose of timing frame |
6 // presentation. It handles reading from the decoder and stores the results in | 6 // presentation. It handles reading from the decoder and stores the results in |
7 // a queue of decoded frames, calling OnFrameAvailable() on subclasses to notify | 7 // a queue of decoded frames, calling OnFrameAvailable() on subclasses to notify |
8 // when a frame is ready to display. | 8 // when a frame is ready to display. |
9 // | 9 // |
10 // The media filter methods Initialize(), Stop(), SetPlaybackRate() and Seek() | 10 // The media filter methods Initialize(), Stop(), SetPlaybackRate() and Seek() |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
23 #include "base/threading/platform_thread.h" | 23 #include "base/threading/platform_thread.h" |
24 #include "media/base/filters.h" | 24 #include "media/base/filters.h" |
25 #include "media/base/pipeline_status.h" | 25 #include "media/base/pipeline_status.h" |
26 #include "media/base/video_frame.h" | 26 #include "media/base/video_frame.h" |
27 | 27 |
28 namespace media { | 28 namespace media { |
29 | 29 |
30 // TODO(scherkus): to avoid subclasses, consider using a peer/delegate interface | 30 // TODO(scherkus): to avoid subclasses, consider using a peer/delegate interface |
31 // and pass in a reference to the constructor. | 31 // and pass in a reference to the constructor. |
32 class MEDIA_EXPORT VideoRendererBase | 32 class VideoRendererBase |
33 : public VideoRenderer, | 33 : public VideoRenderer, |
34 public base::PlatformThread::Delegate { | 34 public base::PlatformThread::Delegate { |
35 public: | 35 public: |
36 VideoRendererBase(); | 36 VideoRendererBase(); |
37 virtual ~VideoRendererBase(); | 37 virtual ~VideoRendererBase(); |
38 | 38 |
39 // Filter implementation. | 39 // Filter implementation. |
40 virtual void Play(FilterCallback* callback); | 40 virtual void Play(FilterCallback* callback); |
41 virtual void Pause(FilterCallback* callback); | 41 virtual void Pause(FilterCallback* callback); |
42 virtual void Flush(FilterCallback* callback); | 42 virtual void Flush(FilterCallback* callback); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 scoped_ptr<StatisticsCallback> statistics_callback_; | 199 scoped_ptr<StatisticsCallback> statistics_callback_; |
200 | 200 |
201 base::TimeDelta seek_timestamp_; | 201 base::TimeDelta seek_timestamp_; |
202 | 202 |
203 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); | 203 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); |
204 }; | 204 }; |
205 | 205 |
206 } // namespace media | 206 } // namespace media |
207 | 207 |
208 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ | 208 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
OLD | NEW |