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

Unified Diff: media/filters/decoder_stream.cc

Issue 1834303005: Refactor audio and video decoder status into common file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cast. Created 4 years, 9 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/filters/decoder_stream.cc
diff --git a/media/filters/decoder_stream.cc b/media/filters/decoder_stream.cc
index 4b03587253fa06cccd378d527ddf8f1de8e7ff5a..b0e93bcaf65550bf6ba6929bb6f250eead275af0 100644
--- a/media/filters/decoder_stream.cc
+++ b/media/filters/decoder_stream.cc
@@ -335,7 +335,7 @@ void DecoderStream<StreamType>::FlushDecoder() {
template <DemuxerStream::Type StreamType>
void DecoderStream<StreamType>::OnDecodeDone(int buffer_size,
bool end_of_stream,
- typename Decoder::Status status) {
+ DecoderStatus status) {
FUNCTION_DVLOG(2) << ": " << status;
DCHECK(state_ == STATE_NORMAL || state_ == STATE_FLUSHING_DECODER ||
state_ == STATE_PENDING_DEMUXER_READ || state_ == STATE_ERROR)
@@ -362,7 +362,7 @@ void DecoderStream<StreamType>::OnDecodeDone(int buffer_size,
return;
switch (status) {
- case Decoder::kDecodeError:
+ case DecoderStatus::DECODE_ERROR:
state_ = STATE_ERROR;
MEDIA_LOG(ERROR, media_log_) << GetStreamTypeString() << " decode error";
ready_outputs_.clear();
@@ -370,11 +370,12 @@ void DecoderStream<StreamType>::OnDecodeDone(int buffer_size,
SatisfyRead(DECODE_ERROR, NULL);
return;
- case Decoder::kAborted:
- // Decoder can return kAborted during Reset() or during destruction.
+ case DecoderStatus::ABORTED:
+ // Decoder can return DecoderStatus::ABORTED during Reset() or during
+ // destruction.
return;
- case Decoder::kOk:
+ case DecoderStatus::OK:
// Any successful decode counts!
if (buffer_size > 0)
StreamTraits::ReportStatistics(statistics_cb_, buffer_size);

Powered by Google App Engine
This is Rietveld 408576698