OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cast/receiver/frame_receiver.h" | 5 #include "media/cast/receiver/frame_receiver.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/big_endian.h" | 9 #include "base/big_endian.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 this, | 40 this, |
41 config.incoming_ssrc, | 41 config.incoming_ssrc, |
42 true, | 42 true, |
43 config.rtp_max_delay_ms * config.max_frame_rate / 1000), | 43 config.rtp_max_delay_ms * config.max_frame_rate / 1000), |
44 rtcp_(RtcpCastMessageCallback(), | 44 rtcp_(RtcpCastMessageCallback(), |
45 RtcpRttCallback(), | 45 RtcpRttCallback(), |
46 RtcpLogMessageCallback(), | 46 RtcpLogMessageCallback(), |
47 cast_environment_->Clock(), | 47 cast_environment_->Clock(), |
48 packet_sender, | 48 packet_sender, |
49 config.feedback_ssrc, | 49 config.feedback_ssrc, |
50 config.incoming_ssrc, | 50 config.incoming_ssrc), |
51 config.rtcp_c_name), | |
52 is_waiting_for_consecutive_frame_(false), | 51 is_waiting_for_consecutive_frame_(false), |
53 lip_sync_drift_(ClockDriftSmoother::GetDefaultTimeConstant()), | 52 lip_sync_drift_(ClockDriftSmoother::GetDefaultTimeConstant()), |
54 rtcp_interval_(base::TimeDelta::FromMilliseconds(config.rtcp_interval)), | 53 rtcp_interval_(base::TimeDelta::FromMilliseconds(config.rtcp_interval)), |
55 weak_factory_(this) { | 54 weak_factory_(this) { |
56 DCHECK_GT(config.rtp_max_delay_ms, 0); | 55 DCHECK_GT(config.rtp_max_delay_ms, 0); |
57 DCHECK_GT(config.max_frame_rate, 0); | 56 DCHECK_GT(config.max_frame_rate, 0); |
58 decryptor_.Initialize(config.aes_key, config.aes_iv_mask); | 57 decryptor_.Initialize(config.aes_key, config.aes_iv_mask); |
59 cast_environment_->Logging()->AddRawEventSubscriber(&event_subscriber_); | 58 cast_environment_->Logging()->AddRawEventSubscriber(&event_subscriber_); |
60 memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_)); | 59 memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_)); |
61 } | 60 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 313 } |
315 | 314 |
316 void FrameReceiver::SendNextRtcpReport() { | 315 void FrameReceiver::SendNextRtcpReport() { |
317 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 316 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
318 rtcp_.SendRtcpFromRtpReceiver(NULL, base::TimeDelta(), NULL, &stats_); | 317 rtcp_.SendRtcpFromRtpReceiver(NULL, base::TimeDelta(), NULL, &stats_); |
319 ScheduleNextRtcpReport(); | 318 ScheduleNextRtcpReport(); |
320 } | 319 } |
321 | 320 |
322 } // namespace cast | 321 } // namespace cast |
323 } // namespace media | 322 } // namespace media |
OLD | NEW |