| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 bool WriteUInt16(uint16_t val); | 102 bool WriteUInt16(uint16_t val); |
| 103 bool WriteUInt32(uint32_t val); | 103 bool WriteUInt32(uint32_t val); |
| 104 | 104 |
| 105 // Writes bit-sized values to the buffer. Returns false if there isn't enough | 105 // Writes bit-sized values to the buffer. Returns false if there isn't enough |
| 106 // room left for the specified number of bits. | 106 // room left for the specified number of bits. |
| 107 bool WriteBits(uint64_t val, size_t bit_count); | 107 bool WriteBits(uint64_t val, size_t bit_count); |
| 108 | 108 |
| 109 // Writes the exponential golomb encoded version of the supplied value. | 109 // Writes the exponential golomb encoded version of the supplied value. |
| 110 // Returns false if there isn't enough room left for the value. | 110 // Returns false if there isn't enough room left for the value. |
| 111 bool WriteExponentialGolomb(uint32_t val); | 111 bool WriteExponentialGolomb(uint32_t val); |
| 112 // Writes the signed exponential golomb version of the supplied value. |
| 113 // Signed exponential golomb values are just the unsigned values mapped to the |
| 114 // sequence 0, 1, -1, 2, -2, etc. in order. |
| 115 bool WriteSignedExponentialGolomb(int32_t val); |
| 112 | 116 |
| 113 private: | 117 private: |
| 114 // The buffer, as a writable array. | 118 // The buffer, as a writable array. |
| 115 uint8_t* const writable_bytes_; | 119 uint8_t* const writable_bytes_; |
| 116 | 120 |
| 117 RTC_DISALLOW_COPY_AND_ASSIGN(BitBufferWriter); | 121 RTC_DISALLOW_COPY_AND_ASSIGN(BitBufferWriter); |
| 118 }; | 122 }; |
| 119 | 123 |
| 120 } // namespace rtc | 124 } // namespace rtc |
| 121 | 125 |
| 122 #endif // WEBRTC_BASE_BITBUFFER_H_ | 126 #endif // WEBRTC_BASE_BITBUFFER_H_ |
| OLD | NEW |