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

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: Windows needs some more headers, apaprently. 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
« no previous file with comments | « media/mojo/services/mojo_audio_decoder.h ('k') | media/mojo/services/mojo_audio_decoder_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 037982e44aaa9424996772edbec99969ea368912..6d105db0bed5b29722cbba4ede3b8e7218473256 100644
--- a/media/mojo/services/mojo_audio_decoder.cc
+++ b/media/mojo/services/mojo_audio_decoder.cc
@@ -170,27 +170,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() {
« no previous file with comments | « media/mojo/services/mojo_audio_decoder.h ('k') | media/mojo/services/mojo_audio_decoder_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698