| 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/transport/transport_audio_sender.h" | 5 #include "media/cast/transport/transport_audio_sender.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 "media/cast/transport/rtp_sender/rtp_sender.h" | 10 #include "media/cast/transport/rtp_sender/rtp_sender.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 namespace cast { | 13 namespace cast { |
| 14 namespace transport { | 14 namespace transport { |
| 15 | 15 |
| 16 TransportAudioSender::TransportAudioSender( | 16 TransportAudioSender::TransportAudioSender( |
| 17 const CastTransportAudioConfig& config, | 17 const CastTransportAudioConfig& config, |
| 18 base::TickClock* clock, | 18 base::TickClock* clock, |
| 19 LoggingImpl* logging, | |
| 20 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 19 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
| 21 PacedSender* const paced_packet_sender) | 20 PacedSender* const paced_packet_sender) |
| 22 : rtp_sender_(clock, logging, transport_task_runner, paced_packet_sender), | 21 : rtp_sender_(clock, transport_task_runner, paced_packet_sender), |
| 23 encryptor_() { | 22 encryptor_() { |
| 24 rtp_sender_.InitializeAudio(config); | 23 rtp_sender_.InitializeAudio(config); |
| 25 initialized_ = | 24 initialized_ = |
| 26 encryptor_.Initialize(config.base.aes_key, config.base.aes_iv_mask); | 25 encryptor_.Initialize(config.base.aes_key, config.base.aes_iv_mask); |
| 27 } | 26 } |
| 28 | 27 |
| 29 TransportAudioSender::~TransportAudioSender() {} | 28 TransportAudioSender::~TransportAudioSender() {} |
| 30 | 29 |
| 31 void TransportAudioSender::InsertCodedAudioFrame( | 30 void TransportAudioSender::InsertCodedAudioFrame( |
| 32 const EncodedAudioFrame* audio_frame, | 31 const EncodedAudioFrame* audio_frame, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 61 } | 60 } |
| 62 | 61 |
| 63 void TransportAudioSender::SubscribeAudioRtpStatsCallback( | 62 void TransportAudioSender::SubscribeAudioRtpStatsCallback( |
| 64 const CastTransportRtpStatistics& callback) { | 63 const CastTransportRtpStatistics& callback) { |
| 65 rtp_sender_.SubscribeRtpStatsCallback(callback); | 64 rtp_sender_.SubscribeRtpStatsCallback(callback); |
| 66 } | 65 } |
| 67 | 66 |
| 68 } // namespace transport | 67 } // namespace transport |
| 69 } // namespace cast | 68 } // namespace cast |
| 70 } // namespace media | 69 } // namespace media |
| OLD | NEW |