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

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

Issue 2614503002: Reland of Rename RTPVideoHeader.isFirstPacket to .is_first_packet_in_frame. (Closed)
Patch Set: Add base/deprecation.h include. Created 3 years, 11 months 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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 if (!ParseSsData(&parser, vp9)) { 721 if (!ParseSsData(&parser, vp9)) {
722 LOG(LS_ERROR) << "Failed parsing VP9 SS data."; 722 LOG(LS_ERROR) << "Failed parsing VP9 SS data.";
723 return false; 723 return false;
724 } 724 }
725 if (vp9->spatial_layer_resolution_present) { 725 if (vp9->spatial_layer_resolution_present) {
726 // TODO(asapersson): Add support for spatial layers. 726 // TODO(asapersson): Add support for spatial layers.
727 parsed_payload->type.Video.width = vp9->width[0]; 727 parsed_payload->type.Video.width = vp9->width[0];
728 parsed_payload->type.Video.height = vp9->height[0]; 728 parsed_payload->type.Video.height = vp9->height[0];
729 } 729 }
730 } 730 }
731 parsed_payload->type.Video.isFirstPacket = 731 parsed_payload->type.Video.is_first_packet_in_frame =
732 b_bit && (!l_bit || !vp9->inter_layer_predicted); 732 b_bit && (!l_bit || !vp9->inter_layer_predicted);
733 733
734 uint64_t rem_bits = parser.RemainingBitCount(); 734 uint64_t rem_bits = parser.RemainingBitCount();
735 assert(rem_bits % 8 == 0); 735 assert(rem_bits % 8 == 0);
736 parsed_payload->payload_length = rem_bits / 8; 736 parsed_payload->payload_length = rem_bits / 8;
737 if (parsed_payload->payload_length == 0) { 737 if (parsed_payload->payload_length == 0) {
738 LOG(LS_ERROR) << "Failed parsing VP9 payload data."; 738 LOG(LS_ERROR) << "Failed parsing VP9 payload data.";
739 return false; 739 return false;
740 } 740 }
741 parsed_payload->payload = 741 parsed_payload->payload =
742 payload + payload_length - parsed_payload->payload_length; 742 payload + payload_length - parsed_payload->payload_length;
743 743
744 return true; 744 return true;
745 } 745 }
746 } // namespace webrtc 746 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_vp8.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698