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

Unified Diff: chrome/renderer/media/cast_transport_sender_ipc.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 | « chrome/renderer/media/cast_session_delegate.cc ('k') | chrome/renderer/media/cast_transport_sender_ipc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/cast_transport_sender_ipc.h
diff --git a/chrome/renderer/media/cast_transport_sender_ipc.h b/chrome/renderer/media/cast_transport_sender_ipc.h
index 2228b23bea197faeaa6d9c3ba67de00eca1dead9..284572bbfa3dd97b008a4b99ec34a6e4f6ed48ae 100644
--- a/chrome/renderer/media/cast_transport_sender_ipc.h
+++ b/chrome/renderer/media/cast_transport_sender_ipc.h
@@ -5,6 +5,8 @@
#ifndef CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_
#define CHROME_RENDERER_MEDIA_CAST_TRANSPORT_SENDER_IPC_H_
+#include <map>
+
#include "base/message_loop/message_loop_proxy.h"
#include "ipc/ipc_channel_proxy.h"
#include "media/cast/logging/logging_defines.h"
@@ -26,25 +28,22 @@ class CastTransportSenderIPC
virtual ~CastTransportSenderIPC();
// media::cast::CastTransportSender implementation.
- virtual void SetPacketReceiver(
- const media::cast::PacketReceiverCallback& packet_callback)
- OVERRIDE;
virtual void InitializeAudio(
- const media::cast::CastTransportRtpConfig& config) OVERRIDE;
+ const media::cast::CastTransportRtpConfig& config,
+ const media::cast::RtcpCastMessageCallback& cast_message_cb,
+ const media::cast::RtcpRttCallback& rtt_cb) OVERRIDE;
virtual void InitializeVideo(
- const media::cast::CastTransportRtpConfig& config) OVERRIDE;
+ const media::cast::CastTransportRtpConfig& config,
+ const media::cast::RtcpCastMessageCallback& cast_message_cb,
+ const media::cast::RtcpRttCallback& rtt_cb) OVERRIDE;
virtual void InsertCodedAudioFrame(
const media::cast::EncodedFrame& audio_frame) OVERRIDE;
virtual void InsertCodedVideoFrame(
const media::cast::EncodedFrame& video_frame) OVERRIDE;
- virtual void SendRtcpFromRtpSender(
- uint32 packet_type_flags,
- uint32 ntp_seconds,
- uint32 ntp_fraction,
- uint32 rtp_timestamp,
- const media::cast::RtcpDlrrReportBlock& dlrr,
- uint32 sending_ssrc,
- const std::string& c_name) OVERRIDE;
+ virtual void SendSenderReport(
+ uint32 ssrc,
+ base::TimeTicks current_time,
+ uint32 current_time_as_rtp_timestamp) OVERRIDE;
virtual void ResendPackets(
bool is_audio,
const media::cast::MissingFramesAndPacketsMap& missing_packets,
@@ -52,18 +51,31 @@ class CastTransportSenderIPC
base::TimeDelta dedupe_window)
OVERRIDE;
- void OnReceivedPacket(const media::cast::Packet& packet);
void OnNotifyStatusChange(
media::cast::CastTransportStatus status);
- void OnRawEvents(const std::vector<media::cast::PacketEvent>& packet_events);
+ void OnRawEvents(const std::vector<media::cast::PacketEvent>& packet_events,
+ const std::vector<media::cast::FrameEvent>& frame_events);
+ void OnRtt(uint32 ssrc, const media::cast::RtcpRttReport& rtt_report);
+ void OnRtcpCastMessage(uint32 ssrc,
+ const media::cast::RtcpCastMessage& cast_message);
private:
+ struct ClientCallbacks {
+ ClientCallbacks();
+ ~ClientCallbacks();
+
+ media::cast::RtcpCastMessageCallback cast_message_cb;
+ media::cast::RtcpRttCallback rtt_cb;
+ };
+
void Send(IPC::Message* message);
int32 channel_id_;
media::cast::PacketReceiverCallback packet_callback_;
media::cast::CastTransportStatusCallback status_callback_;
media::cast::BulkRawEventsCallback raw_events_callback_;
+ typedef std::map<uint32, ClientCallbacks> ClientMap;
+ ClientMap clients_;
DISALLOW_COPY_AND_ASSIGN(CastTransportSenderIPC);
};
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | chrome/renderer/media/cast_transport_sender_ipc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698