| Index: chrome/renderer/media/cast_transport_sender_ipc.cc
|
| diff --git a/chrome/renderer/media/cast_transport_sender_ipc.cc b/chrome/renderer/media/cast_transport_sender_ipc.cc
|
| index da614b8fb3079e28dccacfa662779507444ddfac..2a1a53a20119b15a20aea87f2485c1187befbc29 100644
|
| --- a/chrome/renderer/media/cast_transport_sender_ipc.cc
|
| +++ b/chrome/renderer/media/cast_transport_sender_ipc.cc
|
| @@ -45,18 +45,22 @@ CastTransportSenderIPC::~CastTransportSenderIPC() {
|
| void CastTransportSenderIPC::InitializeAudio(
|
| const media::cast::CastTransportRtpConfig& config,
|
| const media::cast::RtcpCastMessageCallback& cast_message_cb,
|
| - const media::cast::RtcpRttCallback& rtt_cb) {
|
| + const media::cast::RtcpRttCallback& rtt_cb,
|
| + const media::cast::RtcpPliCallback& pli_cb) {
|
| clients_[config.ssrc].cast_message_cb = cast_message_cb;
|
| clients_[config.ssrc].rtt_cb = rtt_cb;
|
| + clients_[config.ssrc].pli_cb = pli_cb;
|
| Send(new CastHostMsg_InitializeAudio(channel_id_, config));
|
| }
|
|
|
| void CastTransportSenderIPC::InitializeVideo(
|
| const media::cast::CastTransportRtpConfig& config,
|
| const media::cast::RtcpCastMessageCallback& cast_message_cb,
|
| - const media::cast::RtcpRttCallback& rtt_cb) {
|
| + const media::cast::RtcpRttCallback& rtt_cb,
|
| + const media::cast::RtcpPliCallback& pli_cb) {
|
| clients_[config.ssrc].cast_message_cb = cast_message_cb;
|
| clients_[config.ssrc].rtt_cb = rtt_cb;
|
| + clients_[config.ssrc].pli_cb = pli_cb;
|
| Send(new CastHostMsg_InitializeVideo(channel_id_, config));
|
| }
|
|
|
| @@ -100,6 +104,7 @@ void CastTransportSenderIPC::SendRtcpFromRtpReceiver(
|
| uint32_t sender_ssrc,
|
| const media::cast::RtcpTimeData& time_data,
|
| const media::cast::RtcpCastMessage* cast_message,
|
| + const media::cast::RtcpPliMessage* pli_message,
|
| base::TimeDelta target_delay,
|
| const media::cast::ReceiverRtcpEventSubscriber::RtcpEvents* rtcp_events,
|
| const media::cast::RtpReceiverStatistics* rtp_receiver_statistics) {
|
| @@ -114,6 +119,10 @@ void CastTransportSenderIPC::SendRtcpFromRtpReceiver(
|
| params.cast_message.reset(
|
| const_cast<media::cast::RtcpCastMessage*>(cast_message));
|
| }
|
| + if (pli_message) {
|
| + params.pli_message.reset(
|
| + const_cast<media::cast::RtcpPliMessage*>(pli_message));
|
| + }
|
| params.target_delay = target_delay;
|
| if (rtcp_events) {
|
| params.rtcp_events.reset(
|
| @@ -132,6 +141,7 @@ void CastTransportSenderIPC::SendRtcpFromRtpReceiver(
|
|
|
| ignore_result(params.rtp_receiver_statistics.release());
|
| ignore_result(params.cast_message.release());
|
| + ignore_result(params.pli_message.release());
|
| ignore_result(params.rtcp_events.release());
|
| }
|
|
|
| @@ -182,6 +192,17 @@ void CastTransportSenderIPC::OnRtcpCastMessage(
|
| it->second.cast_message_cb.Run(cast_message);
|
| }
|
|
|
| +void CastTransportSenderIPC::OnReceivedPli(uint32_t ssrc) {
|
| + ClientMap::iterator it = clients_.find(ssrc);
|
| + if (it == clients_.end()) {
|
| + LOG(ERROR) << "Received picture loss indicator from for unknown SSRC: "
|
| + << ssrc;
|
| + return;
|
| + }
|
| + if (!it->second.pli_cb.is_null())
|
| + it->second.pli_cb.Run();
|
| +}
|
| +
|
| void CastTransportSenderIPC::OnReceivedPacket(
|
| const media::cast::Packet& packet) {
|
| if (!packet_callback_.is_null()) {
|
|
|