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 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 completeNALU = kNaluComplete; | 111 completeNALU = kNaluComplete; |
112 else if (isFirstPacket) | 112 else if (isFirstPacket) |
113 completeNALU = kNaluStart; | 113 completeNALU = kNaluStart; |
114 else if (markerBit) | 114 else if (markerBit) |
115 completeNALU = kNaluEnd; | 115 completeNALU = kNaluEnd; |
116 else | 116 else |
117 completeNALU = kNaluIncomplete; | 117 completeNALU = kNaluIncomplete; |
118 | 118 |
119 codec = kVideoCodecVP8; | 119 codec = kVideoCodecVP8; |
120 return; | 120 return; |
| 121 case kRtpVideoVp9: |
| 122 if (isFirstPacket && markerBit) |
| 123 completeNALU = kNaluComplete; |
| 124 else if (isFirstPacket) |
| 125 completeNALU = kNaluStart; |
| 126 else if (markerBit) |
| 127 completeNALU = kNaluEnd; |
| 128 else |
| 129 completeNALU = kNaluIncomplete; |
| 130 |
| 131 codec = kVideoCodecVP9; |
| 132 return; |
121 case kRtpVideoH264: | 133 case kRtpVideoH264: |
122 isFirstPacket = videoHeader.isFirstPacket; | 134 isFirstPacket = videoHeader.isFirstPacket; |
123 if (isFirstPacket) | 135 if (isFirstPacket) |
124 insertStartCode = true; | 136 insertStartCode = true; |
125 | 137 |
126 if (isFirstPacket && markerBit) { | 138 if (isFirstPacket && markerBit) { |
127 completeNALU = kNaluComplete; | 139 completeNALU = kNaluComplete; |
128 } else if (isFirstPacket) { | 140 } else if (isFirstPacket) { |
129 completeNALU = kNaluStart; | 141 completeNALU = kNaluStart; |
130 } else if (markerBit) { | 142 } else if (markerBit) { |
131 completeNALU = kNaluEnd; | 143 completeNALU = kNaluEnd; |
132 } else { | 144 } else { |
133 completeNALU = kNaluIncomplete; | 145 completeNALU = kNaluIncomplete; |
134 } | 146 } |
135 codec = kVideoCodecH264; | 147 codec = kVideoCodecH264; |
136 return; | 148 return; |
137 case kRtpVideoGeneric: | 149 case kRtpVideoGeneric: |
138 case kRtpVideoNone: | 150 case kRtpVideoNone: |
139 codec = kVideoCodecUnknown; | 151 codec = kVideoCodecUnknown; |
140 return; | 152 return; |
141 } | 153 } |
142 } | 154 } |
143 | 155 |
144 } // namespace webrtc | 156 } // namespace webrtc |
OLD | NEW |