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

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

Issue 2408063009: media: Use native DecodeStatus in media mojo interfaces (Closed)
Patch Set: comments addressed Created 4 years, 2 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_video_decoder_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_video_decoder_service.cc
diff --git a/media/mojo/services/mojo_video_decoder_service.cc b/media/mojo/services/mojo_video_decoder_service.cc
index a535f608234665b88937e7c978e8feda09507f7d..0150f0d5b02dc6f89e73c5f1405bd842ce9bed10 100644
--- a/media/mojo/services/mojo_video_decoder_service.cc
+++ b/media/mojo/services/mojo_video_decoder_service.cc
@@ -64,26 +64,12 @@ void MojoVideoDecoderService::Initialize(mojom::VideoDecoderConfigPtr config,
base::Bind(&MojoVideoDecoderService::OnDecoderOutput, weak_this_));
}
-void MojoVideoDecoderService::OnDecoderInitialized(
- const InitializeCallback& callback,
- bool success) {
- DVLOG(1) << __FUNCTION__;
- callback.Run(success);
-}
-
-void MojoVideoDecoderService::OnDecoderOutput(
- const scoped_refptr<VideoFrame>& frame) {
- DVLOG(1) << __FUNCTION__;
- DCHECK(client_);
- client_->OnVideoFrameDecoded(mojom::VideoFrame::From(frame));
-}
-
void MojoVideoDecoderService::Decode(mojom::DecoderBufferPtr buffer,
const DecodeCallback& callback) {
DVLOG(1) << __FUNCTION__;
if (!decoder_) {
- callback.Run(mojom::DecodeStatus::DECODE_ERROR);
+ callback.Run(DecodeStatus::DECODE_ERROR);
return;
}
@@ -92,7 +78,7 @@ void MojoVideoDecoderService::Decode(mojom::DecoderBufferPtr buffer,
scoped_refptr<DecoderBuffer> media_buffer =
mojo_decoder_buffer_reader_->ReadDecoderBuffer(buffer);
if (!media_buffer) {
- callback.Run(mojom::DecodeStatus::DECODE_ERROR);
+ callback.Run(DecodeStatus::DECODE_ERROR);
return;
}
@@ -101,12 +87,6 @@ void MojoVideoDecoderService::Decode(mojom::DecoderBufferPtr buffer,
weak_this_, callback));
}
-void MojoVideoDecoderService::OnDecoderDecoded(const DecodeCallback& callback,
- DecodeStatus status) {
- DVLOG(1) << __FUNCTION__;
- callback.Run(static_cast<mojom::DecodeStatus>(status));
-}
-
void MojoVideoDecoderService::Reset(const ResetCallback& callback) {
DVLOG(1) << __FUNCTION__;
@@ -119,9 +99,29 @@ void MojoVideoDecoderService::Reset(const ResetCallback& callback) {
weak_this_, callback));
}
+void MojoVideoDecoderService::OnDecoderInitialized(
+ const InitializeCallback& callback,
+ bool success) {
+ DVLOG(1) << __FUNCTION__;
+ callback.Run(success);
+}
+
+void MojoVideoDecoderService::OnDecoderDecoded(const DecodeCallback& callback,
+ DecodeStatus status) {
+ DVLOG(1) << __FUNCTION__;
+ callback.Run(status);
+}
+
void MojoVideoDecoderService::OnDecoderReset(const ResetCallback& callback) {
DVLOG(1) << __FUNCTION__;
callback.Run();
}
+void MojoVideoDecoderService::OnDecoderOutput(
+ const scoped_refptr<VideoFrame>& frame) {
+ DVLOG(1) << __FUNCTION__;
+ DCHECK(client_);
+ client_->OnVideoFrameDecoded(mojom::VideoFrame::From(frame));
+}
+
} // namespace media
« no previous file with comments | « media/mojo/services/mojo_video_decoder_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698