Index: media/base/android/media_codec_decoder.h |
diff --git a/media/base/android/media_codec_decoder.h b/media/base/android/media_codec_decoder.h |
index a974eeaa0b12537462e273db8f51d1732c659ada..1301e12e5fde1bc35b512d628d308dd7114c5908 100644 |
--- a/media/base/android/media_codec_decoder.h |
+++ b/media/base/android/media_codec_decoder.h |
@@ -230,9 +230,9 @@ class MediaCodecDecoder { |
// Returns the number of delayed task (we might have them for video). |
virtual int NumDelayedRenderTasks() const; |
- // Releases output buffers that are dequeued and not released yet |
- // because their rendering is delayed (video). |
- virtual void ReleaseDelayedBuffers() {} |
+ // Releases output buffers that are dequeued and not released yet (video) |
+ // if the |release| parameter is set and then remove the references to them. |
+ virtual void ClearDelayedBuffers(bool release) {} |
#ifndef NDEBUG |
// For video, checks that access unit is the key frame or stand-alone EOS. |
@@ -259,6 +259,10 @@ class MediaCodecDecoder { |
// The queue of access units. |
AccessUnitQueue au_queue_; |
+ // Flag forces reconfiguration even if |media_codec_bridge_| exists. Currently |
+ // is set by video decoder when the video surface changes. |
+ bool needs_reconfigure_; |
+ |
private: |
enum DecoderState { |
kStopped = 0, |
@@ -266,6 +270,7 @@ class MediaCodecDecoder { |
kPrefetched, |
kRunning, |
kStopping, |
+ kInEmergencyStop, |
kError, |
}; |
@@ -290,8 +295,9 @@ class MediaCodecDecoder { |
// Helper method for ProcessNextFrame. |
// Pulls all currently available output frames and renders them. |
- // Returns false if there was MediaCodec error. |
- bool DepleteOutputBufferQueue(bool* eos_encountered); |
+ // Returns true if we need to continue decoding process, i.e post next |
+ // ProcessNextFrame method, and false if we need to stop decoding. |
+ bool DepleteOutputBufferQueue(); |
DecoderState GetState() const; |
void SetState(DecoderState state); |