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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void ScheduleSeekEventAndStopDecoding(base::TimeDelta seek_time); | 138 void ScheduleSeekEventAndStopDecoding(base::TimeDelta seek_time); |
139 | 139 |
140 // Schedules a browser seek event. We must not currently be processing any | 140 // Schedules a browser seek event. We must not currently be processing any |
141 // seek. Note that there is possibility that browser seek of renderer demuxer | 141 // seek. Note that there is possibility that browser seek of renderer demuxer |
142 // may unexpectedly stall due to lack of buffered data at or after the browser | 142 // may unexpectedly stall due to lack of buffered data at or after the browser |
143 // seek time. | 143 // seek time. |
144 // TODO(wolenetz): Instead of doing hack browser seek, replay cached data | 144 // TODO(wolenetz): Instead of doing hack browser seek, replay cached data |
145 // since last keyframe. See http://crbug.com/304234. | 145 // since last keyframe. See http://crbug.com/304234. |
146 void BrowserSeekToCurrentTime(); | 146 void BrowserSeekToCurrentTime(); |
147 | 147 |
148 // Helper function to determine whether a protected surface is needed for | |
149 // video playback. | |
150 bool IsProtectedSurfaceRequired(); | |
151 | |
152 // Called when a MediaDecoderJob finishes prefetching data. Once all | 148 // Called when a MediaDecoderJob finishes prefetching data. Once all |
153 // MediaDecoderJobs have prefetched data, then this method updates | 149 // MediaDecoderJobs have prefetched data, then this method updates |
154 // |start_time_ticks_| and |start_presentation_timestamp_| so that video can | 150 // |start_time_ticks_| and |start_presentation_timestamp_| so that video can |
155 // resync with audio and starts decoding. | 151 // resync with audio and starts decoding. |
156 void OnPrefetchDone(); | 152 void OnPrefetchDone(); |
157 | 153 |
158 // Called when the demuxer config changes. | 154 // Called when the demuxer config changes. |
159 void OnDemuxerConfigsChanged(); | 155 void OnDemuxerConfigsChanged(); |
160 | 156 |
161 // Called when new decryption key becomes available. | 157 // Called when new decryption key becomes available. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 base::WeakPtr<MediaSourcePlayer> weak_this_; | 271 base::WeakPtr<MediaSourcePlayer> weak_this_; |
276 // NOTE: Weak pointers must be invalidated before all other member variables. | 272 // NOTE: Weak pointers must be invalidated before all other member variables. |
277 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; | 273 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; |
278 | 274 |
279 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 275 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
280 }; | 276 }; |
281 | 277 |
282 } // namespace media | 278 } // namespace media |
283 | 279 |
284 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 280 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |