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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 bool HasVideo(); | 110 bool HasVideo(); |
111 bool HasAudio(); | 111 bool HasAudio(); |
112 | 112 |
113 // Determine seekability based on duration. | 113 // Determine seekability based on duration. |
114 bool Seekable(); | 114 bool Seekable(); |
115 | 115 |
116 // Called when the |decoder_starvation_callback_| times out. | 116 // Called when the |decoder_starvation_callback_| times out. |
117 void OnDecoderStarved(); | 117 void OnDecoderStarved(); |
118 | 118 |
119 // Starts the |decoder_starvation_callback_| task with the timeout value. | 119 // Starts the |decoder_starvation_callback_| task with the timeout value. |
120 void StartStarvationCallback(const base::TimeDelta& timeout); | 120 // |presentation_timestamp| - The presentation timestamp used for starvation |
| 121 // timeout computations. It represents the timestamp of the last piece of |
| 122 // decoded data. |
| 123 void StartStarvationCallback(const base::TimeDelta& presentation_timestamp); |
121 | 124 |
122 // Schedules a seek event in |pending_events_| and calls StopDecode() on all | 125 // Schedules a seek event in |pending_events_| and calls StopDecode() on all |
123 // the MediaDecoderJobs. | 126 // the MediaDecoderJobs. |
124 void ScheduleSeekEventAndStopDecoding(); | 127 void ScheduleSeekEventAndStopDecoding(); |
125 | 128 |
126 // Helper function to set the volume. | 129 // Helper function to set the volume. |
127 void SetVolumeInternal(); | 130 void SetVolumeInternal(); |
128 | 131 |
129 // Helper function to determine whether a protected surface is needed for | 132 // Helper function to determine whether a protected surface is needed for |
130 // video playback. | 133 // video playback. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 214 |
212 MediaDrmBridge* drm_bridge_; | 215 MediaDrmBridge* drm_bridge_; |
213 | 216 |
214 friend class MediaSourcePlayerTest; | 217 friend class MediaSourcePlayerTest; |
215 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 218 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
216 }; | 219 }; |
217 | 220 |
218 } // namespace media | 221 } // namespace media |
219 | 222 |
220 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 223 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |