| 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/cma/pipeline/decrypt_util.h" | 5 #include "chromecast/media/cma/pipeline/decrypt_util.h" |
| 6 | 6 |
| 7 #include <openssl/aes.h> | 7 #include <openssl/aes.h> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // DecoderBufferBase implementation. | 24 // DecoderBufferBase implementation. |
| 25 base::TimeDelta timestamp() const override; | 25 base::TimeDelta timestamp() const override; |
| 26 const uint8* data() const override; | 26 const uint8* data() const override; |
| 27 uint8* writable_data() const override; | 27 uint8* writable_data() const override; |
| 28 int data_size() const override; | 28 int data_size() const override; |
| 29 const ::media::DecryptConfig* decrypt_config() const override; | 29 const ::media::DecryptConfig* decrypt_config() const override; |
| 30 bool end_of_stream() const override; | 30 bool end_of_stream() const override; |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 virtual ~DecoderBufferClear(); | 33 ~DecoderBufferClear() override; |
| 34 | 34 |
| 35 scoped_refptr<DecoderBufferBase> const buffer_; | 35 scoped_refptr<DecoderBufferBase> const buffer_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(DecoderBufferClear); | 37 DISALLOW_COPY_AND_ASSIGN(DecoderBufferClear); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 DecoderBufferClear::DecoderBufferClear( | 40 DecoderBufferClear::DecoderBufferClear( |
| 41 const scoped_refptr<DecoderBufferBase>& buffer) | 41 const scoped_refptr<DecoderBufferBase>& buffer) |
| 42 : buffer_(buffer) { | 42 : buffer_(buffer) { |
| 43 } | 43 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 data + offset, data + offset, cypher_bytes, &aes_key, | 119 data + offset, data + offset, cypher_bytes, &aes_key, |
| 120 aes_iv, ecount_buf, &encrypted_byte_offset); | 120 aes_iv, ecount_buf, &encrypted_byte_offset); |
| 121 offset += cypher_bytes; | 121 offset += cypher_bytes; |
| 122 } | 122 } |
| 123 | 123 |
| 124 return scoped_refptr<DecoderBufferBase>(new DecoderBufferClear(buffer)); | 124 return scoped_refptr<DecoderBufferBase>(new DecoderBufferClear(buffer)); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace media | 127 } // namespace media |
| 128 } // namespace chromecast | 128 } // namespace chromecast |
| OLD | NEW |