Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(959)

Unified Diff: media/base/android/media_source_player.h

Issue 238053004: Revert of Fix an issue that audio and video may run out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | media/base/android/media_source_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698