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

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

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 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 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/services/mojo_decryptor.h" 5 #include "media/mojo/services/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>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/numerics/safe_conversions.h" 13 #include "base/numerics/safe_conversions.h"
14 #include "media/base/audio_buffer.h" 14 #include "media/base/audio_buffer.h"
15 #include "media/base/decoder_buffer.h" 15 #include "media/base/decoder_buffer.h"
16 #include "media/base/video_frame.h" 16 #include "media/base/video_frame.h"
17 #include "media/mojo/common/media_type_converters.h" 17 #include "media/mojo/common/media_type_converters.h"
18 #include "media/mojo/common/mojo_shared_buffer_video_frame.h" 18 #include "media/mojo/common/mojo_shared_buffer_video_frame.h"
19 #include "media/mojo/interfaces/decryptor.mojom.h" 19 #include "media/mojo/interfaces/decryptor.mojom.h"
20 #include "mojo/shell/public/cpp/connect.h" 20 #include "services/shell/public/cpp/connect.h"
21 21
22 namespace media { 22 namespace media {
23 23
24 MojoDecryptor::MojoDecryptor(interfaces::DecryptorPtr remote_decryptor) 24 MojoDecryptor::MojoDecryptor(interfaces::DecryptorPtr remote_decryptor)
25 : remote_decryptor_(std::move(remote_decryptor)), weak_factory_(this) { 25 : remote_decryptor_(std::move(remote_decryptor)), weak_factory_(this) {
26 DVLOG(1) << __FUNCTION__; 26 DVLOG(1) << __FUNCTION__;
27 CreateDataPipes(); 27 CreateDataPipes();
28 } 28 }
29 29
30 MojoDecryptor::~MojoDecryptor() { 30 MojoDecryptor::~MojoDecryptor() {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 uint32_t num_bytes = base::checked_cast<uint32_t>(media_buffer->data_size()); 263 uint32_t num_bytes = base::checked_cast<uint32_t>(media_buffer->data_size());
264 DCHECK_GT(num_bytes, 0u); 264 DCHECK_GT(num_bytes, 0u);
265 CHECK_EQ(ReadDataRaw(consumer_handle_.get(), media_buffer->writable_data(), 265 CHECK_EQ(ReadDataRaw(consumer_handle_.get(), media_buffer->writable_data(),
266 &num_bytes, MOJO_READ_DATA_FLAG_ALL_OR_NONE), 266 &num_bytes, MOJO_READ_DATA_FLAG_ALL_OR_NONE),
267 MOJO_RESULT_OK); 267 MOJO_RESULT_OK);
268 CHECK_EQ(num_bytes, static_cast<uint32_t>(media_buffer->data_size())); 268 CHECK_EQ(num_bytes, static_cast<uint32_t>(media_buffer->data_size()));
269 return media_buffer; 269 return media_buffer;
270 } 270 }
271 271
272 } // namespace media 272 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_decoder_factory.cc ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698