| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef MEDIA_BASE_DECODER_BUFFER_H_ | 5 #ifndef MEDIA_BASE_DECODER_BUFFER_H_ |
| 6 #define MEDIA_BASE_DECODER_BUFFER_H_ | 6 #define MEDIA_BASE_DECODER_BUFFER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 discard_padding_ = discard_padding; | 134 discard_padding_ = discard_padding; |
| 135 } | 135 } |
| 136 | 136 |
| 137 const DecryptConfig* decrypt_config() const { | 137 const DecryptConfig* decrypt_config() const { |
| 138 DCHECK(!end_of_stream()); | 138 DCHECK(!end_of_stream()); |
| 139 return decrypt_config_.get(); | 139 return decrypt_config_.get(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void set_decrypt_config(scoped_ptr<DecryptConfig> decrypt_config) { | 142 void set_decrypt_config(scoped_ptr<DecryptConfig> decrypt_config) { |
| 143 DCHECK(!end_of_stream()); | 143 DCHECK(!end_of_stream()); |
| 144 decrypt_config_ = decrypt_config.Pass(); | 144 decrypt_config_ = std::move(decrypt_config); |
| 145 } | 145 } |
| 146 | 146 |
| 147 // If there's no data in this buffer, it represents end of stream. | 147 // If there's no data in this buffer, it represents end of stream. |
| 148 bool end_of_stream() const { | 148 bool end_of_stream() const { |
| 149 return data_ == NULL; | 149 return data_ == NULL; |
| 150 } | 150 } |
| 151 | 151 |
| 152 // Indicates this buffer is part of a splice around |splice_timestamp_|. | 152 // Indicates this buffer is part of a splice around |splice_timestamp_|. |
| 153 // Returns kNoTimestamp() if the buffer is not part of a splice. | 153 // Returns kNoTimestamp() if the buffer is not part of a splice. |
| 154 base::TimeDelta splice_timestamp() const { | 154 base::TimeDelta splice_timestamp() const { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 // Constructor helper method for memory allocations. | 209 // Constructor helper method for memory allocations. |
| 210 void Initialize(); | 210 void Initialize(); |
| 211 | 211 |
| 212 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); | 212 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 } // namespace media | 215 } // namespace media |
| 216 | 216 |
| 217 #endif // MEDIA_BASE_DECODER_BUFFER_H_ | 217 #endif // MEDIA_BASE_DECODER_BUFFER_H_ |
| OLD | NEW |