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

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: Use alt_fb_idx for keyframes, fully initialize structure. 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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 if (!ParseSsData(&parser, vp9)) { 731 if (!ParseSsData(&parser, vp9)) {
732 LOG(LS_ERROR) << "Failed parsing VP9 SS data."; 732 LOG(LS_ERROR) << "Failed parsing VP9 SS data.";
733 return false; 733 return false;
734 } 734 }
735 if (vp9->spatial_layer_resolution_present) { 735 if (vp9->spatial_layer_resolution_present) {
736 // TODO(asapersson): Add support for spatial layers. 736 // TODO(asapersson): Add support for spatial layers.
737 parsed_payload->type.Video.width = vp9->width[0]; 737 parsed_payload->type.Video.width = vp9->width[0];
738 parsed_payload->type.Video.height = vp9->height[0]; 738 parsed_payload->type.Video.height = vp9->height[0];
739 } 739 }
740 } 740 }
741 parsed_payload->type.Video.isFirstPacket = b_bit && (vp9->spatial_idx == 0); 741 parsed_payload->type.Video.isFirstPacket =
742 b_bit && (!l_bit || !vp9->inter_layer_predicted);
742 743
743 uint64_t rem_bits = parser.RemainingBitCount(); 744 uint64_t rem_bits = parser.RemainingBitCount();
744 assert(rem_bits % 8 == 0); 745 assert(rem_bits % 8 == 0);
745 parsed_payload->payload_length = rem_bits / 8; 746 parsed_payload->payload_length = rem_bits / 8;
746 if (parsed_payload->payload_length == 0) { 747 if (parsed_payload->payload_length == 0) {
747 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; 748 LOG(LS_ERROR) << "Failed parsing VP9 payload data.";
748 return false; 749 return false;
749 } 750 }
750 parsed_payload->payload = 751 parsed_payload->payload =
751 payload + payload_length - parsed_payload->payload_length; 752 payload + payload_length - parsed_payload->payload_length;
752 753
753 return true; 754 return true;
754 } 755 }
755 } // namespace webrtc 756 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698