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

Side by Side Diff: media/mojo/services/mojo_video_decoder_service.cc

Issue 2640153004: Add mailbox-based Mojo VideoFrame variant. (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/mojo/services/mojo_video_decoder_service.h" 5 #include "media/mojo/services/mojo_video_decoder_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 void MojoVideoDecoderService::OnDecoderReset(const ResetCallback& callback) { 127 void MojoVideoDecoderService::OnDecoderReset(const ResetCallback& callback) {
128 DVLOG(1) << __func__; 128 DVLOG(1) << __func__;
129 callback.Run(); 129 callback.Run();
130 } 130 }
131 131
132 void MojoVideoDecoderService::OnDecoderOutput( 132 void MojoVideoDecoderService::OnDecoderOutput(
133 const scoped_refptr<VideoFrame>& frame) { 133 const scoped_refptr<VideoFrame>& frame) {
134 DVLOG(2) << __func__; 134 DVLOG(2) << __func__;
135 DCHECK(client_); 135 DCHECK(client_);
136 client_->OnVideoFrameDecoded(mojom::VideoFrame::From(frame)); 136 client_->OnVideoFrameDecoded(
137 mojom::VideoFrame::From(frame),
138 base::Bind(&MojoVideoDecoderService::OnVideoFrameDestroyed,
139 base::Unretained(this)));
140 }
141
142 void MojoVideoDecoderService::OnVideoFrameDestroyed(
143 const base::Optional<gpu::SyncToken>& release_sync_token) {
144 DVLOG(2) << __func__;
137 } 145 }
138 146
139 } // namespace media 147 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698