| OLD | NEW |
| 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> |
| 8 #include <stdint.h> |
| 9 |
| 7 #include <utility> | 10 #include <utility> |
| 8 | 11 |
| 9 #include "base/bind.h" | 12 #include "base/bind.h" |
| 10 #include "media/base/audio_buffer.h" | 13 #include "media/base/audio_buffer.h" |
| 11 #include "media/base/decoder_buffer.h" | 14 #include "media/base/decoder_buffer.h" |
| 12 #include "media/base/video_frame.h" | 15 #include "media/base/video_frame.h" |
| 13 #include "media/mojo/interfaces/decryptor.mojom.h" | 16 #include "media/mojo/interfaces/decryptor.mojom.h" |
| 14 #include "media/mojo/services/media_type_converters.h" | 17 #include "media/mojo/services/media_type_converters.h" |
| 15 #include "mojo/application/public/cpp/connect.h" | 18 #include "mojo/application/public/cpp/connect.h" |
| 16 | 19 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 uint32_t num_bytes = media_buffer->data_size(); | 204 uint32_t num_bytes = media_buffer->data_size(); |
| 202 DCHECK_GT(num_bytes, 0u); | 205 DCHECK_GT(num_bytes, 0u); |
| 203 CHECK_EQ(ReadDataRaw(consumer_handle_.get(), media_buffer->writable_data(), | 206 CHECK_EQ(ReadDataRaw(consumer_handle_.get(), media_buffer->writable_data(), |
| 204 &num_bytes, MOJO_READ_DATA_FLAG_ALL_OR_NONE), | 207 &num_bytes, MOJO_READ_DATA_FLAG_ALL_OR_NONE), |
| 205 MOJO_RESULT_OK); | 208 MOJO_RESULT_OK); |
| 206 CHECK_EQ(num_bytes, static_cast<uint32_t>(media_buffer->data_size())); | 209 CHECK_EQ(num_bytes, static_cast<uint32_t>(media_buffer->data_size())); |
| 207 return media_buffer; | 210 return media_buffer; |
| 208 } | 211 } |
| 209 | 212 |
| 210 } // namespace media | 213 } // namespace media |
| OLD | NEW |