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_sps_parser.h" | 11 #include "webrtc/modules/rtp_rtcp/source/h264_sps_parser.h" |
12 | 12 |
| 13 #include "webrtc/base/bitbuffer.h" |
13 #include "webrtc/base/bytebuffer.h" | 14 #include "webrtc/base/bytebuffer.h" |
14 #include "webrtc/base/bitbuffer.h" | 15 #include "webrtc/base/logging.h" |
15 #include "webrtc/system_wrappers/interface/logging.h" | |
16 | 16 |
17 #define RETURN_FALSE_ON_FAIL(x) \ | 17 #define RETURN_FALSE_ON_FAIL(x) \ |
18 if (!(x)) { \ | 18 if (!(x)) { \ |
19 return false; \ | 19 return false; \ |
20 } | 20 } |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 | 23 |
24 H264SpsParser::H264SpsParser(const uint8_t* sps, size_t byte_length) | 24 H264SpsParser::H264SpsParser(const uint8_t* sps, size_t byte_length) |
25 : sps_(sps), byte_length_(byte_length), width_(), height_() { | 25 : sps_(sps), byte_length_(byte_length), width_(), height_() { |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // Subtract the crop for each dimension. | 223 // Subtract the crop for each dimension. |
224 width -= (frame_crop_left_offset + frame_crop_right_offset); | 224 width -= (frame_crop_left_offset + frame_crop_right_offset); |
225 height -= (frame_crop_top_offset + frame_crop_bottom_offset); | 225 height -= (frame_crop_top_offset + frame_crop_bottom_offset); |
226 | 226 |
227 width_ = width; | 227 width_ = width; |
228 height_ = height; | 228 height_ = height; |
229 return true; | 229 return true; |
230 } | 230 } |
231 | 231 |
232 } // namespace webrtc | 232 } // namespace webrtc |
OLD | NEW |