Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: chrome/renderer/media/buffered_data_source.h

Issue 155608: Adding callback support to media filter Initialize() and Seek(). (Closed)
Patch Set: Full patch Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/media/buffered_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_H_ 5 #ifndef CHROME_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_H_
6 #define CHROME_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_H_ 6 #define CHROME_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/lock.h" 10 #include "base/lock.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Static methods for creating this class. 197 // Static methods for creating this class.
198 static media::FilterFactory* CreateFactory( 198 static media::FilterFactory* CreateFactory(
199 MessageLoop* message_loop, 199 MessageLoop* message_loop,
200 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory) { 200 webkit_glue::MediaResourceLoaderBridgeFactory* bridge_factory) {
201 return new media::FilterFactoryImpl2< 201 return new media::FilterFactoryImpl2<
202 BufferedDataSource, 202 BufferedDataSource,
203 MessageLoop*, 203 MessageLoop*,
204 webkit_glue::MediaResourceLoaderBridgeFactory*>( 204 webkit_glue::MediaResourceLoaderBridgeFactory*>(
205 message_loop, bridge_factory); 205 message_loop, bridge_factory);
206 } 206 }
207 virtual bool Initialize(const std::string& url); 207 virtual void Initialize(const std::string& url,
208 media::FilterCallback* callback);
208 209
209 // media::MediaFilter implementation. 210 // media::MediaFilter implementation.
210 virtual void Stop(); 211 virtual void Stop();
211 212
212 // media::DataSource implementation. 213 // media::DataSource implementation.
213 // Called from demuxer thread. 214 // Called from demuxer thread.
214 virtual size_t Read(uint8* data, size_t size); 215 virtual size_t Read(uint8* data, size_t size);
215 virtual bool GetPosition(int64* position_out); 216 virtual bool GetPosition(int64* position_out);
216 virtual bool SetPosition(int64 position); 217 virtual bool SetPosition(int64 position);
217 virtual bool GetSize(int64* size_out); 218 virtual bool GetSize(int64* size_out);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // Members related to resource loading with RenderView. 255 // Members related to resource loading with RenderView.
255 scoped_ptr<webkit_glue::MediaResourceLoaderBridgeFactory> bridge_factory_; 256 scoped_ptr<webkit_glue::MediaResourceLoaderBridgeFactory> bridge_factory_;
256 scoped_refptr<BufferedResourceLoader> buffered_resource_loader_; 257 scoped_refptr<BufferedResourceLoader> buffered_resource_loader_;
257 258
258 // The message loop of the render thread. 259 // The message loop of the render thread.
259 MessageLoop* render_loop_; 260 MessageLoop* render_loop_;
260 261
261 // The message loop of the pipeline thread. 262 // The message loop of the pipeline thread.
262 MessageLoop* pipeline_loop_; 263 MessageLoop* pipeline_loop_;
263 264
265 // Filter callbacks.
266 scoped_ptr<media::FilterCallback> initialize_callback_;
267
264 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource); 268 DISALLOW_COPY_AND_ASSIGN(BufferedDataSource);
265 }; 269 };
266 270
267 #endif // CHROME_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_H_ 271 #endif // CHROME_RENDERER_MEDIA_BUFFERED_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/media/buffered_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698