OLD | NEW |
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 #ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 5 #ifndef MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 6 #define MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void SendRtcpReport(bool schedule_future_reports); | 77 void SendRtcpReport(bool schedule_future_reports); |
78 | 78 |
79 // Schedule and execute periodic checks for re-sending frames. If no | 79 // Schedule and execute periodic checks for re-sending frames. If no |
80 // acknowledgements have been received for "too long," VideoSender will | 80 // acknowledgements have been received for "too long," VideoSender will |
81 // speculatively re-send the frame just after |latest_acked_frame_id_| (the | 81 // speculatively re-send the frame just after |latest_acked_frame_id_| (the |
82 // whole frame). This is a last resort tactic to prevent the session from | 82 // whole frame). This is a last resort tactic to prevent the session from |
83 // getting stuck after a long outage. | 83 // getting stuck after a long outage. |
84 void ScheduleNextResendCheck(); | 84 void ScheduleNextResendCheck(); |
85 void ResendCheck(); | 85 void ResendCheck(); |
86 | 86 |
87 // Asks |transport_sender_| to resend all the packets for a particular frame. | 87 // Resend certain packets of an unacked frame to kick start re-transmission. |
88 void ResendFrame(uint32 resend_frame_id); | 88 void ResendForKickstart(); |
89 | 89 |
90 // Returns true if there are too many frames in flight, as defined by the | 90 // Returns true if there are too many frames in flight, as defined by the |
91 // configured target playout delay plus simple logic. When this is true, | 91 // configured target playout delay plus simple logic. When this is true, |
92 // InsertRawVideoFrame() will silenty drop frames instead of sending them to | 92 // InsertRawVideoFrame() will silenty drop frames instead of sending them to |
93 // the video encoder. | 93 // the video encoder. |
94 bool AreTooManyFramesInFlight() const; | 94 bool AreTooManyFramesInFlight() const; |
95 | 95 |
96 // Called by the |video_encoder_| with the next EncodeFrame to send. | 96 // Called by the |video_encoder_| with the next EncodeFrame to send. |
97 void SendEncodedVideoFrame(int requested_bitrate_before_encode, | 97 void SendEncodedVideoFrame(int requested_bitrate_before_encode, |
98 scoped_ptr<transport::EncodedFrame> encoded_frame); | 98 scoped_ptr<transport::EncodedFrame> encoded_frame); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // NOTE: Weak pointers must be invalidated before all other member variables. | 184 // NOTE: Weak pointers must be invalidated before all other member variables. |
185 base::WeakPtrFactory<VideoSender> weak_factory_; | 185 base::WeakPtrFactory<VideoSender> weak_factory_; |
186 | 186 |
187 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 187 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
188 }; | 188 }; |
189 | 189 |
190 } // namespace cast | 190 } // namespace cast |
191 } // namespace media | 191 } // namespace media |
192 | 192 |
193 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ | 193 #endif // MEDIA_CAST_VIDEO_SENDER_VIDEO_SENDER_H_ |
OLD | NEW |