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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // call. | 279 // call. |
280 int64_t last_video_memory_usage_; | 280 int64_t last_video_memory_usage_; |
281 | 281 |
282 // Indicates if a frame has been processed by CheckForMetadataChanges(). | 282 // Indicates if a frame has been processed by CheckForMetadataChanges(). |
283 bool have_renderered_frames_; | 283 bool have_renderered_frames_; |
284 | 284 |
285 // Tracks last frame properties to detect and notify client of any changes. | 285 // Tracks last frame properties to detect and notify client of any changes. |
286 gfx::Size last_frame_natural_size_; | 286 gfx::Size last_frame_natural_size_; |
287 bool last_frame_opaque_; | 287 bool last_frame_opaque_; |
288 | 288 |
| 289 // Indicates if we've painted the first valid frame after StartPlayingFrom(). |
| 290 bool painted_first_frame_; |
| 291 |
289 // NOTE: Weak pointers must be invalidated before all other member variables. | 292 // NOTE: Weak pointers must be invalidated before all other member variables. |
290 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; | 293 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; |
291 | 294 |
292 // Weak factory used to invalidate certain queued callbacks on reset(). | 295 // Weak factory used to invalidate certain queued callbacks on reset(). |
293 // This is useful when doing video frame copies asynchronously since we | 296 // This is useful when doing video frame copies asynchronously since we |
294 // want to discard video frames that might be received after the stream has | 297 // want to discard video frames that might be received after the stream has |
295 // been reset. | 298 // been reset. |
296 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; | 299 base::WeakPtrFactory<VideoRendererImpl> frame_callback_weak_factory_; |
297 | 300 |
298 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 301 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
299 }; | 302 }; |
300 | 303 |
301 } // namespace media | 304 } // namespace media |
302 | 305 |
303 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 306 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
OLD | NEW |