Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc

Issue 1328113004: Work on flexible mode and screen sharing. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase + Comments Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 = b_bit && (vp9->spatial_idx == 0); 728 parsed_payload->type.Video.isFirstPacket =
729 b_bit && (!l_bit || !vp9->inter_layer_predicted);
729 730
730 uint64_t rem_bits = parser.RemainingBitCount(); 731 uint64_t rem_bits = parser.RemainingBitCount();
731 assert(rem_bits % 8 == 0); 732 assert(rem_bits % 8 == 0);
732 parsed_payload->payload_length = rem_bits / 8; 733 parsed_payload->payload_length = rem_bits / 8;
733 if (parsed_payload->payload_length == 0) { 734 if (parsed_payload->payload_length == 0) {
734 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; 735 LOG(LS_ERROR) << "Failed parsing VP9 payload data.";
735 return false; 736 return false;
736 } 737 }
737 parsed_payload->payload = 738 parsed_payload->payload =
738 payload + payload_length - parsed_payload->payload_length; 739 payload + payload_length - parsed_payload->payload_length;
739 740
740 return true; 741 return true;
741 } 742 }
742 } // namespace webrtc 743 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698