| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 if (!ParseSsData(&parser, vp9)) { | 718 if (!ParseSsData(&parser, vp9)) { |
| 719 LOG(LS_ERROR) << "Failed parsing VP9 SS data."; | 719 LOG(LS_ERROR) << "Failed parsing VP9 SS data."; |
| 720 return false; | 720 return false; |
| 721 } | 721 } |
| 722 if (vp9->spatial_layer_resolution_present) { | 722 if (vp9->spatial_layer_resolution_present) { |
| 723 // TODO(asapersson): Add support for spatial layers. | 723 // TODO(asapersson): Add support for spatial layers. |
| 724 parsed_payload->type.Video.width = vp9->width[0]; | 724 parsed_payload->type.Video.width = vp9->width[0]; |
| 725 parsed_payload->type.Video.height = vp9->height[0]; | 725 parsed_payload->type.Video.height = vp9->height[0]; |
| 726 } | 726 } |
| 727 } | 727 } |
| 728 parsed_payload->type.Video.isFirstPacket = | 728 parsed_payload->type.Video.isFirstPacket = b_bit && (vp9->spatial_idx == 0); |
| 729 b_bit && (!l_bit || !vp9->inter_layer_predicted); | |
| 730 | 729 |
| 731 uint64_t rem_bits = parser.RemainingBitCount(); | 730 uint64_t rem_bits = parser.RemainingBitCount(); |
| 732 assert(rem_bits % 8 == 0); | 731 assert(rem_bits % 8 == 0); |
| 733 parsed_payload->payload_length = rem_bits / 8; | 732 parsed_payload->payload_length = rem_bits / 8; |
| 734 if (parsed_payload->payload_length == 0) { | 733 if (parsed_payload->payload_length == 0) { |
| 735 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; | 734 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; |
| 736 return false; | 735 return false; |
| 737 } | 736 } |
| 738 parsed_payload->payload = | 737 parsed_payload->payload = |
| 739 payload + payload_length - parsed_payload->payload_length; | 738 payload + payload_length - parsed_payload->payload_length; |
| 740 | 739 |
| 741 return true; | 740 return true; |
| 742 } | 741 } |
| 743 } // namespace webrtc | 742 } // namespace webrtc |
| OLD | NEW |