| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 |
| 11 #ifndef WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ | 11 #ifndef WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ |
| 12 #define WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ | 12 #define WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/rtc_base/buffer.h" | 17 #include "webrtc/base/buffer.h" |
| 18 | 18 |
| 19 namespace webrtc { | 19 namespace webrtc { |
| 20 | 20 |
| 21 namespace H264 { | 21 namespace H264 { |
| 22 // The size of a full NALU start sequence {0 0 0 1}, used for the first NALU | 22 // The size of a full NALU start sequence {0 0 0 1}, used for the first NALU |
| 23 // of an access unit, and for SPS and PPS blocks. | 23 // of an access unit, and for SPS and PPS blocks. |
| 24 const size_t kNaluLongStartSequenceSize = 4; | 24 const size_t kNaluLongStartSequenceSize = 4; |
| 25 | 25 |
| 26 // The size of a shortened NALU start sequence {0 0 1}, that may be used if | 26 // The size of a shortened NALU start sequence {0 0 1}, that may be used if |
| 27 // not the first NALU of an access unit or an SPS or PPS block. | 27 // not the first NALU of an access unit or an SPS or PPS block. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 std::vector<uint8_t> ParseRbsp(const uint8_t* data, size_t length); | 79 std::vector<uint8_t> ParseRbsp(const uint8_t* data, size_t length); |
| 80 | 80 |
| 81 // Write the given data to the destination buffer, inserting and emulation | 81 // Write the given data to the destination buffer, inserting and emulation |
| 82 // bytes in order to escape any data the could be interpreted as a start | 82 // bytes in order to escape any data the could be interpreted as a start |
| 83 // sequence. | 83 // sequence. |
| 84 void WriteRbsp(const uint8_t* bytes, size_t length, rtc::Buffer* destination); | 84 void WriteRbsp(const uint8_t* bytes, size_t length, rtc::Buffer* destination); |
| 85 } // namespace H264 | 85 } // namespace H264 |
| 86 } // namespace webrtc | 86 } // namespace webrtc |
| 87 | 87 |
| 88 #endif // WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ | 88 #endif // WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ |
| OLD | NEW |