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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 *bytes_to_send = packet.size + kFuAHeaderSize; | 325 *bytes_to_send = packet.size + kFuAHeaderSize; |
326 memcpy(buffer + kFuAHeaderSize, &payload_data_[packet.offset], packet.size); | 326 memcpy(buffer + kFuAHeaderSize, &payload_data_[packet.offset], packet.size); |
327 } else { | 327 } else { |
328 *bytes_to_send = packet.size + kFuAHeaderSize; | 328 *bytes_to_send = packet.size + kFuAHeaderSize; |
329 memcpy(buffer + kFuAHeaderSize, &payload_data_[packet.offset], packet.size); | 329 memcpy(buffer + kFuAHeaderSize, &payload_data_[packet.offset], packet.size); |
330 } | 330 } |
331 packets_.pop(); | 331 packets_.pop(); |
332 } | 332 } |
333 | 333 |
334 ProtectionType RtpPacketizerH264::GetProtectionType() { | 334 ProtectionType RtpPacketizerH264::GetProtectionType() { |
335 return (frame_type_ == kVideoFrameKey) ? kProtectedPacket | 335 return kProtectedPacket; |
336 : kUnprotectedPacket; | |
337 } | 336 } |
338 | 337 |
339 StorageType RtpPacketizerH264::GetStorageType( | 338 StorageType RtpPacketizerH264::GetStorageType( |
340 uint32_t retransmission_settings) { | 339 uint32_t retransmission_settings) { |
341 return kAllowRetransmission; | 340 return kAllowRetransmission; |
342 } | 341 } |
343 | 342 |
344 std::string RtpPacketizerH264::ToString() { | 343 std::string RtpPacketizerH264::ToString() { |
345 return "RtpPacketizerH264"; | 344 return "RtpPacketizerH264"; |
346 } | 345 } |
(...skipping 20 matching lines...) Expand all Loading... |
367 // will depacketize the STAP-A into NAL units later. | 366 // will depacketize the STAP-A into NAL units later. |
368 if (!ParseSingleNalu(parsed_payload, payload_data, payload_data_length)) | 367 if (!ParseSingleNalu(parsed_payload, payload_data, payload_data_length)) |
369 return false; | 368 return false; |
370 } | 369 } |
371 | 370 |
372 parsed_payload->payload = payload_data + offset; | 371 parsed_payload->payload = payload_data + offset; |
373 parsed_payload->payload_length = payload_data_length - offset; | 372 parsed_payload->payload_length = payload_data_length - offset; |
374 return true; | 373 return true; |
375 } | 374 } |
376 } // namespace webrtc | 375 } // namespace webrtc |
OLD | NEW |