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

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: cc2a95fe Android fixes. Created 7 years 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 #if defined(GOOGLE_TV) 259 #if defined(GOOGLE_TV)
260 // Request external surface for out-of-band composition. 260 // Request external surface for out-of-band composition.
261 void RequestExternalSurface(); 261 void RequestExternalSurface();
262 #endif 262 #endif
263 263
264 private: 264 private:
265 void DrawRemotePlaybackIcon(); 265 void DrawRemotePlaybackIcon();
266 void ReallocateVideoFrame(); 266 void ReallocateVideoFrame();
267 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame); 267 void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame>& frame);
268 void DidLoadMediaInfo(MediaInfoLoader::Status status); 268 void DidLoadMediaInfo(MediaInfoLoader::Status status);
269 void DoReleaseRemotePlaybackTexture(uint32 sync_point); 269 void DoReleaseRemotePlaybackTexture(
270 scoped_ptr<gpu::MailboxHolder> mailbox_holder);
270 271
271 bool IsKeySystemSupported(const blink::WebString& key_system); 272 bool IsKeySystemSupported(const blink::WebString& key_system);
272 273
273 // Actually do the work for generateKeyRequest/addKey so they can easily 274 // Actually do the work for generateKeyRequest/addKey so they can easily
274 // report results to UMA. 275 // report results to UMA.
275 MediaKeyException GenerateKeyRequestInternal( 276 MediaKeyException GenerateKeyRequestInternal(
276 const blink::WebString& key_system, 277 const blink::WebString& key_system,
277 const unsigned char* init_data, 278 const unsigned char* init_data,
278 unsigned init_data_length); 279 unsigned init_data_length);
279 MediaKeyException AddKeyInternal(const blink::WebString& key_system, 280 MediaKeyException AddKeyInternal(const blink::WebString& key_system,
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 scoped_ptr<ProxyDecryptor> decryptor_; 451 scoped_ptr<ProxyDecryptor> decryptor_;
451 452
452 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 453 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
453 454
454 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 455 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
455 }; 456 };
456 457
457 } // namespace content 458 } // namespace content
458 459
459 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 460 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698