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

Side by Side Diff: media/base/android/media_source_player.h

Issue 53413004: Clear any pending surface change prior to checking media crypto in MSP::ConfigureVideoDecoderJob() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addresses comments and adds a narrow unit test Created 7 years, 1 month 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Gets MediaCrypto object from |drm_bridge_|. 94 // Gets MediaCrypto object from |drm_bridge_|.
95 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto(); 95 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto();
96 96
97 // Callback to notify that MediaCrypto is ready in |drm_bridge_|. 97 // Callback to notify that MediaCrypto is ready in |drm_bridge_|.
98 void OnMediaCryptoReady(); 98 void OnMediaCryptoReady();
99 99
100 // Handle pending events when all the decoder jobs finished. 100 // Handle pending events when all the decoder jobs finished.
101 void ProcessPendingEvents(); 101 void ProcessPendingEvents();
102 102
103 // Helper method to configure the decoder jobs. 103 // Helper method to clear any pending |SURFACE_CHANGE_EVENT_PENDING|
104 // and reset |video_decoder_job_| to null.
105 void ResetVideoDecoderJob();
106
107 // Helper methods to configure the decoder jobs.
104 void ConfigureVideoDecoderJob(); 108 void ConfigureVideoDecoderJob();
105 void ConfigureAudioDecoderJob(); 109 void ConfigureAudioDecoderJob();
106 110
107 // Flush the decoders and clean up all the data needs to be decoded. 111 // Flush the decoders and clean up all the data needs to be decoded.
108 void ClearDecodingData(); 112 void ClearDecodingData();
109 113
110 // Called to decoder more data. 114 // Called to decoder more data.
111 void DecodeMoreAudio(); 115 void DecodeMoreAudio();
112 void DecodeMoreVideo(); 116 void DecodeMoreVideo();
113 117
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // try to start playback again. 261 // try to start playback again.
258 bool is_waiting_for_key_; 262 bool is_waiting_for_key_;
259 263
260 friend class MediaSourcePlayerTest; 264 friend class MediaSourcePlayerTest;
261 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); 265 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer);
262 }; 266 };
263 267
264 } // namespace media 268 } // namespace media
265 269
266 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ 270 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/android/media_source_player.cc » ('j') | media/base/android/media_source_player_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698