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

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: Comments. 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
« no previous file with comments | « media/filters/decoder_stream.h ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream.cc
diff --git a/media/filters/decoder_stream.cc b/media/filters/decoder_stream.cc
index 4b03587253fa06cccd378d527ddf8f1de8e7ff5a..19ae054d64e7ab73d786a44d5050bca508ca7390 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) {
+ DecodeStatus 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 DecodeStatus::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 DecodeStatus::ABORTED:
+ // Decoder can return DecodeStatus::ABORTED during Reset() or during
+ // destruction.
return;
- case Decoder::kOk:
+ case DecodeStatus::OK:
// Any successful decode counts!
if (buffer_size > 0)
StreamTraits::ReportStatistics(statistics_cb_, buffer_size);
« no previous file with comments | « media/filters/decoder_stream.h ('k') | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698