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

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

Issue 2390783003: Make stream_id internal to StreamTextureHost. (Closed)
Patch Set: Rebasing to TOT. Created 4 years, 2 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 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void OnVolumeMultiplierUpdate(double multiplier) override; 222 void OnVolumeMultiplierUpdate(double multiplier) override;
223 223
224 protected: 224 protected:
225 // Helper method to update the playing state. 225 // Helper method to update the playing state.
226 void UpdatePlayingState(bool is_playing_); 226 void UpdatePlayingState(bool is_playing_);
227 227
228 // Helper methods for posting task for setting states and update WebKit. 228 // Helper methods for posting task for setting states and update WebKit.
229 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); 229 void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state);
230 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); 230 void UpdateReadyState(blink::WebMediaPlayer::ReadyState state);
231 void TryCreateStreamTextureProxyIfNeeded(); 231 void TryCreateStreamTextureProxyIfNeeded();
232 void DoCreateStreamTexture(); 232 int32_t DoCreateStreamTexture();
233 233
234 // Helper method to reestablish the surface texture peer for android 234 // Helper method to reestablish the surface texture peer for android
235 // media player. 235 // media player.
236 void EstablishSurfaceTexturePeer(); 236 void EstablishSurfaceTexturePeer();
237 237
238 // Requesting whether the surface texture peer needs to be reestablished. 238 // Requesting whether the surface texture peer needs to be reestablished.
239 void SetNeedsEstablishPeer(bool needs_establish_peer); 239 void SetNeedsEstablishPeer(bool needs_establish_peer);
240 240
241 private: 241 private:
242 void InitializePlayer(const GURL& url, 242 void InitializePlayer(const GURL& url,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 blink::WebMediaPlayer::NetworkState network_state_; 341 blink::WebMediaPlayer::NetworkState network_state_;
342 blink::WebMediaPlayer::ReadyState ready_state_; 342 blink::WebMediaPlayer::ReadyState ready_state_;
343 343
344 // GL texture ID allocated to the video. 344 // GL texture ID allocated to the video.
345 unsigned int texture_id_; 345 unsigned int texture_id_;
346 346
347 // GL texture mailbox for texture_id_ to provide in the VideoFrame, and sync 347 // GL texture mailbox for texture_id_ to provide in the VideoFrame, and sync
348 // point for when the mailbox was produced. 348 // point for when the mailbox was produced.
349 gpu::Mailbox texture_mailbox_; 349 gpu::Mailbox texture_mailbox_;
350 350
351 // Stream texture ID allocated to the video.
352 unsigned int stream_id_;
353
354 // Whether the media player has been initialized. 351 // Whether the media player has been initialized.
355 bool is_player_initialized_; 352 bool is_player_initialized_;
356 353
357 // Whether the media player is playing. 354 // Whether the media player is playing.
358 bool is_playing_; 355 bool is_playing_;
359 356
360 // Whether the media player is pending to play. 357 // Whether the media player is pending to play.
361 bool is_play_pending_; 358 bool is_play_pending_;
362 359
363 // Whether media player needs to re-establish the surface texture peer. 360 // Whether media player needs to re-establish the surface texture peer.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 428
432 // NOTE: Weak pointers must be invalidated before all other member variables. 429 // NOTE: Weak pointers must be invalidated before all other member variables.
433 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; 430 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_;
434 431
435 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 432 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
436 }; 433 };
437 434
438 } // namespace content 435 } // namespace content
439 436
440 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 437 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698