OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 GpuVideoAcceleratorFactories* gpu_factories, | 61 GpuVideoAcceleratorFactories* gpu_factories, |
62 const scoped_refptr<MediaLog>& media_log); | 62 const scoped_refptr<MediaLog>& media_log); |
63 ~VideoRendererImpl() override; | 63 ~VideoRendererImpl() override; |
64 | 64 |
65 // VideoRenderer implementation. | 65 // VideoRenderer implementation. |
66 void Initialize(DemuxerStream* stream, | 66 void Initialize(DemuxerStream* stream, |
67 const PipelineStatusCB& init_cb, | 67 const PipelineStatusCB& init_cb, |
68 CdmContext* cdm_context, | 68 CdmContext* cdm_context, |
69 const StatisticsCB& statistics_cb, | 69 const StatisticsCB& statistics_cb, |
70 const BufferingStateCB& buffering_state_cb, | 70 const BufferingStateCB& buffering_state_cb, |
| 71 const NaturalSizeChangedCB& natural_size_changed_cb, |
71 const base::Closure& ended_cb, | 72 const base::Closure& ended_cb, |
72 const PipelineStatusCB& error_cb, | 73 const PipelineStatusCB& error_cb, |
73 const TimeSource::WallClockTimeCB& wall_clock_time_cb, | 74 const TimeSource::WallClockTimeCB& wall_clock_time_cb, |
74 const base::Closure& waiting_for_decryption_key_cb) override; | 75 const base::Closure& waiting_for_decryption_key_cb) override; |
75 void Flush(const base::Closure& callback) override; | 76 void Flush(const base::Closure& callback) override; |
76 void StartPlayingFrom(base::TimeDelta timestamp) override; | 77 void StartPlayingFrom(base::TimeDelta timestamp) override; |
77 void OnTimeStateChanged(bool time_progressing) override; | 78 void OnTimeStateChanged(bool time_progressing) override; |
78 | 79 |
79 void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock); | 80 void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock); |
80 void SetGpuMemoryBufferVideoForTesting( | 81 void SetGpuMemoryBufferVideoForTesting( |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 227 |
227 BufferingState buffering_state_; | 228 BufferingState buffering_state_; |
228 | 229 |
229 // Playback operation callbacks. | 230 // Playback operation callbacks. |
230 base::Closure flush_cb_; | 231 base::Closure flush_cb_; |
231 | 232 |
232 // Event callbacks. | 233 // Event callbacks. |
233 PipelineStatusCB init_cb_; | 234 PipelineStatusCB init_cb_; |
234 StatisticsCB statistics_cb_; | 235 StatisticsCB statistics_cb_; |
235 BufferingStateCB buffering_state_cb_; | 236 BufferingStateCB buffering_state_cb_; |
| 237 NaturalSizeChangedCB natural_size_changed_cb_; |
236 base::Closure ended_cb_; | 238 base::Closure ended_cb_; |
237 PipelineStatusCB error_cb_; | 239 PipelineStatusCB error_cb_; |
238 TimeSource::WallClockTimeCB wall_clock_time_cb_; | 240 TimeSource::WallClockTimeCB wall_clock_time_cb_; |
239 | 241 |
240 base::TimeDelta start_timestamp_; | 242 base::TimeDelta start_timestamp_; |
241 | 243 |
242 // Keeps track of the number of frames decoded and dropped since the | 244 // Keeps track of the number of frames decoded and dropped since the |
243 // last call to |statistics_cb_|. These must be accessed under lock. | 245 // last call to |statistics_cb_|. These must be accessed under lock. |
244 int frames_decoded_; | 246 int frames_decoded_; |
245 int frames_dropped_; | 247 int frames_dropped_; |
(...skipping 25 matching lines...) Expand all Loading... |
271 | 273 |
272 // NOTE: Weak pointers must be invalidated before all other member variables. | 274 // NOTE: Weak pointers must be invalidated before all other member variables. |
273 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; | 275 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; |
274 | 276 |
275 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 277 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
276 }; | 278 }; |
277 | 279 |
278 } // namespace media | 280 } // namespace media |
279 | 281 |
280 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 282 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
OLD | NEW |