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

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

Issue 79283006: Let only seeks reset Android MSE stream playback completion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, addressed ps6 comments. includes some test cleanup Created 7 years 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
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 f798eed4f988fb6f6ce270dab9f9ee1b67a3c433..ef822d49b28306305b710f5d84149ce9d580e5b4 100644
--- a/media/base/android/media_source_player.h
+++ b/media/base/android/media_source_player.h
@@ -97,7 +97,7 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
// Callback to notify that MediaCrypto is ready in |drm_bridge_|.
void OnMediaCryptoReady();
- // Handle pending events when all the decoder jobs finished.
+ // Handle pending events if all the decoder jobs are not currently decoding.
void ProcessPendingEvents();
// Helper method to clear any pending |SURFACE_CHANGE_EVENT_PENDING|
@@ -119,6 +119,11 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
bool HasVideo();
bool HasAudio();
+ // Functions that check whether audio/video stream has reached end of output
+ // or are not present in player configuration.
+ bool AudioFinished();
+ bool VideoFinished();
+
// Determine seekability based on duration.
bool Seekable();
@@ -198,8 +203,8 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid,
int sampling_rate_;
// TODO(xhwang/qinmin): Add |video_extra_data_|.
std::vector<uint8> audio_extra_data_;
- bool audio_finished_;
- bool video_finished_;
+ bool reached_audio_eos_;
+ bool reached_video_eos_;
bool playing_;
bool is_audio_encrypted_;
bool is_video_encrypted_;

Powered by Google App Engine
This is Rietveld 408576698