Chromium Code Reviews| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 const uint8* side_data() const { | 98 const uint8* side_data() const { |
| 99 DCHECK(!end_of_stream()); | 99 DCHECK(!end_of_stream()); |
| 100 return side_data_.get(); | 100 return side_data_.get(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 int side_data_size() const { | 103 int side_data_size() const { |
| 104 DCHECK(!end_of_stream()); | 104 DCHECK(!end_of_stream()); |
| 105 return side_data_size_; | 105 return side_data_size_; |
| 106 } | 106 } |
| 107 | 107 |
| 108 const int64 discard_padding() const { | |
|
fgalligan1
2013/08/26 21:10:06
First const is not necessary.
vignesh
2013/08/26 21:44:23
Done.
| |
| 109 DCHECK(!end_of_stream()); | |
| 110 return discard_padding_; | |
| 111 } | |
| 112 | |
| 113 void set_discard_padding(const int64 discard_padding) { | |
| 114 DCHECK(!end_of_stream()); | |
| 115 discard_padding_ = discard_padding; | |
| 116 } | |
| 117 | |
| 108 const DecryptConfig* decrypt_config() const { | 118 const DecryptConfig* decrypt_config() const { |
| 109 DCHECK(!end_of_stream()); | 119 DCHECK(!end_of_stream()); |
| 110 return decrypt_config_.get(); | 120 return decrypt_config_.get(); |
| 111 } | 121 } |
| 112 | 122 |
| 113 void set_decrypt_config(scoped_ptr<DecryptConfig> decrypt_config) { | 123 void set_decrypt_config(scoped_ptr<DecryptConfig> decrypt_config) { |
| 114 DCHECK(!end_of_stream()); | 124 DCHECK(!end_of_stream()); |
| 115 decrypt_config_ = decrypt_config.Pass(); | 125 decrypt_config_ = decrypt_config.Pass(); |
| 116 } | 126 } |
| 117 | 127 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 135 | 145 |
| 136 private: | 146 private: |
| 137 base::TimeDelta timestamp_; | 147 base::TimeDelta timestamp_; |
| 138 base::TimeDelta duration_; | 148 base::TimeDelta duration_; |
| 139 | 149 |
| 140 int size_; | 150 int size_; |
| 141 scoped_ptr<uint8, base::ScopedPtrAlignedFree> data_; | 151 scoped_ptr<uint8, base::ScopedPtrAlignedFree> data_; |
| 142 int side_data_size_; | 152 int side_data_size_; |
| 143 scoped_ptr<uint8, base::ScopedPtrAlignedFree> side_data_; | 153 scoped_ptr<uint8, base::ScopedPtrAlignedFree> side_data_; |
| 144 scoped_ptr<DecryptConfig> decrypt_config_; | 154 scoped_ptr<DecryptConfig> decrypt_config_; |
| 155 int64 discard_padding_; | |
| 145 | 156 |
| 146 // Constructor helper method for memory allocations. | 157 // Constructor helper method for memory allocations. |
| 147 void Initialize(); | 158 void Initialize(); |
| 148 | 159 |
| 149 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); | 160 DISALLOW_COPY_AND_ASSIGN(DecoderBuffer); |
| 150 }; | 161 }; |
| 151 | 162 |
| 152 } // namespace media | 163 } // namespace media |
| 153 | 164 |
| 154 #endif // MEDIA_BASE_DECODER_BUFFER_H_ | 165 #endif // MEDIA_BASE_DECODER_BUFFER_H_ |
| OLD | NEW |