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

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

Issue 1242913004: MediaCodecPlayer implementation (stage 3 - browser seek and surface change) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-seek
Patch Set: Fixed SeekTo() followed by Release() and added uunit tests for this case Created 5 years, 5 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
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);

Powered by Google App Engine
This is Rietveld 408576698