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 874e61add84c22ed95a1da86f47843da73991716..6db908ac3d9b9cb1048a27be9745e52bcfc3a076 100644 |
--- a/media/base/android/media_source_player.h |
+++ b/media/base/android/media_source_player.h |
@@ -69,7 +69,10 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
void OnDemuxerSeekDone(base::TimeDelta actual_browser_seek_time) override; |
void OnDemuxerDurationChanged(base::TimeDelta duration) override; |
- private: |
+ // Sets the idle period after which the audible state is considered gone. |
+ void SetAudibleStateIdlePeriod(base::TimeDelta duration); |
+ |
+private: |
friend class MediaSourcePlayerTest; |
// Update the current timestamp. |
@@ -168,6 +171,9 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
// Called when the CDM is detached. |
void OnCdmUnset(); |
+ // Set the status that the audio is currently playing |
+ void UpdateAudibleStatus(); |
+ |
// Test-only method to setup hook for the completion of the next decode cycle. |
// This callback state is cleared when it is next run. |
// Prevent usage creep by only calling this from the |
@@ -245,6 +251,16 @@ class MEDIA_EXPORT MediaSourcePlayer : public MediaPlayerAndroid, |
// elapses. |
base::CancelableClosure decoder_starvation_callback_; |
+ // A cancelable task that is reposted every time we enqueue an audio frame. |
+ // It arrived when the stream of frames interrupted, telling there is |
+ // no audible audio any more. |
+ base::CancelableClosure audible_audio_stopped_callback_; |
+ |
+ // The delay for audible_audio_stopped_callback_. |
+ // If a new audio frame arrives after this delay, |
+ // we will report non-audible state. |
+ base::TimeDelta audible_state_idle_period_; |
+ |
MediaDrmBridge* drm_bridge_; |
int cdm_registration_id_; |