| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // Helper function to determine whether a protected surface is needed for | 147 // Helper function to determine whether a protected surface is needed for |
| 148 // video playback. | 148 // video playback. |
| 149 bool IsProtectedSurfaceRequired(); | 149 bool IsProtectedSurfaceRequired(); |
| 150 | 150 |
| 151 // Called when a MediaDecoderJob finishes prefetching data. Once all | 151 // Called when a MediaDecoderJob finishes prefetching data. Once all |
| 152 // MediaDecoderJobs have prefetched data, then this method updates | 152 // MediaDecoderJobs have prefetched data, then this method updates |
| 153 // |start_time_ticks_| and |start_presentation_timestamp_| so that video can | 153 // |start_time_ticks_| and |start_presentation_timestamp_| so that video can |
| 154 // resync with audio and starts decoding. | 154 // resync with audio and starts decoding. |
| 155 void OnPrefetchDone(); | 155 void OnPrefetchDone(); |
| 156 | 156 |
| 157 // TODO(qinmin/wolenetz): Reorder these based on their priority from |
| 158 // ProcessPendingEvents(). Release() and other routines are dependent upon |
| 159 // priority consistency. |
| 157 enum PendingEventFlags { | 160 enum PendingEventFlags { |
| 158 NO_EVENT_PENDING = 0, | 161 NO_EVENT_PENDING = 0, |
| 159 SEEK_EVENT_PENDING = 1 << 0, | 162 SEEK_EVENT_PENDING = 1 << 0, |
| 160 SURFACE_CHANGE_EVENT_PENDING = 1 << 1, | 163 SURFACE_CHANGE_EVENT_PENDING = 1 << 1, |
| 161 CONFIG_CHANGE_EVENT_PENDING = 1 << 2, | 164 CONFIG_CHANGE_EVENT_PENDING = 1 << 2, |
| 162 PREFETCH_REQUEST_EVENT_PENDING = 1 << 3, | 165 PREFETCH_REQUEST_EVENT_PENDING = 1 << 3, |
| 163 PREFETCH_DONE_EVENT_PENDING = 1 << 4, | 166 PREFETCH_DONE_EVENT_PENDING = 1 << 4, |
| 164 }; | 167 }; |
| 165 | 168 |
| 166 static const char* GetEventName(PendingEventFlags event); | 169 static const char* GetEventName(PendingEventFlags event); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // try to start playback again. | 260 // try to start playback again. |
| 258 bool is_waiting_for_key_; | 261 bool is_waiting_for_key_; |
| 259 | 262 |
| 260 friend class MediaSourcePlayerTest; | 263 friend class MediaSourcePlayerTest; |
| 261 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 264 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
| 262 }; | 265 }; |
| 263 | 266 |
| 264 } // namespace media | 267 } // namespace media |
| 265 | 268 |
| 266 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 269 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
| OLD | NEW |