| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/media/base/decrypt_context_impl.h" | 5 #include "chromecast/media/base/decrypt_context_impl.h" |
| 6 | 6 |
| 7 #include <vector> |
| 8 |
| 9 #include "chromecast/public/media/cast_decoder_buffer.h" |
| 10 |
| 7 namespace chromecast { | 11 namespace chromecast { |
| 8 namespace media { | 12 namespace media { |
| 9 | 13 |
| 10 DecryptContextImpl::DecryptContextImpl(CastKeySystem key_system) | 14 DecryptContextImpl::DecryptContextImpl(CastKeySystem key_system) |
| 11 : key_system_(key_system) {} | 15 : key_system_(key_system) {} |
| 12 | 16 |
| 13 DecryptContextImpl::~DecryptContextImpl() {} | 17 DecryptContextImpl::~DecryptContextImpl() {} |
| 14 | 18 |
| 15 CastKeySystem DecryptContextImpl::GetKeySystem() { | 19 CastKeySystem DecryptContextImpl::GetKeySystem() { |
| 16 return key_system_; | 20 return key_system_; |
| 17 } | 21 } |
| 18 | 22 |
| 23 bool DecryptContextImpl::Decrypt(CastDecoderBuffer* buffer, |
| 24 std::vector<uint8_t>* output) { |
| 25 output->resize(buffer->data_size()); |
| 26 return Decrypt(buffer, output->data()); |
| 27 } |
| 28 |
| 19 bool DecryptContextImpl::Decrypt(CastDecoderBuffer* buffer, uint8_t* output) { | 29 bool DecryptContextImpl::Decrypt(CastDecoderBuffer* buffer, uint8_t* output) { |
| 20 return false; | 30 return false; |
| 21 } | 31 } |
| 22 | 32 |
| 23 bool DecryptContextImpl::CanDecryptToBuffer() const { | 33 bool DecryptContextImpl::CanDecryptToBuffer() const { |
| 24 return false; | 34 return false; |
| 25 } | 35 } |
| 26 | 36 |
| 27 } // namespace media | 37 } // namespace media |
| 28 } // namespace chromecast | 38 } // namespace chromecast |
| OLD | NEW |