Lines Matching defs:header
130 const uint8_t* header = static_cast<const uint8_t*>(data);
131 // Get base header size + length of CSRCs (not counting extension yet).
132 size_t header_size = kMinRtpPacketLen + (header[0] & 0xF) * sizeof(uint32_t);
135 if (header[0] & 0x10) {
139 ((rtc::GetBE16(header + header_size + 2) + 1) * sizeof(uint32_t));
146 bool GetRtpHeader(const void* data, size_t len, RtpHeader* header) {
147 return (GetRtpPayloadType(data, len, &(header->payload_type)) &&
148 GetRtpSeqNum(data, len, &(header->seq_num)) &&
149 GetRtpTimestamp(data, len, &(header->timestamp)) &&
150 GetRtpSsrc(data, len, &(header->ssrc)));
179 bool SetRtpHeader(void* data, size_t len, const RtpHeader& header) {
180 if (!IsValidRtpPayloadType(header.payload_type) ||
181 header.seq_num < 0 || header.seq_num > UINT16_MAX) {
185 SetUint8(data, kRtpPayloadTypeOffset, header.payload_type & 0x7F) &&
187 static_cast<uint16_t>(header.seq_num)) &&
188 SetUint32(data, kRtpTimestampOffset, header.timestamp) &&
189 SetRtpSsrc(data, len, header.ssrc));