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

Side by Side Diff: media/cast/sender/frame_sender.h

Issue 901833004: [Cast] Repurpose CastInitializationStatus for variable frame size support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile fixes. Created 5 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This is the base class for an object that send frames to a receiver. 5 // This is the base class for an object that send frames to a receiver.
6 // TODO(hclam): Refactor such that there is no separate AudioSender vs. 6 // TODO(hclam): Refactor such that there is no separate AudioSender vs.
7 // VideoSender, and the functionality of both is rolled into this class. 7 // VideoSender, and the functionality of both is rolled into this class.
8 8
9 #ifndef MEDIA_CAST_SENDER_FRAME_SENDER_H_ 9 #ifndef MEDIA_CAST_SENDER_FRAME_SENDER_H_
10 #define MEDIA_CAST_SENDER_FRAME_SENDER_H_ 10 #define MEDIA_CAST_SENDER_FRAME_SENDER_H_
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // acknowledged. Logic throughout AudioSender assumes this can safely 143 // acknowledged. Logic throughout AudioSender assumes this can safely
144 // wrap-around. This member is invalid until |!last_send_time_.is_null()|. 144 // wrap-around. This member is invalid until |!last_send_time_.is_null()|.
145 uint32 latest_acked_frame_id_; 145 uint32 latest_acked_frame_id_;
146 146
147 // Counts the number of duplicate ACK that are being received. When this 147 // Counts the number of duplicate ACK that are being received. When this
148 // number reaches a threshold, the sender will take this as a sign that the 148 // number reaches a threshold, the sender will take this as a sign that the
149 // receiver hasn't yet received the first packet of the next frame. In this 149 // receiver hasn't yet received the first packet of the next frame. In this
150 // case, VideoSender will trigger a re-send of the next frame. 150 // case, VideoSender will trigger a re-send of the next frame.
151 int duplicate_ack_counter_; 151 int duplicate_ack_counter_;
152 152
153 // If this sender is ready for use, this is STATUS_AUDIO_INITIALIZED or
154 // STATUS_VIDEO_INITIALIZED.
155 CastInitializationStatus cast_initialization_status_;
156
157 // This object controls how we change the bitrate to make sure the 153 // This object controls how we change the bitrate to make sure the
158 // buffer doesn't overflow. 154 // buffer doesn't overflow.
159 scoped_ptr<CongestionControl> congestion_control_; 155 scoped_ptr<CongestionControl> congestion_control_;
160 156
161 // The most recently measured round trip time. 157 // The most recently measured round trip time.
162 base::TimeDelta current_round_trip_time_; 158 base::TimeDelta current_round_trip_time_;
163 159
164 private: 160 private:
165 // Returns the maximum media duration currently allowed in-flight. This 161 // Returns the maximum media duration currently allowed in-flight. This
166 // fluctuates in response to the currently-measured network latency. 162 // fluctuates in response to the currently-measured network latency.
(...skipping 13 matching lines...) Expand all
180 // NOTE: Weak pointers must be invalidated before all other member variables. 176 // NOTE: Weak pointers must be invalidated before all other member variables.
181 base::WeakPtrFactory<FrameSender> weak_factory_; 177 base::WeakPtrFactory<FrameSender> weak_factory_;
182 178
183 DISALLOW_COPY_AND_ASSIGN(FrameSender); 179 DISALLOW_COPY_AND_ASSIGN(FrameSender);
184 }; 180 };
185 181
186 } // namespace cast 182 } // namespace cast
187 } // namespace media 183 } // namespace media
188 184
189 #endif // MEDIA_CAST_SENDER_FRAME_SENDER_H_ 185 #endif // MEDIA_CAST_SENDER_FRAME_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698