| 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 #ifndef WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 5 #ifndef WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| 6 #define WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 6 #define WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "media/base/filter_factories.h" | 13 #include "media/base/filter_factories.h" |
| 14 #include "media/base/filters.h" | 14 #include "media/base/filters.h" |
| 15 #include "webkit/glue/media/buffered_resource_loader.h" | 15 #include "webkit/media/buffered_resource_loader.h" |
| 16 | 16 |
| 17 namespace media { | 17 namespace media { |
| 18 class MediaLog; | 18 class MediaLog; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace webkit_glue { | 21 namespace webkit_media { |
| 22 | 22 |
| 23 // This class may be created on any thread, and is callable from the render | 23 // This class may be created on any thread, and is callable from the render |
| 24 // thread as well as media-specific threads. | 24 // thread as well as media-specific threads. |
| 25 class BufferedDataSource : public WebDataSource { | 25 class BufferedDataSource : public WebDataSource { |
| 26 public: | 26 public: |
| 27 // Creates a DataSourceFactory for building BufferedDataSource objects. | 27 // Creates a DataSourceFactory for building BufferedDataSource objects. |
| 28 static media::DataSourceFactory* CreateFactory( | 28 static media::DataSourceFactory* CreateFactory( |
| 29 MessageLoop* render_loop, | 29 MessageLoop* render_loop, |
| 30 WebKit::WebFrame* frame, | 30 WebKit::WebFrame* frame, |
| 31 media::MediaLog* media_log, | 31 media::MediaLog* media_log, |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 int bitrate_; | 221 int bitrate_; |
| 222 | 222 |
| 223 // Current playback rate. | 223 // Current playback rate. |
| 224 float playback_rate_; | 224 float playback_rate_; |
| 225 | 225 |
| 226 scoped_refptr<media::MediaLog> media_log_; | 226 scoped_refptr<media::MediaLog> media_log_; |
| 227 | 227 |
| 228 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); | 228 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 } // namespace webkit_glue | 231 } // namespace webkit_media |
| 232 | 232 |
| 233 #endif // WEBKIT_GLUE_MEDIA_BUFFERED_DATA_SOURCE_H_ | 233 #endif // WEBKIT_MEDIA_BUFFERED_DATA_SOURCE_H_ |
| OLD | NEW |