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

Unified Diff: media/mojo/clients/mojo_video_decoder.cc

Issue 2951233002: media: Implement MojoVideoDecoder::CanReadWithoutStalling(). (Closed)
Patch Set: Created 3 years, 6 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/clients/mojo_video_decoder.h ('k') | media/mojo/interfaces/video_decoder.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_video_decoder.cc
diff --git a/media/mojo/clients/mojo_video_decoder.cc b/media/mojo/clients/mojo_video_decoder.cc
index ff2279737425bf04b58df68237e51c37d51180d6..37135b8ad135da4a01b20674e5103e94de40d24d 100644
--- a/media/mojo/clients/mojo_video_decoder.cc
+++ b/media/mojo/clients/mojo_video_decoder.cc
@@ -110,10 +110,16 @@ void MojoVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
void MojoVideoDecoder::OnVideoFrameDecoded(
const scoped_refptr<VideoFrame>& frame,
+ bool can_read_without_stalling,
const base::Optional<base::UnguessableToken>& release_token) {
DVLOG(2) << __func__;
DCHECK(task_runner_->BelongsToCurrentThread());
+ // TODO(sandersd): Prove that all paths read this value again after running
+ // |output_cb_|. In practice this isn't very important, since all decoders
+ // running via MojoVideoDecoder currently use a static value.
+ can_read_without_stalling_ = can_read_without_stalling;
+
if (release_token) {
frame->SetReleaseMailboxCB(
BindToCurrentLoop(base::Bind(&MojoVideoDecoder::OnReleaseMailbox,
@@ -172,7 +178,7 @@ bool MojoVideoDecoder::NeedsBitstreamConversion() const {
bool MojoVideoDecoder::CanReadWithoutStalling() const {
DVLOG(3) << __func__;
- return true;
+ return can_read_without_stalling_;
}
int MojoVideoDecoder::GetMaxDecodeRequests() const {
« no previous file with comments | « media/mojo/clients/mojo_video_decoder.h ('k') | media/mojo/interfaces/video_decoder.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698