OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 uint8_t* buffer = | 382 uint8_t* buffer = |
383 rtp_packet->AllocatePayload(kFuAHeaderSize + fragment.length); | 383 rtp_packet->AllocatePayload(kFuAHeaderSize + fragment.length); |
384 buffer[0] = fu_indicator; | 384 buffer[0] = fu_indicator; |
385 buffer[1] = fu_header; | 385 buffer[1] = fu_header; |
386 memcpy(buffer + kFuAHeaderSize, fragment.buffer, fragment.length); | 386 memcpy(buffer + kFuAHeaderSize, fragment.buffer, fragment.length); |
387 if (packet->last_fragment) | 387 if (packet->last_fragment) |
388 input_fragments_.pop_front(); | 388 input_fragments_.pop_front(); |
389 packets_.pop(); | 389 packets_.pop(); |
390 } | 390 } |
391 | 391 |
392 ProtectionType RtpPacketizerH264::GetProtectionType() { | |
393 return kProtectedPacket; | |
394 } | |
395 | |
396 StorageType RtpPacketizerH264::GetStorageType( | |
397 uint32_t retransmission_settings) { | |
398 return kAllowRetransmission; | |
399 } | |
400 | |
401 std::string RtpPacketizerH264::ToString() { | 392 std::string RtpPacketizerH264::ToString() { |
402 return "RtpPacketizerH264"; | 393 return "RtpPacketizerH264"; |
403 } | 394 } |
404 | 395 |
405 RtpDepacketizerH264::RtpDepacketizerH264() : offset_(0), length_(0) {} | 396 RtpDepacketizerH264::RtpDepacketizerH264() : offset_(0), length_(0) {} |
406 RtpDepacketizerH264::~RtpDepacketizerH264() {} | 397 RtpDepacketizerH264::~RtpDepacketizerH264() {} |
407 | 398 |
408 bool RtpDepacketizerH264::Parse(ParsedPayload* parsed_payload, | 399 bool RtpDepacketizerH264::Parse(ParsedPayload* parsed_payload, |
409 const uint8_t* payload_data, | 400 const uint8_t* payload_data, |
410 size_t payload_data_length) { | 401 size_t payload_data_length) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 h264->packetization_type = kH264FuA; | 659 h264->packetization_type = kH264FuA; |
669 h264->nalu_type = original_nal_type; | 660 h264->nalu_type = original_nal_type; |
670 if (first_fragment) { | 661 if (first_fragment) { |
671 h264->nalus[h264->nalus_length] = nalu; | 662 h264->nalus[h264->nalus_length] = nalu; |
672 h264->nalus_length = 1; | 663 h264->nalus_length = 1; |
673 } | 664 } |
674 return true; | 665 return true; |
675 } | 666 } |
676 | 667 |
677 } // namespace webrtc | 668 } // namespace webrtc |
OLD | NEW |