OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/audio_receiver/audio_receiver.h" | 5 #include "media/cast/audio_receiver/audio_receiver.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "crypto/encryptor.h" | 10 #include "crypto/encryptor.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 extended_high_sequence_number, | 78 extended_high_sequence_number, |
79 jitter); | 79 jitter); |
80 } | 80 } |
81 | 81 |
82 private: | 82 private: |
83 RtpReceiver* rtp_receiver_; | 83 RtpReceiver* rtp_receiver_; |
84 }; | 84 }; |
85 | 85 |
86 AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment, | 86 AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment, |
87 const AudioReceiverConfig& audio_config, | 87 const AudioReceiverConfig& audio_config, |
88 PacedPacketSender* const packet_sender) | 88 transport::PacedPacketSender* const packet_sender) |
89 : cast_environment_(cast_environment), | 89 : cast_environment_(cast_environment), |
90 codec_(audio_config.codec), | 90 codec_(audio_config.codec), |
91 frequency_(audio_config.frequency), | 91 frequency_(audio_config.frequency), |
92 audio_buffer_(), | 92 audio_buffer_(), |
93 audio_decoder_(), | 93 audio_decoder_(), |
94 time_offset_(), | 94 time_offset_(), |
95 weak_factory_(this) { | 95 weak_factory_(this) { |
96 target_delay_delta_ = | 96 target_delay_delta_ = |
97 base::TimeDelta::FromMilliseconds(audio_config.rtp_max_delay_ms); | 97 base::TimeDelta::FromMilliseconds(audio_config.rtp_max_delay_ms); |
98 incoming_payload_callback_.reset(new LocalRtpAudioData(this)); | 98 incoming_payload_callback_.reset(new LocalRtpAudioData(this)); |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 } | 492 } |
493 if (audio_decoder_) { | 493 if (audio_decoder_) { |
494 // Will only send a message if it is time. | 494 // Will only send a message if it is time. |
495 audio_decoder_->SendCastMessage(); | 495 audio_decoder_->SendCastMessage(); |
496 } | 496 } |
497 ScheduleNextCastMessage(); | 497 ScheduleNextCastMessage(); |
498 } | 498 } |
499 | 499 |
500 } // namespace cast | 500 } // namespace cast |
501 } // namespace media | 501 } // namespace media |
OLD | NEW |