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

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

Issue 2411573002: media: Use new wrapper types for media mojo interfaces (Closed)
Patch Set: comments addressed 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 unified diff | Download patch
« no previous file with comments | « media/mojo/clients/mojo_decryptor.h ('k') | media/mojo/common/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_decryptor.h" 5 #include "media/mojo/clients/mojo_decryptor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 decrypt_cb.Run(kError, nullptr); 191 decrypt_cb.Run(kError, nullptr);
192 return; 192 return;
193 } 193 }
194 194
195 decrypt_cb.Run(static_cast<Decryptor::Status>(status), media_buffer); 195 decrypt_cb.Run(static_cast<Decryptor::Status>(status), media_buffer);
196 } 196 }
197 197
198 void MojoDecryptor::OnAudioDecoded( 198 void MojoDecryptor::OnAudioDecoded(
199 const AudioDecodeCB& audio_decode_cb, 199 const AudioDecodeCB& audio_decode_cb,
200 mojom::Decryptor::Status status, 200 mojom::Decryptor::Status status,
201 mojo::Array<mojom::AudioBufferPtr> audio_buffers) { 201 std::vector<mojom::AudioBufferPtr> audio_buffers) {
202 DVLOG_IF(1, status != mojom::Decryptor::Status::SUCCESS) 202 DVLOG_IF(1, status != mojom::Decryptor::Status::SUCCESS)
203 << __FUNCTION__ << "(" << status << ")"; 203 << __FUNCTION__ << "(" << status << ")";
204 DVLOG_IF(3, status == mojom::Decryptor::Status::SUCCESS) << __FUNCTION__; 204 DVLOG_IF(3, status == mojom::Decryptor::Status::SUCCESS) << __FUNCTION__;
205 DCHECK(thread_checker_.CalledOnValidThread()); 205 DCHECK(thread_checker_.CalledOnValidThread());
206 206
207 Decryptor::AudioFrames audio_frames; 207 Decryptor::AudioFrames audio_frames;
208 for (size_t i = 0; i < audio_buffers.size(); ++i) 208 for (size_t i = 0; i < audio_buffers.size(); ++i)
209 audio_frames.push_back(audio_buffers[i].To<scoped_refptr<AudioBuffer>>()); 209 audio_frames.push_back(audio_buffers[i].To<scoped_refptr<AudioBuffer>>());
210 210
211 audio_decode_cb.Run(static_cast<Decryptor::Status>(status), audio_frames); 211 audio_decode_cb.Run(static_cast<Decryptor::Status>(status), audio_frames);
(...skipping 28 matching lines...) Expand all
240 240
241 void MojoDecryptor::ReleaseSharedBuffer(mojo::ScopedSharedBufferHandle buffer, 241 void MojoDecryptor::ReleaseSharedBuffer(mojo::ScopedSharedBufferHandle buffer,
242 size_t buffer_size) { 242 size_t buffer_size) {
243 DVLOG(1) << __FUNCTION__; 243 DVLOG(1) << __FUNCTION__;
244 DCHECK(thread_checker_.CalledOnValidThread()); 244 DCHECK(thread_checker_.CalledOnValidThread());
245 245
246 remote_decryptor_->ReleaseSharedBuffer(std::move(buffer), buffer_size); 246 remote_decryptor_->ReleaseSharedBuffer(std::move(buffer), buffer_size);
247 } 247 }
248 248
249 } // namespace media 249 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/clients/mojo_decryptor.h ('k') | media/mojo/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698