| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 bool* last_packet) { | 571 bool* last_packet) { |
| 572 if (packets_.empty()) { | 572 if (packets_.empty()) { |
| 573 return false; | 573 return false; |
| 574 } | 574 } |
| 575 PacketInfo packet_info = packets_.front(); | 575 PacketInfo packet_info = packets_.front(); |
| 576 packets_.pop(); | 576 packets_.pop(); |
| 577 | 577 |
| 578 if (!WriteHeaderAndPayload(packet_info, buffer, bytes_to_send)) { | 578 if (!WriteHeaderAndPayload(packet_info, buffer, bytes_to_send)) { |
| 579 return false; | 579 return false; |
| 580 } | 580 } |
| 581 *last_packet = packets_.empty(); | 581 *last_packet = |
| 582 packets_.empty() && (hdr_.spatial_idx == kNoSpatialIdx || |
| 583 hdr_.spatial_idx == hdr_.num_spatial_layers - 1); |
| 582 return true; | 584 return true; |
| 583 } | 585 } |
| 584 | 586 |
| 585 // VP9 format: | 587 // VP9 format: |
| 586 // | 588 // |
| 587 // Payload descriptor for F = 1 (flexible mode) | 589 // Payload descriptor for F = 1 (flexible mode) |
| 588 // 0 1 2 3 4 5 6 7 | 590 // 0 1 2 3 4 5 6 7 |
| 589 // +-+-+-+-+-+-+-+-+ | 591 // +-+-+-+-+-+-+-+-+ |
| 590 // |I|P|L|F|B|E|V|-| (REQUIRED) | 592 // |I|P|L|F|B|E|V|-| (REQUIRED) |
| 591 // +-+-+-+-+-+-+-+-+ | 593 // +-+-+-+-+-+-+-+-+ |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 if (parsed_payload->payload_length == 0) { | 756 if (parsed_payload->payload_length == 0) { |
| 755 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; | 757 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; |
| 756 return false; | 758 return false; |
| 757 } | 759 } |
| 758 parsed_payload->payload = | 760 parsed_payload->payload = |
| 759 payload + payload_length - parsed_payload->payload_length; | 761 payload + payload_length - parsed_payload->payload_length; |
| 760 | 762 |
| 761 return true; | 763 return true; |
| 762 } | 764 } |
| 763 } // namespace webrtc | 765 } // namespace webrtc |
| OLD | NEW |