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

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

Issue 2429723006: MojoVideoDecoder: Plumb metadata methods. (Closed)
Patch Set: Actually early return. 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/interfaces/video_decoder.mojom ('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 0150f0d5b02dc6f89e73c5f1405bd842ce9bed10..7b3d6bdcdf54b64bf17f8dd2c14886aa388a357b 100644
--- a/media/mojo/services/mojo_video_decoder_service.cc
+++ b/media/mojo/services/mojo_video_decoder_service.cc
@@ -37,7 +37,7 @@ void MojoVideoDecoderService::Construct(
if (decoder_)
return;
- // TODO(sandersd): Provide callback for requesting a stub.
+ // TODO(sandersd): Provide callback for requesting a GpuCommandBufferStub.
decoder_ = mojo_media_client_->CreateVideoDecoder(
base::ThreadTaskRunnerHandle::Get());
@@ -53,7 +53,7 @@ void MojoVideoDecoderService::Initialize(mojom::VideoDecoderConfigPtr config,
DVLOG(1) << __FUNCTION__;
if (!decoder_) {
- callback.Run(false);
+ callback.Run(false, false, 1);
return;
}
@@ -66,7 +66,7 @@ void MojoVideoDecoderService::Initialize(mojom::VideoDecoderConfigPtr config,
void MojoVideoDecoderService::Decode(mojom::DecoderBufferPtr buffer,
const DecodeCallback& callback) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(2) << __FUNCTION__;
if (!decoder_) {
callback.Run(DecodeStatus::DECODE_ERROR);
@@ -103,12 +103,16 @@ void MojoVideoDecoderService::OnDecoderInitialized(
const InitializeCallback& callback,
bool success) {
DVLOG(1) << __FUNCTION__;
- callback.Run(success);
+ DCHECK(decoder_);
+ callback.Run(success, decoder_->NeedsBitstreamConversion(),
+ decoder_->GetMaxDecodeRequests());
}
void MojoVideoDecoderService::OnDecoderDecoded(const DecodeCallback& callback,
DecodeStatus status) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(2) << __FUNCTION__;
+ DCHECK(decoder_);
+ DCHECK(decoder_->CanReadWithoutStalling());
callback.Run(status);
}
@@ -119,7 +123,7 @@ void MojoVideoDecoderService::OnDecoderReset(const ResetCallback& callback) {
void MojoVideoDecoderService::OnDecoderOutput(
const scoped_refptr<VideoFrame>& frame) {
- DVLOG(1) << __FUNCTION__;
+ DVLOG(2) << __FUNCTION__;
DCHECK(client_);
client_->OnVideoFrameDecoded(mojom::VideoFrame::From(frame));
}
« no previous file with comments | « media/mojo/interfaces/video_decoder.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698