| 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 #include "webrtc/common_video/h264/pps_parser.h" | 11 #include "webrtc/common_video/h264/pps_parser.h" |
| 12 | 12 |
| 13 #include <limits> | 13 #include <limits> |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/base/bitbuffer.h" | |
| 17 #include "webrtc/base/buffer.h" | |
| 18 #include "webrtc/common_video/h264/h264_common.h" | 16 #include "webrtc/common_video/h264/h264_common.h" |
| 17 #include "webrtc/rtc_base/bitbuffer.h" |
| 18 #include "webrtc/rtc_base/buffer.h" |
| 19 #include "webrtc/test/gtest.h" | 19 #include "webrtc/test/gtest.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 // Contains enough of the image slice to contain slice QP. | 24 // Contains enough of the image slice to contain slice QP. |
| 25 const uint8_t kH264BitstreamChunk[] = { | 25 const uint8_t kH264BitstreamChunk[] = { |
| 26 0x00, 0x00, 0x00, 0x01, 0x67, 0x42, 0x80, 0x20, 0xda, 0x01, 0x40, 0x16, | 26 0x00, 0x00, 0x00, 0x01, 0x67, 0x42, 0x80, 0x20, 0xda, 0x01, 0x40, 0x16, |
| 27 0xe8, 0x06, 0xd0, 0xa1, 0x35, 0x00, 0x00, 0x00, 0x01, 0x68, 0xce, 0x06, | 27 0xe8, 0x06, 0xd0, 0xa1, 0x35, 0x00, 0x00, 0x00, 0x01, 0x68, 0xce, 0x06, |
| 28 0xe2, 0x00, 0x00, 0x00, 0x01, 0x65, 0xb8, 0x40, 0xf0, 0x8c, 0x03, 0xf2, | 28 0xe2, 0x00, 0x00, 0x00, 0x01, 0x65, 0xb8, 0x40, 0xf0, 0x8c, 0x03, 0xf2, |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } | 215 } |
| 216 | 216 |
| 217 TEST_F(PpsParserTest, PpsIdFromSlice) { | 217 TEST_F(PpsParserTest, PpsIdFromSlice) { |
| 218 rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice( | 218 rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice( |
| 219 kH264BitstreamChunk, sizeof(kH264BitstreamChunk)); | 219 kH264BitstreamChunk, sizeof(kH264BitstreamChunk)); |
| 220 ASSERT_TRUE(pps_id); | 220 ASSERT_TRUE(pps_id); |
| 221 EXPECT_EQ(2u, *pps_id); | 221 EXPECT_EQ(2u, *pps_id); |
| 222 } | 222 } |
| 223 | 223 |
| 224 } // namespace webrtc | 224 } // namespace webrtc |
| OLD | NEW |