Chromium Code Reviews| Index: media/cast/net/cast_transport_sender_impl.h |
| diff --git a/media/cast/net/cast_transport_sender_impl.h b/media/cast/net/cast_transport_sender_impl.h |
| index cee845223cc08177224b78d0509525060faf9d2d..8ebbb7966623b6395a478f9d17d4d7cb46d57d44 100644 |
| --- a/media/cast/net/cast_transport_sender_impl.h |
| +++ b/media/cast/net/cast_transport_sender_impl.h |
| @@ -25,6 +25,7 @@ |
| #define MEDIA_CAST_NET_CAST_TRANSPORT_IMPL_H_ |
| #include "base/callback.h" |
| +#include "base/gtest_prod_util.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| @@ -79,15 +80,27 @@ class CastTransportSenderImpl : public CastTransportSender { |
| base::TimeTicks current_time, |
| uint32 current_time_as_rtp_timestamp) OVERRIDE; |
| - virtual void ResendPackets(bool is_audio, |
| - const MissingFramesAndPacketsMap& missing_packets, |
| - bool cancel_rtx_if_not_in_list, |
| - base::TimeDelta dedupe_window) |
| - OVERRIDE; |
| + virtual void CancelSendingFrames(uint32 ssrc, |
| + const std::set<uint32>& frame_ids) OVERRIDE; |
| + |
| + virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) OVERRIDE; |
| virtual PacketReceiverCallback PacketReceiverForTesting() OVERRIDE; |
| private: |
| + FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, NacksCancelRetransmits); |
| + FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, CancelRetransmits); |
| + FRIEND_TEST_ALL_PREFIXES(CastTransportSenderImplTest, Kickstart); |
| + |
| + // Resend packets for the stream identified by |ssrc|. |
| + // If |cancel_rtx_if_not_in_list| is true then transmission of packets for the |
| + // frames but not in the list will be dropped. |
| + // If packet was sent after |now - dedupe_window| then it will not be sent. |
| + void ResendPackets(uint32 ssrc, |
| + const MissingFramesAndPacketsMap& missing_packets, |
| + bool cancel_rtx_if_not_in_list, |
| + base::TimeDelta dedupe_window); |
| + |
| // If |raw_events_callback_| is non-null, calls it with events collected |
| // by |event_subscriber_| since last call. |
| void SendRawEvents(); |
| @@ -99,6 +112,18 @@ class CastTransportSenderImpl : public CastTransportSender { |
| void OnReceivedLogMessage(EventMediaType media_type, |
| const RtcpReceiverLogMessage& log); |
| + // Called when RTT information is updated. |
| + void OnReceivedRtt(const RtcpRttCallback& rtt_cb, |
| + base::TimeDelta rtt, |
| + base::TimeDelta avg_rtt, |
| + base::TimeDelta min_rtt, |
| + base::TimeDelta max_rtt); |
| + |
| + // Called when a RTCP Cast message is received. |
| + void OnReceivedCastMessage(uint32 ssrc, |
| + const RtcpCastMessageCallback& cast_message_cb, |
| + const RtcpCastMessage& cast_message); |
| + |
| base::TickClock* clock_; // Not owned by this class. |
| CastTransportStatusCallback status_callback_; |
| scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; |
| @@ -132,6 +157,10 @@ class CastTransportSenderImpl : public CastTransportSender { |
| BulkRawEventsCallback raw_events_callback_; |
| base::TimeDelta raw_events_callback_interval_; |
| + // The most up-to-date RTT information from either audio of video RTCP |
| + // stream. |
| + base::TimeDelta most_recent_rtt_; |
|
hubbe
2014/08/11 19:11:50
Given that audio packets are usually smaller than
Alpha Left Google
2014/08/11 21:03:18
RTT is gathered by RTCP packets so it doesn't matt
|
| + |
| base::WeakPtrFactory<CastTransportSenderImpl> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(CastTransportSenderImpl); |