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

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

Issue 596093002: Let audio wait for video to finish prerolling after seek (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 6 years, 3 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.h ('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 17aa2a8ebdbed4292081768daa86b1a52c05019c..a5873864645376caa6cab4523975b9e79071aff6 100644
--- a/media/base/android/media_source_player.h
+++ b/media/base/android/media_source_player.h
@@ -90,6 +90,8 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
base::TimeDelta current_presentation_timestamp,
base::TimeDelta max_presentation_timestamp);
+ bool IsPrerollFinished(bool is_audio) const;
+
// Gets MediaCrypto object from |drm_bridge_|.
base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto();
@@ -107,8 +109,8 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
void DecodeMoreVideo();
// Functions check whether audio/video is present.
- bool HasVideo();
- bool HasAudio();
+ bool HasVideo() const;
+ bool HasAudio() const;
// Functions that check whether audio/video stream has reached end of output
// or are not present in player configuration.
@@ -258,6 +260,9 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
// Test-only callback for hooking the completion of the next decode cycle.
base::Closure decode_callback_for_testing_;
+ // Whether audio or video decoder is in the process of prerolling.
+ bool prerolling_;
+
// Weak pointer passed to media decoder jobs for callbacks.
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<MediaSourcePlayer> weak_factory_;
« no previous file with comments | « media/base/android/media_decoder_job.h ('k') | media/base/android/media_source_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698