| Index: media/base/android/media_source_player.h
|
| diff --git a/media/base/android/media_source_player.h b/media/base/android/media_source_player.h
|
| index bd8457ed734ebfeb5ef97dea2cd530154d4cf9e8..ed0483cd835ff34fd4757f2fe67fea5749a17502 100644
|
| --- a/media/base/android/media_source_player.h
|
| +++ b/media/base/android/media_source_player.h
|
| @@ -29,6 +29,7 @@
|
| namespace media {
|
|
|
| class AudioDecoderJob;
|
| +class AudioTimestampHelper;
|
| class VideoDecoderJob;
|
|
|
| // This class handles media source extensions on Android. It uses Android
|
| @@ -76,8 +77,8 @@
|
| friend class MediaSourcePlayerTest;
|
|
|
| // Update the current timestamp.
|
| - void UpdateTimestamps(base::TimeDelta current_presentation_timestamp,
|
| - base::TimeDelta max_presentation_timestamp);
|
| + void UpdateTimestamps(base::TimeDelta presentation_timestamp,
|
| + size_t audio_output_bytes);
|
|
|
| // Helper function for starting media playback.
|
| void StartInternal();
|
| @@ -88,8 +89,8 @@
|
| // Called when the decoder finishes its task.
|
| void MediaDecoderCallback(
|
| bool is_audio, MediaCodecStatus status,
|
| - base::TimeDelta current_presentation_timestamp,
|
| - base::TimeDelta max_presentation_timestamp);
|
| + base::TimeDelta presentation_timestamp,
|
| + size_t audio_output_bytes);
|
|
|
| // Gets MediaCrypto object from |drm_bridge_|.
|
| base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto();
|
| @@ -132,14 +133,10 @@
|
| void OnDecoderStarved();
|
|
|
| // Starts the |decoder_starvation_callback_| task with the timeout value.
|
| - // |current_presentation_timestamp| - The presentation timestamp used for
|
| - // starvation timeout computations. It represents the current timestamp of
|
| - // rendered data.
|
| - // |max_presentation_timestamp| - The presentation timestamp if all the
|
| - // decoded data are rendered.
|
| - void StartStarvationCallback(
|
| - base::TimeDelta current_presentation_timestamp,
|
| - base::TimeDelta max_presentation_timestamp);
|
| + // |presentation_timestamp| - The presentation timestamp used for starvation
|
| + // timeout computations. It represents the timestamp of the last piece of
|
| + // decoded data.
|
| + void StartStarvationCallback(base::TimeDelta presentation_timestamp);
|
|
|
| // Schedules a seek event in |pending_events_| and calls StopDecode() on all
|
| // the MediaDecoderJobs. Sets clock to |seek_time|, and resets
|
| @@ -269,6 +266,9 @@
|
| // elapses.
|
| base::CancelableClosure decoder_starvation_callback_;
|
|
|
| + // Object to calculate the current audio timestamp for A/V sync.
|
| + scoped_ptr<AudioTimestampHelper> audio_timestamp_helper_;
|
| +
|
| MediaDrmBridge* drm_bridge_;
|
|
|
| // No decryption key available to decrypt the encrypted buffer. In this case,
|
|
|