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

Unified Diff: chrome/browser/media/cast_transport_host_filter.cc

Issue 1709863002: Add Cast PLI support on sender side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: chrome/browser/media/cast_transport_host_filter.cc
diff --git a/chrome/browser/media/cast_transport_host_filter.cc b/chrome/browser/media/cast_transport_host_filter.cc
index acdcd053acdc6fe9acee031034d544ecb782c892..c76c099ac90b9b55fef8fc257fd4cd9ae9c7f09f 100644
--- a/chrome/browser/media/cast_transport_host_filter.cc
+++ b/chrome/browser/media/cast_transport_host_filter.cc
@@ -107,6 +107,11 @@ void CastTransportHostFilter::SendCastMessage(
Send(new CastMsg_RtcpCastMessage(channel_id, ssrc, cast_message));
}
+void CastTransportHostFilter::SendReceivedPli(int32_t channel_id,
+ uint32_t ssrc) {
+ Send(new CastMsg_Pli(channel_id, ssrc));
+}
+
void CastTransportHostFilter::OnNew(int32_t channel_id,
const net::IPEndPoint& local_end_point,
const net::IPEndPoint& remote_end_point,
@@ -163,13 +168,12 @@ void CastTransportHostFilter::OnInitializeAudio(
media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id);
if (sender) {
sender->InitializeAudio(
- config,
- base::Bind(&CastTransportHostFilter::SendCastMessage,
- weak_factory_.GetWeakPtr(),
- channel_id, config.ssrc),
+ config, base::Bind(&CastTransportHostFilter::SendCastMessage,
+ weak_factory_.GetWeakPtr(), channel_id, config.ssrc),
base::Bind(&CastTransportHostFilter::SendRtt,
- weak_factory_.GetWeakPtr(),
- channel_id, config.ssrc));
+ weak_factory_.GetWeakPtr(), channel_id, config.ssrc),
+ base::Bind(&CastTransportHostFilter::SendReceivedPli,
+ weak_factory_.GetWeakPtr(), channel_id, config.ssrc));
} else {
DVLOG(1)
<< "CastTransportHostFilter::OnInitializeAudio on non-existing channel";
@@ -182,13 +186,12 @@ void CastTransportHostFilter::OnInitializeVideo(
media::cast::CastTransportSender* sender = id_map_.Lookup(channel_id);
if (sender) {
sender->InitializeVideo(
- config,
- base::Bind(&CastTransportHostFilter::SendCastMessage,
- weak_factory_.GetWeakPtr(),
- channel_id, config.ssrc),
+ config, base::Bind(&CastTransportHostFilter::SendCastMessage,
+ weak_factory_.GetWeakPtr(), channel_id, config.ssrc),
base::Bind(&CastTransportHostFilter::SendRtt,
- weak_factory_.GetWeakPtr(),
- channel_id, config.ssrc));
+ weak_factory_.GetWeakPtr(), channel_id, config.ssrc),
+ base::Bind(&CastTransportHostFilter::SendReceivedPli,
+ weak_factory_.GetWeakPtr(), channel_id, config.ssrc));
} else {
DVLOG(1)
<< "CastTransportHostFilter::OnInitializeVideo on non-existing channel";

Powered by Google App Engine
This is Rietveld 408576698