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

Unified Diff: content/renderer/pepper/video_decoder_shim.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 | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/video_decoder_shim.cc
diff --git a/content/renderer/pepper/video_decoder_shim.cc b/content/renderer/pepper/video_decoder_shim.cc
index 92ffcdb562302e3e2c69ecd9424a397c85e80001..c8e68abbe8ab39c657ed8446b18bfe0c55dfe391 100644
--- a/content/renderer/pepper/video_decoder_shim.cc
+++ b/content/renderer/pepper/video_decoder_shim.cc
@@ -650,7 +650,7 @@ class VideoDecoderShim::DecoderImpl {
private:
void OnInitDone(bool success);
void DoDecode();
- void OnDecodeComplete(media::VideoDecoder::Status status);
+ void OnDecodeComplete(media::DecodeStatus status);
void OnOutputComplete(const scoped_refptr<media::VideoFrame>& frame);
void OnResetComplete();
@@ -732,8 +732,8 @@ void VideoDecoderShim::DecoderImpl::Reset() {
const PendingDecode& decode = pending_decodes_.front();
scoped_ptr<PendingFrame> pending_frame(new PendingFrame(decode.decode_id));
main_task_runner_->PostTask(
- FROM_HERE, base::Bind(&VideoDecoderShim::OnDecodeComplete, shim_,
- media::VideoDecoder::kAborted, decode.decode_id));
+ FROM_HERE, base::Bind(&VideoDecoderShim::OnDecodeComplete, shim_, PP_OK,
+ decode.decode_id));
pending_decodes_.pop();
}
// Don't need to call Reset() if the |decoder_| hasn't been initialized.
@@ -781,23 +781,19 @@ void VideoDecoderShim::DecoderImpl::DoDecode() {
}
void VideoDecoderShim::DecoderImpl::OnDecodeComplete(
- media::VideoDecoder::Status status) {
+ media::DecodeStatus status) {
DCHECK(awaiting_decoder_);
awaiting_decoder_ = false;
int32_t result;
switch (status) {
- case media::VideoDecoder::kOk:
- case media::VideoDecoder::kAborted:
+ case media::DecodeStatus::OK:
+ case media::DecodeStatus::ABORTED:
result = PP_OK;
break;
- case media::VideoDecoder::kDecodeError:
+ case media::DecodeStatus::DECODE_ERROR:
result = PP_ERROR_RESOURCE_FAILED;
break;
- default:
- NOTREACHED();
- result = PP_ERROR_FAILED;
- break;
}
main_task_runner_->PostTask(
« no previous file with comments | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | media/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698