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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.h

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c301e01d Rebase. Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 #if defined(GOOGLE_TV) 229 #if defined(GOOGLE_TV)
230 bool InjectMediaStream(MediaStreamClient* media_stream_client, 230 bool InjectMediaStream(MediaStreamClient* media_stream_client,
231 media::Demuxer* demuxer, 231 media::Demuxer* demuxer,
232 const base::Closure& destroy_demuxer_cb); 232 const base::Closure& destroy_demuxer_cb);
233 #endif 233 #endif
234 234
235 // Can be called on any thread. 235 // Can be called on any thread.
236 static void OnReleaseRemotePlaybackTexture( 236 static void OnReleaseRemotePlaybackTexture(
237 const scoped_refptr<base::MessageLoopProxy>& main_loop, 237 const scoped_refptr<base::MessageLoopProxy>& main_loop,
238 const base::WeakPtr<WebMediaPlayerAndroid>& player, 238 const base::WeakPtr<WebMediaPlayerAndroid>& player,
239 uint32 sync_point); 239 scoped_ptr<gpu::MailboxHolder> mailbox_holder);
240 240
241 protected: 241 protected:
242 // Helper method to update the playing state. 242 // Helper method to update the playing state.
243 void UpdatePlayingState(bool is_playing_); 243 void UpdatePlayingState(bool is_playing_);
244 244
245 // Helper methods for posting task for setting states and update WebKit. 245 // Helper methods for posting task for setting states and update WebKit.
246 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 246 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
247 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); 247 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state);
248 void TryCreateStreamTextureProxyIfNeeded(); 248 void TryCreateStreamTextureProxyIfNeeded();
249 void DoCreateStreamTexture(); 249 void DoCreateStreamTexture();
250 250
251 251
252 // Helper method to reestablish the surface texture peer for android 252 // Helper method to reestablish the surface texture peer for android
253 // media player. 253 // media player.
254 void EstablishSurfaceTexturePeer(); 254 void EstablishSurfaceTexturePeer();
255 255
256 // Requesting whether the surface texture peer needs to be reestablished. 256 // Requesting whether the surface texture peer needs to be reestablished.
257 void SetNeedsEstablishPeer(bool needs_establish_peer); 257 void SetNeedsEstablishPeer(bool needs_establish_peer);
258 258
259 private: 259 private:
260 void DrawRemotePlaybackIcon(); 260 void DrawRemotePlaybackIcon();
261 void ReallocateVideoFrame(); 261 void ReallocateVideoFrame();
262 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); 262 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame);
263 void DidLoadMediaInfo(MediaInfoLoader::Status status); 263 void DidLoadMediaInfo(MediaInfoLoader::Status status);
264 void DoReleaseRemotePlaybackTexture(uint32 sync_point); 264 void DoReleaseRemotePlaybackTexture(
265 scoped_ptr<gpu::MailboxHolder> mailbox_holder);
265 266
266 bool IsKeySystemSupported(const blink::WebString& key_system); 267 bool IsKeySystemSupported(const blink::WebString& key_system);
267 268
268 // Actually do the work for generateKeyRequest/addKey so they can easily 269 // Actually do the work for generateKeyRequest/addKey so they can easily
269 // report results to UMA. 270 // report results to UMA.
270 MediaKeyException GenerateKeyRequestInternal( 271 MediaKeyException GenerateKeyRequestInternal(
271 const blink::WebString& key_system, 272 const blink::WebString& key_system,
272 const unsigned char* init_data, 273 const unsigned char* init_data,
273 unsigned init_data_length); 274 unsigned init_data_length);
274 MediaKeyException AddKeyInternal(const blink::WebString& key_system, 275 MediaKeyException AddKeyInternal(const blink::WebString& key_system,
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 scoped_ptr<ProxyDecryptor> decryptor_; 448 scoped_ptr<ProxyDecryptor> decryptor_;
448 449
449 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 450 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
450 451
451 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 452 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
452 }; 453 };
453 454
454 } // namespace content 455 } // namespace content
455 456
456 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 457 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698