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

Side by Side Diff: webkit/media/webmediaplayer_impl.h

Issue 10020053: Initial implementation of Encrypted Media Extensions in Chrome. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player.
6 // It contains Pipeline which is the actual media player pipeline, it glues 6 // It contains Pipeline 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 // Pipeline would creates multiple threads and access some public methods 8 // Pipeline 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 virtual unsigned videoDecodedByteCount() const; 177 virtual unsigned videoDecodedByteCount() const;
178 178
179 virtual WebKit::WebVideoFrame* getCurrentFrame(); 179 virtual WebKit::WebVideoFrame* getCurrentFrame();
180 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); 180 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame);
181 181
182 virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); 182 virtual WebKit::WebAudioSourceProvider* audioSourceProvider();
183 183
184 virtual bool sourceAppend(const unsigned char* data, unsigned length); 184 virtual bool sourceAppend(const unsigned char* data, unsigned length);
185 virtual void sourceEndOfStream(EndOfStreamStatus status); 185 virtual void sourceEndOfStream(EndOfStreamStatus status);
186 186
187 virtual MediaKeyException generateKeyRequest(
188 const WebKit::WebString& keySystem,
scherkus (not reviewing) 2012/04/12 20:18:41 chromium style unix_hacker here + below
ddorwin 2012/04/12 23:41:23 Done. Too much copying of code from WebKit. :)
189 const unsigned char* initData,
190 unsigned initDataLength);
191
192 virtual MediaKeyException addKey(const WebKit::WebString& keySystem,
193 const unsigned char* key,
194 unsigned keyLength,
195 const unsigned char* initData,
196 unsigned initDataLength,
197 const WebKit::WebString& sessionId);
198
199 virtual MediaKeyException cancelKeyRequest(
200 const WebKit::WebString& keySystem,
201 const WebKit::WebString& sessionId);
202
203
187 // As we are closing the tab or even the browser, |main_loop_| is destroyed 204 // As we are closing the tab or even the browser, |main_loop_| is destroyed
188 // even before this object gets destructed, so we need to know when 205 // even before this object gets destructed, so we need to know when
189 // |main_loop_| is being destroyed and we can stop posting repaint task 206 // |main_loop_| is being destroyed and we can stop posting repaint task
190 // to it. 207 // to it.
191 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; 208 virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
192 209
193 void Repaint(); 210 void Repaint();
194 211
195 void OnPipelineInitialize(media::PipelineStatus status); 212 void OnPipelineInitialize(media::PipelineStatus status);
196 void OnPipelineSeek(media::PipelineStatus status); 213 void OnPipelineSeek(media::PipelineStatus status);
(...skipping 17 matching lines...) Expand all
214 231
215 // Destroy resources held. 232 // Destroy resources held.
216 void Destroy(); 233 void Destroy();
217 234
218 // Getter method to |client_|. 235 // Getter method to |client_|.
219 WebKit::WebMediaPlayerClient* GetClient(); 236 WebKit::WebMediaPlayerClient* GetClient();
220 237
221 // Lets V8 know that player uses extra resources not managed by V8. 238 // Lets V8 know that player uses extra resources not managed by V8.
222 void IncrementExternallyAllocatedMemory(); 239 void IncrementExternallyAllocatedMemory();
223 240
241 void generateKeyRequestTask(const WebKit::WebString& keySystem,
242 const unsigned char* initData,
243 unsigned initDataLength,
244 uint32_t sessionId);
245
246 void addKeyTask(const WebKit::WebString& keySystem,
247 const unsigned char* key,
248 unsigned keyLength,
249 const unsigned char* initData,
250 unsigned initDataLength,
251 const WebKit::WebString& sessionId);
252
253 void cancelKeyRequestTask(const WebKit::WebString& keySystem,
254 const WebKit::WebString& sessionId);
255
224 WebKit::WebFrame* frame_; 256 WebKit::WebFrame* frame_;
225 257
226 // TODO(hclam): get rid of these members and read from the pipeline directly. 258 // TODO(hclam): get rid of these members and read from the pipeline directly.
227 WebKit::WebMediaPlayer::NetworkState network_state_; 259 WebKit::WebMediaPlayer::NetworkState network_state_;
228 WebKit::WebMediaPlayer::ReadyState ready_state_; 260 WebKit::WebMediaPlayer::ReadyState ready_state_;
229 261
230 // Keep a list of buffered time ranges. 262 // Keep a list of buffered time ranges.
231 WebKit::WebTimeRanges buffered_; 263 WebKit::WebTimeRanges buffered_;
232 264
233 // Message loops for posting tasks between Chrome's main thread. Also used 265 // Message loops for posting tasks between Chrome's main thread. Also used
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 bool incremented_externally_allocated_memory_; 322 bool incremented_externally_allocated_memory_;
291 323
292 WebKit::WebAudioSourceProvider* audio_source_provider_; 324 WebKit::WebAudioSourceProvider* audio_source_provider_;
293 325
294 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 326 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
295 }; 327 };
296 328
297 } // namespace webkit_media 329 } // namespace webkit_media
298 330
299 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 331 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698