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