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

Unified Diff: media/cast/transport/rtp_sender/rtp_sender.cc

Issue 268983002: Revert of Cast: Fix two video freezing problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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/transport/rtp_sender/rtp_sender.h ('k') | media/cast/transport/transport/udp_transport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/transport/rtp_sender/rtp_sender.cc
diff --git a/media/cast/transport/rtp_sender/rtp_sender.cc b/media/cast/transport/rtp_sender/rtp_sender.cc
index 6c479bb46b77a1c14101d357473dc2c792a05890..41bb97e1511ab1a639deb0888613f65e2b6c8112 100644
--- a/media/cast/transport/rtp_sender/rtp_sender.cc
+++ b/media/cast/transport/rtp_sender/rtp_sender.cc
@@ -33,32 +33,26 @@
RtpSender::~RtpSender() {}
-bool RtpSender::InitializeAudio(const CastTransportAudioConfig& config) {
- storage_.reset(new PacketStorage(config.rtp.max_outstanding_frames));
- if (!storage_->IsValid()) {
- return false;
- }
+void RtpSender::InitializeAudio(const CastTransportAudioConfig& config) {
+ storage_.reset(new PacketStorage(clock_, config.base.rtp_config.history_ms));
config_.audio = true;
- config_.ssrc = config.rtp.config.ssrc;
- config_.payload_type = config.rtp.config.payload_type;
+ config_.ssrc = config.base.ssrc;
+ config_.payload_type = config.base.rtp_config.payload_type;
config_.frequency = config.frequency;
config_.audio_codec = config.codec;
- packetizer_.reset(new RtpPacketizer(transport_, storage_.get(), config_));
- return true;
+ packetizer_.reset(
+ new RtpPacketizer(transport_, storage_.get(), config_));
}
-bool RtpSender::InitializeVideo(const CastTransportVideoConfig& config) {
- storage_.reset(new PacketStorage(config.rtp.max_outstanding_frames));
- if (!storage_->IsValid()) {
- return false;
- }
+void RtpSender::InitializeVideo(const CastTransportVideoConfig& config) {
+ storage_.reset(new PacketStorage(clock_, config.base.rtp_config.history_ms));
config_.audio = false;
- config_.ssrc = config.rtp.config.ssrc;
- config_.payload_type = config.rtp.config.payload_type;
+ config_.ssrc = config.base.ssrc;
+ config_.payload_type = config.base.rtp_config.payload_type;
config_.frequency = kVideoFrequency;
config_.video_codec = config.codec;
- packetizer_.reset(new RtpPacketizer(transport_, storage_.get(), config_));
- return true;
+ packetizer_.reset(
+ new RtpPacketizer(transport_, storage_.get(), config_));
}
void RtpSender::IncomingEncodedVideoFrame(const EncodedVideoFrame* video_frame,
@@ -95,10 +89,6 @@
// Get packet from storage.
success = storage_->GetPacket(frame_id, packet_id, &packets_to_resend);
- // Check that we got at least one packet.
- DCHECK(packet_id != 0 || success)
- << "Failed to resend frame " << static_cast<int>(frame_id);
-
// Resend packet to the network.
if (success) {
VLOG(3) << "Resend " << static_cast<int>(frame_id) << ":"
@@ -117,10 +107,6 @@
++set_it) {
uint16 packet_id = *set_it;
success = storage_->GetPacket(frame_id, packet_id, &packets_to_resend);
-
- // Check that we got at least one packet.
- DCHECK(set_it != packets_set.begin() || success)
- << "Failed to resend frame " << frame_id;
// Resend packet to the network.
if (success) {
« no previous file with comments | « media/cast/transport/rtp_sender/rtp_sender.h ('k') | media/cast/transport/transport/udp_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698