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

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

Issue 2908303003: media: Create Mojo StructTraits for VideoFrame (Closed)
Patch Set: Remove death test. 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
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 e462dcc60a6017433a74ac14c5aa0034ad7f8245..ff2279737425bf04b58df68237e51c37d51180d6 100644
--- a/media/mojo/clients/mojo_video_decoder.cc
+++ b/media/mojo/clients/mojo_video_decoder.cc
@@ -9,6 +9,7 @@
#include "base/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ref_counted.h"
#include "base/single_thread_task_runner.h"
#include "base/unguessable_token.h"
#include "media/base/bind_to_current_loop.h"
@@ -108,18 +109,17 @@ void MojoVideoDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
}
void MojoVideoDecoder::OnVideoFrameDecoded(
- mojom::VideoFramePtr frame,
+ const scoped_refptr<VideoFrame>& frame,
const base::Optional<base::UnguessableToken>& release_token) {
DVLOG(2) << __func__;
DCHECK(task_runner_->BelongsToCurrentThread());
- scoped_refptr<VideoFrame> video_frame = frame.To<scoped_refptr<VideoFrame>>();
if (release_token) {
- video_frame->SetReleaseMailboxCB(
+ frame->SetReleaseMailboxCB(
BindToCurrentLoop(base::Bind(&MojoVideoDecoder::OnReleaseMailbox,
weak_this_, release_token.value())));
}
- output_cb_.Run(std::move(video_frame));
+ output_cb_.Run(frame);
}
void MojoVideoDecoder::OnReleaseMailbox(

Powered by Google App Engine
This is Rietveld 408576698