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

Unified Diff: media/mojo/services/mojo_audio_decoder.cc

Issue 1899363002: Finish plumbing MojoVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CHECKs on GPU side. Created 4 years, 7 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/mojo/services/mojo_audio_decoder.cc
diff --git a/media/mojo/services/mojo_audio_decoder.cc b/media/mojo/services/mojo_audio_decoder.cc
index c80300aef1eb79a827ad47cfdabdf6f9e61e5938..612b9ebdd777599ba44285f435263302766ba3c6 100644
--- a/media/mojo/services/mojo_audio_decoder.cc
+++ b/media/mojo/services/mojo_audio_decoder.cc
@@ -163,27 +163,12 @@ void MojoAudioDecoder::OnInitialized(bool success,
base::ResetAndReturn(&init_cb_).Run(success);
}
-static media::DecodeStatus ConvertDecodeStatus(
- mojom::AudioDecoder::DecodeStatus status) {
- switch (status) {
- case mojom::AudioDecoder::DecodeStatus::OK:
- return media::DecodeStatus::OK;
- case mojom::AudioDecoder::DecodeStatus::ABORTED:
- return media::DecodeStatus::ABORTED;
- case mojom::AudioDecoder::DecodeStatus::DECODE_ERROR:
- return media::DecodeStatus::DECODE_ERROR;
- }
- NOTREACHED();
- return media::DecodeStatus::DECODE_ERROR;
-}
-
-void MojoAudioDecoder::OnDecodeStatus(
- mojom::AudioDecoder::DecodeStatus status) {
+void MojoAudioDecoder::OnDecodeStatus(mojom::DecodeStatus status) {
DVLOG(1) << __FUNCTION__ << ": status:" << status;
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(!decode_cb_.is_null());
- base::ResetAndReturn(&decode_cb_).Run(ConvertDecodeStatus(status));
+ base::ResetAndReturn(&decode_cb_).Run(static_cast<DecodeStatus>(status));
}
void MojoAudioDecoder::OnResetDone() {

Powered by Google App Engine
This is Rietveld 408576698