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

Unified Diff: media/cast/net/rtcp/rtcp_sender.h

Issue 387933005: Cast: Refactor RTCP handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/net/rtcp/rtcp_receiver_unittest.cc ('k') | media/cast/net/rtcp/rtcp_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/net/rtcp/rtcp_sender.h
diff --git a/media/cast/net/rtcp/rtcp_sender.h b/media/cast/net/rtcp/rtcp_sender.h
index fe5af0dcd373f86ff5564eaebcab4650acf702ce..e55d5f4234bc5f7555e9bdabcf82817efeee4e1f 100644
--- a/media/cast/net/rtcp/rtcp_sender.h
+++ b/media/cast/net/rtcp/rtcp_sender.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MEDIA_CAST_RTCP_RTCP_SENDER_H_
-#define MEDIA_CAST_RTCP_RTCP_SENDER_H_
+#ifndef MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_
+#define MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_
#include <deque>
#include <list>
@@ -13,8 +13,6 @@
#include "media/cast/cast_defines.h"
#include "media/cast/net/cast_transport_defines.h"
#include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h"
-#include "media/cast/net/rtcp/rtcp.h"
-#include "media/cast/net/rtcp/rtcp_builder.h"
#include "media/cast/net/rtcp/rtcp_defines.h"
namespace media {
@@ -40,16 +38,19 @@ COMPILE_ASSERT(kSecondRedundancyOffset >
kReceiveLogMessageHistorySize,
redundancy_offset_out_of_range);
-// TODO(mikhal): Resolve duplication between this and RtcpBuilder.
+class PacedPacketSender;
+
+// TODO(hclam): This should be renamed to RtcpPacketBuilder. The function
+// of this class is to only to build a RTCP packet but not to send it.
class RtcpSender {
public:
- RtcpSender(scoped_refptr<CastEnvironment> cast_environment,
- PacedPacketSender* outgoing_transport,
+ RtcpSender(PacedPacketSender* outgoing_transport,
uint32 sending_ssrc,
const std::string& c_name);
+ ~RtcpSender();
- virtual ~RtcpSender();
-
+ // TODO(hclam): This method should be to build a packet instead of
+ // sending it.
void SendRtcpFromRtpReceiver(
uint32 packet_type_flags,
const RtcpReportBlock* report_block,
@@ -58,6 +59,12 @@ class RtcpSender {
const ReceiverRtcpEventSubscriber::RtcpEventMultiMap* rtcp_events,
base::TimeDelta target_delay);
+ // TODO(hclam): This method should be to build a packet instead of
+ // sending it.
+ void SendRtcpFromRtpSender(uint32 packet_type_flags,
+ const RtcpSenderInfo& sender_info,
+ const RtcpDlrrReportBlock& dlrr);
+
private:
void BuildRR(const RtcpReportBlock* report_block,
Packet* packet) const;
@@ -84,6 +91,10 @@ class RtcpSender {
base::TimeDelta target_delay,
Packet* packet) const;
+ void BuildSR(const RtcpSenderInfo& sender_info, Packet* packet) const;
+
+ void BuildDlrrRb(const RtcpDlrrReportBlock& dlrr, Packet* packet) const;
+
void BuildReceiverLog(
const ReceiverRtcpEventSubscriber::RtcpEventMultiMap& rtcp_events,
Packet* packet);
@@ -115,7 +126,6 @@ class RtcpSender {
// Not owned by this class.
PacedPacketSender* const transport_;
- scoped_refptr<CastEnvironment> cast_environment_;
std::deque<RtcpReceiverLogMessage> rtcp_events_history_;
@@ -124,4 +134,5 @@ class RtcpSender {
} // namespace cast
} // namespace media
-#endif // MEDIA_CAST_RTCP_RTCP_SENDER_H_
+
+#endif // MEDIA_CAST_NET_RTCP_RTCP_SENDER_H_
« no previous file with comments | « media/cast/net/rtcp/rtcp_receiver_unittest.cc ('k') | media/cast/net/rtcp/rtcp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698