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

Unified Diff: media/cast/net/rtp/rtp_sender.cc

Issue 2179943004: Set the RTP payload type to fixed values for audio/video streams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromium receiver. Created 4 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 | « no previous file | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/net/rtp/rtp_sender.cc
diff --git a/media/cast/net/rtp/rtp_sender.cc b/media/cast/net/rtp/rtp_sender.cc
index 1b5f960b17f907ea928b0eff170623db40465def..2a623d2328449ca06a760e97fd4a1d968efa5709 100644
--- a/media/cast/net/rtp/rtp_sender.cc
+++ b/media/cast/net/rtp/rtp_sender.cc
@@ -39,7 +39,14 @@ RtpSender::~RtpSender() {}
bool RtpSender::Initialize(const CastTransportRtpConfig& config) {
config_.ssrc = config.ssrc;
- config_.payload_type = static_cast<int>(config.rtp_payload_type);
+ // TODO(xjz): Android TV receivers expect the |payload_type| to be one of
+ // these two specific values. This constraint needs to be removed and the
+ // value of the |payload_type| can vary according to the spec:
+ // https://tools.ietf.org/html/rfc3551.
+ if (config.rtp_payload_type <= RtpPayloadType::AUDIO_LAST)
+ config_.payload_type = 127;
+ else
+ config_.payload_type = 96;
packetizer_.reset(new RtpPacketizer(transport_, &storage_, config_));
return true;
}
« no previous file with comments | « no previous file | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698