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

Side by Side Diff: media/cast/audio_sender/audio_sender.cc

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_sender/audio_sender.h" 5 #include "media/cast/audio_sender/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 "crypto/encryptor.h" 10 #include "crypto/encryptor.h"
11 #include "crypto/symmetric_key.h" 11 #include "crypto/symmetric_key.h"
12 #include "media/cast/audio_sender/audio_encoder.h" 12 #include "media/cast/audio_sender/audio_encoder.h"
13 #include "media/cast/cast_environment.h"
13 #include "media/cast/rtcp/rtcp.h" 14 #include "media/cast/rtcp/rtcp.h"
14 #include "media/cast/rtp_sender/rtp_sender.h" 15 #include "media/cast/rtp_sender/rtp_sender.h"
15 16
16 namespace media { 17 namespace media {
17 namespace cast { 18 namespace cast {
18 19
19 const int64 kMinSchedulingDelayMs = 1; 20 const int64 kMinSchedulingDelayMs = 1;
20 21
21 class LocalRtcpAudioSenderFeedback : public RtcpSenderFeedback { 22 class LocalRtcpAudioSenderFeedback : public RtcpSenderFeedback {
22 public: 23 public:
(...skipping 26 matching lines...) Expand all
49 } 50 }
50 51
51 private: 52 private:
52 RtpSender* rtp_sender_; 53 RtpSender* rtp_sender_;
53 }; 54 };
54 55
55 AudioSender::AudioSender(scoped_refptr<CastEnvironment> cast_environment, 56 AudioSender::AudioSender(scoped_refptr<CastEnvironment> cast_environment,
56 const AudioSenderConfig& audio_config, 57 const AudioSenderConfig& audio_config,
57 PacedPacketSender* const paced_packet_sender) 58 PacedPacketSender* const paced_packet_sender)
58 : cast_environment_(cast_environment), 59 : cast_environment_(cast_environment),
59 rtp_sender_(cast_environment->Clock(), &audio_config, NULL, 60 rtp_sender_(cast_environment, &audio_config, NULL,
60 paced_packet_sender), 61 paced_packet_sender),
61 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)), 62 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)),
62 rtp_audio_sender_statistics_( 63 rtp_audio_sender_statistics_(
63 new LocalRtpSenderStatistics(&rtp_sender_)), 64 new LocalRtpSenderStatistics(&rtp_sender_)),
64 rtcp_(cast_environment->Clock(), 65 rtcp_(cast_environment,
65 rtcp_feedback_.get(), 66 rtcp_feedback_.get(),
66 paced_packet_sender, 67 paced_packet_sender,
67 rtp_audio_sender_statistics_.get(), 68 rtp_audio_sender_statistics_.get(),
68 NULL, 69 NULL,
69 audio_config.rtcp_mode, 70 audio_config.rtcp_mode,
70 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), 71 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval),
71 audio_config.sender_ssrc, 72 audio_config.sender_ssrc,
72 audio_config.incoming_feedback_ssrc, 73 audio_config.incoming_feedback_ssrc,
73 audio_config.rtcp_c_name), 74 audio_config.rtcp_c_name),
74 initialized_(false), 75 initialized_(false),
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 192 }
192 193
193 void AudioSender::SendRtcpReport() { 194 void AudioSender::SendRtcpReport() {
194 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 195 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
195 rtcp_.SendRtcpFromRtpSender(NULL); // TODO(pwestin): add logging. 196 rtcp_.SendRtcpFromRtpSender(NULL); // TODO(pwestin): add logging.
196 ScheduleNextRtcpReport(); 197 ScheduleNextRtcpReport();
197 } 198 }
198 199
199 } // namespace cast 200 } // namespace cast
200 } // namespace media 201 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/audio_sender/audio_encoder_unittest.cc ('k') | media/cast/audio_sender/audio_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698