OLD | NEW |
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 Loading... |
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // Test-only callback for hooking the completion of the next decode cycle. | 275 // Test-only callback for hooking the completion of the next decode cycle. |
272 base::Closure decode_callback_for_testing_; | 276 base::Closure decode_callback_for_testing_; |
273 | 277 |
274 friend class MediaSourcePlayerTest; | 278 friend class MediaSourcePlayerTest; |
275 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 279 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
276 }; | 280 }; |
277 | 281 |
278 } // namespace media | 282 } // namespace media |
279 | 283 |
280 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 284 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |