OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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/video_coding/packet.h" | 11 #include "webrtc/modules/video_coding/packet.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 | 14 |
15 #include "webrtc/base/checks.h" | |
15 #include "webrtc/modules/include/module_common_types.h" | 16 #include "webrtc/modules/include/module_common_types.h" |
16 | 17 |
17 namespace webrtc { | 18 namespace webrtc { |
18 | 19 |
19 VCMPacket::VCMPacket() | 20 VCMPacket::VCMPacket() |
20 : payloadType(0), | 21 : payloadType(0), |
21 timestamp(0), | 22 timestamp(0), |
22 ntp_time_ms_(0), | 23 ntp_time_ms_(0), |
23 seqNum(0), | 24 seqNum(0), |
24 dataPtr(NULL), | 25 dataPtr(NULL), |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 | 117 |
117 codec = kVideoCodecVP9; | 118 codec = kVideoCodecVP9; |
118 return; | 119 return; |
119 case kRtpVideoH264: | 120 case kRtpVideoH264: |
120 isFirstPacket = videoHeader.isFirstPacket; | 121 isFirstPacket = videoHeader.isFirstPacket; |
121 if (isFirstPacket) | 122 if (isFirstPacket) |
122 insertStartCode = true; | 123 insertStartCode = true; |
123 | 124 |
124 if (isFirstPacket && markerBit) { | 125 if (isFirstPacket && markerBit) { |
125 completeNALU = kNaluComplete; | 126 completeNALU = kNaluComplete; |
126 } else if (isFirstPacket) { | |
127 completeNALU = kNaluStart; | |
128 } else if (markerBit) { | |
129 completeNALU = kNaluEnd; | |
130 } else { | 127 } else { |
131 completeNALU = kNaluIncomplete; | 128 if (isFirstPacket) { |
129 completeNALU = kNaluStart; | |
130 } else if (markerBit) { | |
131 completeNALU = kNaluEnd; | |
132 } else { | |
133 completeNALU = kNaluIncomplete; | |
134 } | |
hta-webrtc
2016/10/31 20:54:52
Note to self: This looks like it should be reverte
| |
132 } | 135 } |
133 codec = kVideoCodecH264; | 136 codec = kVideoCodecH264; |
134 return; | 137 return; |
135 case kRtpVideoGeneric: | 138 case kRtpVideoGeneric: |
136 case kRtpVideoNone: | 139 case kRtpVideoNone: |
137 codec = kVideoCodecUnknown; | 140 codec = kVideoCodecUnknown; |
138 return; | 141 return; |
139 } | 142 } |
140 } | 143 } |
141 | 144 |
142 } // namespace webrtc | 145 } // namespace webrtc |
OLD | NEW |