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

Side by Side Diff: webkit/glue/media/simple_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 | « media/media.gyp ('k') | webkit/glue/media/simple_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. 1 // Copyright (c) 2009 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 // An extremely simple implementation of DataSource that downloads the entire 5 // An extremely simple implementation of DataSource that downloads the entire
6 // media resource into memory before signaling that initialization has finished. 6 // media resource into memory before signaling that initialization has finished.
7 // Primarily used to test <audio> and <video> with buffering/caching removed 7 // Primarily used to test <audio> and <video> with buffering/caching removed
8 // from the equation. 8 // from the equation.
9 9
10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ 10 #ifndef WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_
(...skipping 20 matching lines...) Expand all
31 SimpleDataSource, 31 SimpleDataSource,
32 MessageLoop*, 32 MessageLoop*,
33 webkit_glue::MediaResourceLoaderBridgeFactory*>(message_loop, 33 webkit_glue::MediaResourceLoaderBridgeFactory*>(message_loop,
34 bridge_factory); 34 bridge_factory);
35 } 35 }
36 36
37 // MediaFilter implementation. 37 // MediaFilter implementation.
38 virtual void Stop(); 38 virtual void Stop();
39 39
40 // DataSource implementation. 40 // DataSource implementation.
41 virtual bool Initialize(const std::string& url); 41 virtual void Initialize(const std::string& url,
42 media::FilterCallback* callback);
42 virtual const media::MediaFormat& media_format(); 43 virtual const media::MediaFormat& media_format();
43 virtual size_t Read(uint8* data, size_t size); 44 virtual size_t Read(uint8* data, size_t size);
44 virtual bool GetPosition(int64* position_out); 45 virtual bool GetPosition(int64* position_out);
45 virtual bool SetPosition(int64 position); 46 virtual bool SetPosition(int64 position);
46 virtual bool GetSize(int64* size_out); 47 virtual bool GetSize(int64* size_out);
47 virtual bool IsSeekable(); 48 virtual bool IsSeekable();
48 49
49 // webkit_glue::ResourceLoaderBridge::Peer implementation. 50 // webkit_glue::ResourceLoaderBridge::Peer implementation.
50 virtual void OnDownloadProgress(uint64 position, uint64 size); 51 virtual void OnDownloadProgress(uint64 position, uint64 size);
51 virtual void OnUploadProgress(uint64 position, uint64 size); 52 virtual void OnUploadProgress(uint64 position, uint64 size);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 UNINITIALIZED, 98 UNINITIALIZED,
98 INITIALIZING, 99 INITIALIZING,
99 INITIALIZED, 100 INITIALIZED,
100 STOPPED, 101 STOPPED,
101 }; 102 };
102 State state_; 103 State state_;
103 104
104 // Used for accessing |state_|. 105 // Used for accessing |state_|.
105 Lock lock_; 106 Lock lock_;
106 107
108 // Filter callbacks.
109 scoped_ptr<media::FilterCallback> initialize_callback_;
110
107 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource); 111 DISALLOW_COPY_AND_ASSIGN(SimpleDataSource);
108 }; 112 };
109 113
110 } // namespace webkit_glue 114 } // namespace webkit_glue
111 115
112 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_ 116 #endif // WEBKIT_GLUE_MEDIA_SIMPLE_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | webkit/glue/media/simple_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698