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

Unified Diff: media/filters/ffmpeg_video_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/ffmpeg_audio_decoder.cc ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 5438126f2e50b259994d7775fd771aa910c3959f..92028dce636ab97364e71c1d09651689e3b5dd99 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -211,12 +211,12 @@ void FFmpegVideoDecoder::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;
}
if (state_ == kDecodeFinished) {
- decode_cb_bound.Run(kOk);
+ decode_cb_bound.Run(DecodeStatus::OK);
return;
}
@@ -248,7 +248,7 @@ void FFmpegVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
has_produced_frame = false;
if (!FFmpegDecode(buffer, &has_produced_frame)) {
state_ = kError;
- decode_cb_bound.Run(kDecodeError);
+ decode_cb_bound.Run(DecodeStatus::DECODE_ERROR);
return;
}
// Repeat to flush the decoder after receiving EOS buffer.
@@ -259,7 +259,7 @@ void FFmpegVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
// VideoDecoderShim expects that |decode_cb| is called only after
// |output_cb_|.
- decode_cb_bound.Run(kOk);
+ decode_cb_bound.Run(DecodeStatus::OK);
}
void FFmpegVideoDecoder::Reset(const base::Closure& closure) {
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.cc ('k') | media/filters/ffmpeg_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698