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

Unified Diff: media/cast/net/rtcp/rtcp_receiver.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_defines.cc ('k') | media/cast/net/rtcp/rtcp_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/net/rtcp/rtcp_receiver.h
diff --git a/media/cast/net/rtcp/rtcp_receiver.h b/media/cast/net/rtcp/rtcp_receiver.h
index aea45846a22c1edf27f53a5082b5fd2a89ad878e..9cd39ffc6ee64c546f4886caa410580e960425b9 100644
--- a/media/cast/net/rtcp/rtcp_receiver.h
+++ b/media/cast/net/rtcp/rtcp_receiver.h
@@ -16,7 +16,8 @@
namespace media {
namespace cast {
-class RtcpReceiverFeedback {
+// Interface for receiving RTCP messages.
+class RtcpMessageHandler {
public:
virtual void OnReceivedSenderReport(
const RtcpSenderInfo& remote_sender_info) = 0;
@@ -24,33 +25,28 @@ class RtcpReceiverFeedback {
virtual void OnReceiverReferenceTimeReport(
const RtcpReceiverReferenceTimeReport& remote_time_report) = 0;
- virtual void OnReceivedSendReportRequest() = 0;
-
virtual void OnReceivedReceiverLog(
const RtcpReceiverLogMessage& receiver_log) = 0;
- virtual ~RtcpReceiverFeedback() {}
-};
-
-class RtcpRttFeedback {
- public:
virtual void OnReceivedDelaySinceLastReport(
- uint32 receivers_ssrc,
uint32 last_report,
uint32 delay_since_last_report) = 0;
- virtual ~RtcpRttFeedback() {}
+ virtual void OnReceivedCastFeedback(
+ const RtcpCastMessage& cast_message) = 0;
+
+ virtual ~RtcpMessageHandler() {}
};
class RtcpReceiver {
public:
- explicit RtcpReceiver(scoped_refptr<CastEnvironment> cast_environment,
- RtcpSenderFeedback* sender_feedback,
- RtcpReceiverFeedback* receiver_feedback,
- RtcpRttFeedback* rtt_feedback,
- uint32 local_ssrc);
+ RtcpReceiver(RtcpMessageHandler* handler, uint32 local_ssrc);
virtual ~RtcpReceiver();
+ static bool IsRtcpPacket(const uint8* rtcp_buffer, size_t length);
+
+ static uint32 GetSsrcOfSender(const uint8* rtcp_buffer, size_t length);
+
void SetRemoteSSRC(uint32 ssrc);
// Set the history size to record Cast receiver events. Event history is
@@ -111,10 +107,7 @@ class RtcpReceiver {
uint32 remote_ssrc_;
// Not owned by this class.
- RtcpSenderFeedback* const sender_feedback_;
- RtcpReceiverFeedback* const receiver_feedback_;
- RtcpRttFeedback* const rtt_feedback_;
- scoped_refptr<CastEnvironment> cast_environment_;
+ RtcpMessageHandler* const handler_;
FrameIdWrapHelper ack_frame_id_wrap_helper_;
« no previous file with comments | « media/cast/net/rtcp/rtcp_defines.cc ('k') | media/cast/net/rtcp/rtcp_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698