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

Unified Diff: media/mojo/services/mojo_audio_decoder_service.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.cc ('k') | media/mojo/services/mojo_decoder_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_audio_decoder_service.cc
diff --git a/media/mojo/services/mojo_audio_decoder_service.cc b/media/mojo/services/mojo_audio_decoder_service.cc
index 64ed7d56358c6b7eb813e5ba2717d626dd10e522..3de0b40b6e1cf02bcaaf5af1b61a61aa04c67463 100644
--- a/media/mojo/services/mojo_audio_decoder_service.cc
+++ b/media/mojo/services/mojo_audio_decoder_service.cc
@@ -14,20 +14,6 @@
namespace media {
-static mojom::AudioDecoder::DecodeStatus ConvertDecodeStatus(
- media::DecodeStatus status) {
- switch (status) {
- case media::DecodeStatus::OK:
- return mojom::AudioDecoder::DecodeStatus::OK;
- case media::DecodeStatus::ABORTED:
- return mojom::AudioDecoder::DecodeStatus::ABORTED;
- case media::DecodeStatus::DECODE_ERROR:
- return mojom::AudioDecoder::DecodeStatus::DECODE_ERROR;
- }
- NOTREACHED();
- return mojom::AudioDecoder::DecodeStatus::DECODE_ERROR;
-}
-
MojoAudioDecoderService::MojoAudioDecoderService(
base::WeakPtr<MojoCdmServiceContext> mojo_cdm_service_context,
std::unique_ptr<media::AudioDecoder> decoder,
@@ -95,7 +81,7 @@ void MojoAudioDecoderService::Decode(mojom::DecoderBufferPtr buffer,
scoped_refptr<DecoderBuffer> media_buffer =
ReadDecoderBuffer(std::move(buffer));
if (!media_buffer) {
- callback.Run(ConvertDecodeStatus(media::DecodeStatus::DECODE_ERROR));
+ callback.Run(mojom::DecodeStatus::DECODE_ERROR);
return;
}
@@ -127,7 +113,7 @@ void MojoAudioDecoderService::OnInitialized(const InitializeCallback& callback,
void MojoAudioDecoderService::OnDecodeStatus(const DecodeCallback& callback,
media::DecodeStatus status) {
DVLOG(3) << __FUNCTION__ << " status:" << status;
- callback.Run(ConvertDecodeStatus(status));
+ callback.Run(static_cast<mojom::DecodeStatus>(status));
}
void MojoAudioDecoderService::OnResetDone(const ResetCallback& callback) {
« no previous file with comments | « media/mojo/services/mojo_audio_decoder.cc ('k') | media/mojo/services/mojo_decoder_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698