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

Side by Side Diff: media/cast/rtcp/rtcp_utility.cc

Issue 192843002: Cast:Adding signaling and infrastructure for adjustable delay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/rtcp/rtcp_utility.h" 5 #include "media/cast/rtcp/rtcp_utility.h"
6 6
7 #include "base/big_endian.h" 7 #include "base/big_endian.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/cast/transport/cast_transport_defines.h" 9 #include "media/cast/transport/cast_transport_defines.h"
10 10
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 state_ = kStateTopLevel; 873 state_ = kStateTopLevel;
874 EndCurrentBlock(); 874 EndCurrentBlock();
875 return false; 875 return false;
876 } 876 }
877 field_type_ = kRtcpPayloadSpecificCastCode; 877 field_type_ = kRtcpPayloadSpecificCastCode;
878 878
879 base::BigEndianReader big_endian_reader( 879 base::BigEndianReader big_endian_reader(
880 reinterpret_cast<const char*>(rtcp_data_), length); 880 reinterpret_cast<const char*>(rtcp_data_), length);
881 big_endian_reader.ReadU8(&field_.cast_item.last_frame_id); 881 big_endian_reader.ReadU8(&field_.cast_item.last_frame_id);
882 big_endian_reader.ReadU8(&field_.cast_item.number_of_lost_fields); 882 big_endian_reader.ReadU8(&field_.cast_item.number_of_lost_fields);
883 big_endian_reader.ReadU16(&field_.cast_item.target_delay_ms);
883 884
884 rtcp_data_ += 4; 885 rtcp_data_ += 4;
885 886
886 if (field_.cast_item.number_of_lost_fields != 0) { 887 if (field_.cast_item.number_of_lost_fields != 0) {
887 // State transition 888 // State transition
888 state_ = kStatePayloadSpecificCastNack; 889 state_ = kStatePayloadSpecificCastNack;
889 } else { 890 } else {
890 // Don't go to state cast nack item if got 0 fields. 891 // Don't go to state cast nack item if got 0 fields.
891 state_ = kStateTopLevel; 892 state_ = kStateTopLevel;
892 EndCurrentBlock(); 893 EndCurrentBlock();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 1044
1044 rtcp_data_ += 12; 1045 rtcp_data_ += 12;
1045 1046
1046 number_of_blocks_--; 1047 number_of_blocks_--;
1047 field_type_ = kRtcpXrDlrrCode; 1048 field_type_ = kRtcpXrDlrrCode;
1048 return true; 1049 return true;
1049 } 1050 }
1050 1051
1051 } // namespace cast 1052 } // namespace cast
1052 } // namespace media 1053 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698