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

Unified Diff: media/filters/decoder_stream.h

Issue 1720343002: Attempt decoder fallback when the first decode call fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resume_zero
Patch Set: Created 4 years, 10 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 | « no previous file | media/filters/decoder_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream.h
diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h
index 3af3d752b1b3b785e8f1e0ed9c4a6a7513fc9a87..d047882558a1b430679b8e52dd327577c02dd329 100644
--- a/media/filters/decoder_stream.h
+++ b/media/filters/decoder_stream.h
@@ -156,7 +156,10 @@ class MEDIA_EXPORT DecoderStream {
void FlushDecoder();
// Callback for Decoder::Decode().
- void OnDecodeDone(int buffer_size, bool end_of_stream, DecoderStatus status);
+ void OnDecodeDone(int sequence_token,
+ int buffer_size,
+ bool end_of_stream,
+ DecoderStatus status);
// Output callback passed to Decoder::Initialize().
void OnDecodeOutputReady(const scoped_refptr<Output>& output);
@@ -226,6 +229,10 @@ class MEDIA_EXPORT DecoderStream {
// Tracks the duration of incoming packets over time.
MovingAverage duration_tracker_;
+ // Used to reattempt decoding when decode fails right after Initialize().
+ std::deque<scoped_refptr<DecoderBuffer>> pending_buffers_;
+ int sequence_token_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_;
};
« no previous file with comments | « no previous file | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698