OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 |
11 #include "webrtc/modules/rtp_rtcp/source/h264_bitstream_parser.h" | 11 #include "webrtc/modules/video_coding/utility/h264_bitstream_parser.h" |
12 | 12 |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 | 16 |
17 // SPS/PPS part of below chunk. | 17 // SPS/PPS part of below chunk. |
18 uint8_t kH264SpsPps[] = {0x00, 0x00, 0x00, 0x01, 0x67, 0x42, 0x80, 0x20, 0xda, | 18 uint8_t kH264SpsPps[] = {0x00, 0x00, 0x00, 0x01, 0x67, 0x42, 0x80, 0x20, 0xda, |
19 0x01, 0x40, 0x16, 0xe8, 0x06, 0xd0, 0xa1, 0x35, 0x00, | 19 0x01, 0x40, 0x16, 0xe8, 0x06, 0xd0, 0xa1, 0x35, 0x00, |
20 0x00, 0x00, 0x01, 0x68, 0xce, 0x06, 0xe2}; | 20 0x00, 0x00, 0x01, 0x68, 0xce, 0x06, 0xe2}; |
21 | 21 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 EXPECT_EQ(35, qp); | 53 EXPECT_EQ(35, qp); |
54 | 54 |
55 // Parse an additional image slice. | 55 // Parse an additional image slice. |
56 h264_parser.ParseBitstream(kH264BitstreamNextImageSliceChunk, | 56 h264_parser.ParseBitstream(kH264BitstreamNextImageSliceChunk, |
57 sizeof(kH264BitstreamNextImageSliceChunk)); | 57 sizeof(kH264BitstreamNextImageSliceChunk)); |
58 ASSERT_TRUE(h264_parser.GetLastSliceQp(&qp)); | 58 ASSERT_TRUE(h264_parser.GetLastSliceQp(&qp)); |
59 EXPECT_EQ(37, qp); | 59 EXPECT_EQ(37, qp); |
60 } | 60 } |
61 | 61 |
62 } // namespace webrtc | 62 } // namespace webrtc |
OLD | NEW |