Chromium Code Reviews| 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/base/common.h" | 17 #include "webrtc/base/common.h" |
| 18 #include "webrtc/base/buffer.h" | 18 #include "webrtc/base/buffer.h" |
| 19 #include "webrtc/base/optional.h" | |
| 20 #include "webrtc/common_video/h264/pps_parser.h" | |
|
magjed_webrtc
2016/09/27 14:39:19
I don't think these includes are needed?
| |
| 21 #include "webrtc/common_video/h264/sps_parser.h" | |
| 19 | 22 |
| 20 namespace webrtc { | 23 namespace webrtc { |
| 21 | 24 |
| 22 namespace H264 { | 25 namespace H264 { |
| 23 // The size of a full NALU start sequence {0 0 0 1}, used for the first NALU | 26 // The size of a full NALU start sequence {0 0 0 1}, used for the first NALU |
| 24 // of an access unit, and for SPS and PPS blocks. | 27 // of an access unit, and for SPS and PPS blocks. |
| 25 const size_t kNaluLongStartSequenceSize = 4; | 28 const size_t kNaluLongStartSequenceSize = 4; |
| 26 | 29 |
| 27 // The size of a shortened NALU start sequence {0 0 1}, that may be used if | 30 // The size of a shortened NALU start sequence {0 0 1}, that may be used if |
| 28 // not the first NALU of an access unit or an SPS or PPS block. | 31 // 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... | |
| 80 std::unique_ptr<rtc::Buffer> ParseRbsp(const uint8_t* data, size_t length); | 83 std::unique_ptr<rtc::Buffer> ParseRbsp(const uint8_t* data, size_t length); |
| 81 | 84 |
| 82 // Write the given data to the destination buffer, inserting and emulation | 85 // Write the given data to the destination buffer, inserting and emulation |
| 83 // bytes in order to escape any data the could be interpreted as a start | 86 // bytes in order to escape any data the could be interpreted as a start |
| 84 // sequence. | 87 // sequence. |
| 85 void WriteRbsp(const uint8_t* bytes, size_t length, rtc::Buffer* destination); | 88 void WriteRbsp(const uint8_t* bytes, size_t length, rtc::Buffer* destination); |
| 86 } // namespace H264 | 89 } // namespace H264 |
| 87 } // namespace webrtc | 90 } // namespace webrtc |
| 88 | 91 |
| 89 #endif // WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ | 92 #endif // WEBRTC_COMMON_VIDEO_H264_H264_COMMON_H_ |
| OLD | NEW |