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

Unified Diff: media/filters/ffmpeg_audio_decoder.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/fake_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index bef0a86f51a5d6605e1fd3c83656ade44f73f567..b5dc7177655e033adc51c583d9035b08b2667b7d 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -192,13 +192,13 @@ void FFmpegAudioDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
DecodeCB decode_cb_bound = BindToCurrentLoop(decode_cb);
if (state_ == kError) {
- decode_cb_bound.Run(kDecodeError);
+ decode_cb_bound.Run(DecodeStatus::DECODE_ERROR);
return;
}
// Do nothing if decoding has finished.
if (state_ == kDecodeFinished) {
- decode_cb_bound.Run(kOk);
+ decode_cb_bound.Run(DecodeStatus::OK);
return;
}
@@ -227,7 +227,7 @@ void FFmpegAudioDecoder::DecodeBuffer(
// occurs with some damaged files.
if (!buffer->end_of_stream() && buffer->timestamp() == kNoTimestamp()) {
DVLOG(1) << "Received a buffer without timestamps!";
- decode_cb.Run(kDecodeError);
+ decode_cb.Run(DecodeStatus::DECODE_ERROR);
return;
}
@@ -236,7 +236,7 @@ void FFmpegAudioDecoder::DecodeBuffer(
has_produced_frame = false;
if (!FFmpegDecode(buffer, &has_produced_frame)) {
state_ = kError;
- decode_cb.Run(kDecodeError);
+ decode_cb.Run(DecodeStatus::DECODE_ERROR);
return;
}
// Repeat to flush the decoder after receiving EOS buffer.
@@ -245,7 +245,7 @@ void FFmpegAudioDecoder::DecodeBuffer(
if (buffer->end_of_stream())
state_ = kDecodeFinished;
- decode_cb.Run(kOk);
+ decode_cb.Run(DecodeStatus::OK);
}
bool FFmpegAudioDecoder::FFmpegDecode(
« no previous file with comments | « media/filters/fake_video_decoder_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698