OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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/rtp_format_h264.h" | 11 #include "webrtc/modules/rtp_rtcp/source/rtp_format_h264.h" |
12 | 12 |
13 #include <string.h> | 13 #include <string.h> |
14 #include <memory> | 14 #include <memory> |
15 #include <utility> | 15 #include <utility> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/base/checks.h" | 18 #include "webrtc/common_video/h264/h264_common.h" |
19 #include "webrtc/base/logging.h" | 19 #include "webrtc/common_video/h264/pps_parser.h" |
| 20 #include "webrtc/common_video/h264/sps_parser.h" |
| 21 #include "webrtc/common_video/h264/sps_vui_rewriter.h" |
20 #include "webrtc/modules/include/module_common_types.h" | 22 #include "webrtc/modules/include/module_common_types.h" |
21 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 23 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
22 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | 24 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
23 #include "webrtc/common_video/h264/sps_vui_rewriter.h" | 25 #include "webrtc/rtc_base/checks.h" |
24 #include "webrtc/common_video/h264/h264_common.h" | 26 #include "webrtc/rtc_base/logging.h" |
25 #include "webrtc/common_video/h264/pps_parser.h" | |
26 #include "webrtc/common_video/h264/sps_parser.h" | |
27 #include "webrtc/system_wrappers/include/metrics.h" | 27 #include "webrtc/system_wrappers/include/metrics.h" |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 namespace { | 30 namespace { |
31 | 31 |
32 static const size_t kNalHeaderSize = 1; | 32 static const size_t kNalHeaderSize = 1; |
33 static const size_t kFuAHeaderSize = 2; | 33 static const size_t kFuAHeaderSize = 2; |
34 static const size_t kLengthFieldSize = 2; | 34 static const size_t kLengthFieldSize = 2; |
35 static const size_t kStapAHeaderSize = kNalHeaderSize + kLengthFieldSize; | 35 static const size_t kStapAHeaderSize = kNalHeaderSize + kLengthFieldSize; |
36 | 36 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 h264->packetization_type = kH264FuA; | 668 h264->packetization_type = kH264FuA; |
669 h264->nalu_type = original_nal_type; | 669 h264->nalu_type = original_nal_type; |
670 if (first_fragment) { | 670 if (first_fragment) { |
671 h264->nalus[h264->nalus_length] = nalu; | 671 h264->nalus[h264->nalus_length] = nalu; |
672 h264->nalus_length = 1; | 672 h264->nalus_length = 1; |
673 } | 673 } |
674 return true; | 674 return true; |
675 } | 675 } |
676 | 676 |
677 } // namespace webrtc | 677 } // namespace webrtc |
OLD | NEW |