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

Side by Side Diff: media/mojo/clients/mojo_video_decoder.cc

Issue 2698063002: Mojo C++ bindings: remove usage of AssociatedGroup from media/ (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « media/mojo/clients/mojo_renderer.cc ('k') | media/mojo/services/media_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/clients/mojo_video_decoder.h" 5 #include "media/mojo/clients/mojo_video_decoder.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/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 DCHECK(!remote_decoder_bound_); 168 DCHECK(!remote_decoder_bound_);
169 169
170 remote_decoder_.Bind(std::move(remote_decoder_info_)); 170 remote_decoder_.Bind(std::move(remote_decoder_info_));
171 remote_decoder_bound_ = true; 171 remote_decoder_bound_ = true;
172 172
173 remote_decoder_.set_connection_error_handler( 173 remote_decoder_.set_connection_error_handler(
174 base::Bind(&MojoVideoDecoder::Stop, base::Unretained(this))); 174 base::Bind(&MojoVideoDecoder::Stop, base::Unretained(this)));
175 175
176 // TODO(sandersd): Does this need its own error handler? 176 // TODO(sandersd): Does this need its own error handler?
177 mojom::VideoDecoderClientAssociatedPtrInfo client_ptr_info; 177 mojom::VideoDecoderClientAssociatedPtrInfo client_ptr_info;
178 client_binding_.Bind(&client_ptr_info, remote_decoder_.associated_group()); 178 client_binding_.Bind(&client_ptr_info);
179 179
180 // TODO(sandersd): Better buffer sizing. 180 // TODO(sandersd): Better buffer sizing.
181 mojo::ScopedDataPipeConsumerHandle remote_consumer_handle; 181 mojo::ScopedDataPipeConsumerHandle remote_consumer_handle;
182 mojo_decoder_buffer_writer_ = MojoDecoderBufferWriter::Create( 182 mojo_decoder_buffer_writer_ = MojoDecoderBufferWriter::Create(
183 DemuxerStream::VIDEO, &remote_consumer_handle); 183 DemuxerStream::VIDEO, &remote_consumer_handle);
184 184
185 media::mojom::CommandBufferIdPtr command_buffer_id; 185 media::mojom::CommandBufferIdPtr command_buffer_id;
186 if (gpu_factories_) { 186 if (gpu_factories_) {
187 base::UnguessableToken channel_token = gpu_factories_->GetChannelToken(); 187 base::UnguessableToken channel_token = gpu_factories_->GetChannelToken();
188 if (channel_token) { 188 if (channel_token) {
(...skipping 19 matching lines...) Expand all
208 208
209 for (const auto& pending_decode : pending_decodes_) 209 for (const auto& pending_decode : pending_decodes_)
210 pending_decode.second.Run(DecodeStatus::DECODE_ERROR); 210 pending_decode.second.Run(DecodeStatus::DECODE_ERROR);
211 pending_decodes_.clear(); 211 pending_decodes_.clear();
212 212
213 if (!reset_cb_.is_null()) 213 if (!reset_cb_.is_null())
214 base::ResetAndReturn(&reset_cb_).Run(); 214 base::ResetAndReturn(&reset_cb_).Run();
215 } 215 }
216 216
217 } // namespace media 217 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/clients/mojo_renderer.cc ('k') | media/mojo/services/media_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698