OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 kH264SingleNalu, // This packet contains a single NAL unit. | 253 kH264SingleNalu, // This packet contains a single NAL unit. |
254 kH264StapA, // This packet contains STAP-A (single time | 254 kH264StapA, // This packet contains STAP-A (single time |
255 // aggregation) packets. If this packet has an | 255 // aggregation) packets. If this packet has an |
256 // associated NAL unit type, it'll be for the | 256 // associated NAL unit type, it'll be for the |
257 // first such aggregated packet. | 257 // first such aggregated packet. |
258 kH264FuA, // This packet contains a FU-A (fragmentation | 258 kH264FuA, // This packet contains a FU-A (fragmentation |
259 // unit) packet, meaning it is a part of a frame | 259 // unit) packet, meaning it is a part of a frame |
260 // that was too large to fit into a single packet. | 260 // that was too large to fit into a single packet. |
261 }; | 261 }; |
262 | 262 |
263 struct NaluInfo { | |
264 uint8_t type; | |
265 int sps_id; | |
266 int pps_id; | |
267 }; | |
268 | |
269 const size_t kMaxNalusPerPacket = 10; | |
270 | |
271 struct RTPVideoHeaderH264 { | 263 struct RTPVideoHeaderH264 { |
272 uint8_t nalu_type; // The NAL unit type. If this is a header for a | 264 uint8_t nalu_type; // The NAL unit type. If this is a header for a |
273 // fragmented packet, it's the NAL unit type of | 265 // fragmented packet, it's the NAL unit type of |
274 // the original data. If this is the header for an | 266 // the original data. If this is the header for an |
275 // aggregated packet, it's the NAL unit type of | 267 // aggregated packet, it's the NAL unit type of |
276 // the first NAL unit in the packet. | 268 // the first NAL unit in the packet. |
277 H264PacketizationTypes packetization_type; | 269 H264PacketizationTypes packetization_type; |
278 NaluInfo nalus[kMaxNalusPerPacket]; | |
279 size_t nalus_length; | |
280 }; | 270 }; |
281 | 271 |
282 union RTPVideoTypeHeader { | 272 union RTPVideoTypeHeader { |
283 RTPVideoHeaderVP8 VP8; | 273 RTPVideoHeaderVP8 VP8; |
284 RTPVideoHeaderVP9 VP9; | 274 RTPVideoHeaderVP9 VP9; |
285 RTPVideoHeaderH264 H264; | 275 RTPVideoHeaderH264 H264; |
286 }; | 276 }; |
287 | 277 |
288 enum RtpVideoCodecTypes { | 278 enum RtpVideoCodecTypes { |
289 kRtpVideoNone, | 279 kRtpVideoNone, |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 return unwrapped; | 767 return unwrapped; |
778 } | 768 } |
779 | 769 |
780 private: | 770 private: |
781 int64_t last_seq_; | 771 int64_t last_seq_; |
782 }; | 772 }; |
783 | 773 |
784 } // namespace webrtc | 774 } // namespace webrtc |
785 | 775 |
786 #endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ | 776 #endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ |
OLD | NEW |