summaryrefslogtreecommitdiffstats
path: root/media/cast/audio_receiver/audio_receiver.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 17:57:20 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-20 17:57:20 +0000
commit8b39cd09f23d9574adf36fc9b29023db5174a216 (patch)
tree1f2820f0f6cafc4f56d8b2f22c6441b7f159a951 /media/cast/audio_receiver/audio_receiver.cc
parent0b495a0037206b8a0028a83429590159ca1b73ab (diff)
downloadchromium_src-8b39cd09f23d9574adf36fc9b29023db5174a216.zip
chromium_src-8b39cd09f23d9574adf36fc9b29023db5174a216.tar.gz
chromium_src-8b39cd09f23d9574adf36fc9b29023db5174a216.tar.bz2
Cast: Send redundant Cast receiver events through RTCP
We used to send Cast receiver events to the sender through RTCP only once. That means if the RTCP packet is lost we do not receiver the event. This change adds redundancy such that each RTCP packet from Cast receiver to sender is filled with the last known events. RtcpSender then remove duplicates. This adds more reliability to the event collection mechanism in Cast. Review URL: https://codereview.chromium.org/166623004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252307 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/audio_receiver/audio_receiver.cc')
-rw-r--r--media/cast/audio_receiver/audio_receiver.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/media/cast/audio_receiver/audio_receiver.cc b/media/cast/audio_receiver/audio_receiver.cc
index 7dcfe57..48a25f4 100644
--- a/media/cast/audio_receiver/audio_receiver.cc
+++ b/media/cast/audio_receiver/audio_receiver.cc
@@ -17,19 +17,10 @@
namespace {
-using media::cast::kMaxIpPacketSize;
-using media::cast::kRtcpCastLogHeaderSize;
-using media::cast::kRtcpReceiverEventLogSize;
-
// Max time we wait until an audio frame is due to be played out is released.
static const int64 kMaxAudioFrameWaitMs = 20;
static const int64 kMinSchedulingDelayMs = 1;
-// This is an upper bound on number of events that can fit into a single RTCP
-// packet.
-static const int64 kMaxEventSubscriberEntries =
- (kMaxIpPacketSize - kRtcpCastLogHeaderSize) / kRtcpReceiverEventLogSize;
-
} // namespace
namespace media {
@@ -94,9 +85,8 @@ AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment,
const AudioReceiverConfig& audio_config,
transport::PacedPacketSender* const packet_sender)
: cast_environment_(cast_environment),
- event_subscriber_(
- kMaxEventSubscriberEntries,
- ReceiverRtcpEventSubscriber::kAudioEventSubscriber),
+ event_subscriber_(kReceiverRtcpEventHistorySize,
+ ReceiverRtcpEventSubscriber::kAudioEventSubscriber),
codec_(audio_config.codec),
frequency_(audio_config.frequency),
audio_buffer_(),