| 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_FILTERS_VIDEO_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ |
| 6 #define MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ | 6 #define MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 13 #include "base/synchronization/condition_variable.h" | 14 #include "base/synchronization/condition_variable.h" |
| 14 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 15 #include "base/threading/platform_thread.h" | 16 #include "base/threading/platform_thread.h" |
| 16 #include "media/base/decryptor.h" | 17 #include "media/base/decryptor.h" |
| 17 #include "media/base/demuxer_stream.h" | 18 #include "media/base/demuxer_stream.h" |
| 18 #include "media/base/pipeline_status.h" | 19 #include "media/base/pipeline_status.h" |
| 19 #include "media/base/video_decoder.h" | 20 #include "media/base/video_decoder.h" |
| 20 #include "media/base/video_frame.h" | 21 #include "media/base/video_frame.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // them to 0, and then waits on |frame_available_| for up to the | 117 // them to 0, and then waits on |frame_available_| for up to the |
| 117 // |wait_duration|. | 118 // |wait_duration|. |
| 118 void UpdateStatsAndWait_Locked(base::TimeDelta wait_duration); | 119 void UpdateStatsAndWait_Locked(base::TimeDelta wait_duration); |
| 119 | 120 |
| 120 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 121 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 121 | 122 |
| 122 // Used for accessing data members. | 123 // Used for accessing data members. |
| 123 base::Lock lock_; | 124 base::Lock lock_; |
| 124 | 125 |
| 125 // Provides video frames to VideoRendererImpl. | 126 // Provides video frames to VideoRendererImpl. |
| 126 VideoFrameStream video_frame_stream_; | 127 scoped_ptr<VideoFrameStream> video_frame_stream_; |
| 127 | 128 |
| 128 // Flag indicating low-delay mode. | 129 // Flag indicating low-delay mode. |
| 129 bool low_delay_; | 130 bool low_delay_; |
| 130 | 131 |
| 131 // Queue of incoming frames yet to be painted. | 132 // Queue of incoming frames yet to be painted. |
| 132 typedef std::deque<scoped_refptr<VideoFrame> > VideoFrameQueue; | 133 typedef std::deque<scoped_refptr<VideoFrame> > VideoFrameQueue; |
| 133 VideoFrameQueue ready_frames_; | 134 VideoFrameQueue ready_frames_; |
| 134 | 135 |
| 135 // Keeps track of whether we received the end of stream buffer and finished | 136 // Keeps track of whether we received the end of stream buffer and finished |
| 136 // rendering. | 137 // rendering. |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 210 |
| 210 // NOTE: Weak pointers must be invalidated before all other member variables. | 211 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 211 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; | 212 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; |
| 212 | 213 |
| 213 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 214 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
| 214 }; | 215 }; |
| 215 | 216 |
| 216 } // namespace media | 217 } // namespace media |
| 217 | 218 |
| 218 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ | 219 #endif // MEDIA_FILTERS_VIDEO_RENDERER_IMPL_H_ |
| OLD | NEW |