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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 video_header.rotation = rtpHeader.type.Video.rotation; | 61 video_header.rotation = rtpHeader.type.Video.rotation; |
62 } | 62 } |
63 // Playout decisions are made entirely based on first packet in a frame. | 63 // Playout decisions are made entirely based on first packet in a frame. |
64 if (isFirstPacket) { | 64 if (isFirstPacket) { |
65 video_header.playout_delay = rtpHeader.type.Video.playout_delay; | 65 video_header.playout_delay = rtpHeader.type.Video.playout_delay; |
66 } else { | 66 } else { |
67 video_header.playout_delay = {-1, -1}; | 67 video_header.playout_delay = {-1, -1}; |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 VCMPacket::VCMPacket(const uint8_t* ptr, | |
72 size_t size, | |
73 uint16_t seq, | |
74 uint32_t ts, | |
75 bool mBit) | |
76 : payloadType(0), | |
77 timestamp(ts), | |
78 ntp_time_ms_(0), | |
79 seqNum(seq), | |
80 dataPtr(ptr), | |
81 sizeBytes(size), | |
82 markerBit(mBit), | |
83 timesNacked(-1), | |
84 frameType(kVideoFrameDelta), | |
85 codec(kVideoCodecUnknown), | |
86 isFirstPacket(false), | |
87 completeNALU(kNaluComplete), | |
88 insertStartCode(false), | |
89 width(0), | |
90 height(0), | |
91 video_header() {} | |
92 | |
93 void VCMPacket::Reset() { | 71 void VCMPacket::Reset() { |
94 payloadType = 0; | 72 payloadType = 0; |
95 timestamp = 0; | 73 timestamp = 0; |
96 ntp_time_ms_ = 0; | 74 ntp_time_ms_ = 0; |
97 seqNum = 0; | 75 seqNum = 0; |
98 dataPtr = NULL; | 76 dataPtr = NULL; |
99 sizeBytes = 0; | 77 sizeBytes = 0; |
100 markerBit = false; | 78 markerBit = false; |
101 timesNacked = -1; | 79 timesNacked = -1; |
102 frameType = kEmptyFrame; | 80 frameType = kEmptyFrame; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 codec = kVideoCodecH264; | 133 codec = kVideoCodecH264; |
156 return; | 134 return; |
157 case kRtpVideoGeneric: | 135 case kRtpVideoGeneric: |
158 case kRtpVideoNone: | 136 case kRtpVideoNone: |
159 codec = kVideoCodecUnknown; | 137 codec = kVideoCodecUnknown; |
160 return; | 138 return; |
161 } | 139 } |
162 } | 140 } |
163 | 141 |
164 } // namespace webrtc | 142 } // namespace webrtc |
OLD | NEW |