OLD | NEW |
1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008-2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be found | 2 // Use of this source code is governed by a BSD-style license that can be found |
3 // in the LICENSE file. | 3 // in the LICENSE file. |
4 // | 4 // |
5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. |
6 // It contains PipelineImpl which is the actual media player pipeline, it glues | 6 // It contains PipelineImpl which is the actual media player pipeline, it glues |
7 // the media player pipeline, data source, audio renderer and renderer. | 7 // the media player pipeline, data source, audio renderer and renderer. |
8 // PipelineImpl would creates multiple threads and access some public methods | 8 // PipelineImpl would creates multiple threads and access some public methods |
9 // of this class, so we need to be extra careful about concurrent access of | 9 // of this class, so we need to be extra careful about concurrent access of |
10 // methods and members. | 10 // methods and members. |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 kTimeChangedTaskIndex, | 164 kTimeChangedTaskIndex, |
165 kLastTaskIndex | 165 kLastTaskIndex |
166 }; | 166 }; |
167 | 167 |
168 // TODO(hclam): get rid of these members and read from the pipeline directly. | 168 // TODO(hclam): get rid of these members and read from the pipeline directly. |
169 WebKit::WebMediaPlayer::NetworkState network_state_; | 169 WebKit::WebMediaPlayer::NetworkState network_state_; |
170 WebKit::WebMediaPlayer::ReadyState ready_state_; | 170 WebKit::WebMediaPlayer::ReadyState ready_state_; |
171 | 171 |
172 // Message loops for posting tasks between Chrome's main thread. Also used | 172 // Message loops for posting tasks between Chrome's main thread. Also used |
173 // for DCHECKs so methods calls won't execute in the wrong thread. | 173 // for DCHECKs so methods calls won't execute in the wrong thread. |
174 MessageLoop* |main_loop_|; | 174 MessageLoop* main_loop_; |
175 | 175 |
176 // A collection of factories for creating filters. | 176 // A collection of factories for creating filters. |
177 scoped_refptr<media::FilterFactoryCollection> filter_factory_; | 177 scoped_refptr<media::FilterFactoryCollection> filter_factory_; |
178 | 178 |
179 // The actual pipeline. We do it a composition here because we expect to have | 179 // The actual pipeline. We do it a composition here because we expect to have |
180 // the same lifetime as the pipeline. | 180 // the same lifetime as the pipeline. |
181 media::PipelineImpl pipeline_; | 181 media::PipelineImpl pipeline_; |
182 | 182 |
183 // We have the interface to VideoRenderer to delegate paint messages to it | 183 // We have the interface to VideoRenderer to delegate paint messages to it |
184 // from WebKit. | 184 // from WebKit. |
185 scoped_refptr<VideoRendererImpl> video_renderer_; | 185 scoped_refptr<VideoRendererImpl> video_renderer_; |
186 | 186 |
187 WebKit::WebMediaPlayerClient* client_; | 187 WebKit::WebMediaPlayerClient* client_; |
188 RenderView* view_; | 188 RenderView* view_; |
189 | 189 |
190 // List of tasks for holding pointers to all tasks currently in the | 190 // List of tasks for holding pointers to all tasks currently in the |
191 // |main_loop_|. |tasks_| can be access from main thread or the media threads | 191 // |main_loop_|. |tasks_| can be access from main thread or the media threads |
192 // we need a lock for protecting it. | 192 // we need a lock for protecting it. |
193 Lock task_lock_; | 193 Lock task_lock_; |
194 typedef std::vector<CancelableTask*> CancelableTaskList; | 194 typedef std::vector<CancelableTask*> CancelableTaskList; |
195 CancelableTaskList tasks_; | 195 CancelableTaskList tasks_; |
196 | 196 |
197 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 197 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
198 }; | 198 }; |
199 | 199 |
200 #endif // CHROME_RENDERER_WEBMEDIAPLAYER_IMPL_H_ | 200 #endif // CHROME_RENDERER_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |