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

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: clean up 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 "media/cast/audio_sender/audio_encoder.h" 10 #include "media/cast/audio_sender/audio_encoder.h"
11 #include "media/cast/cast_environment.h"
11 #include "media/cast/rtcp/rtcp.h" 12 #include "media/cast/rtcp/rtcp.h"
12 #include "media/cast/rtp_sender/rtp_sender.h" 13 #include "media/cast/rtp_sender/rtp_sender.h"
13 14
14 namespace media { 15 namespace media {
15 namespace cast { 16 namespace cast {
16 17
17 const int64 kMinSchedulingDelayMs = 1; 18 const int64 kMinSchedulingDelayMs = 1;
18 19
19 class LocalRtcpAudioSenderFeedback : public RtcpSenderFeedback { 20 class LocalRtcpAudioSenderFeedback : public RtcpSenderFeedback {
20 public: 21 public:
(...skipping 27 matching lines...) Expand all
48 49
49 private: 50 private:
50 RtpSender* rtp_sender_; 51 RtpSender* rtp_sender_;
51 }; 52 };
52 53
53 AudioSender::AudioSender(scoped_refptr<CastEnvironment> cast_environment, 54 AudioSender::AudioSender(scoped_refptr<CastEnvironment> cast_environment,
54 const AudioSenderConfig& audio_config, 55 const AudioSenderConfig& audio_config,
55 PacedPacketSender* const paced_packet_sender) 56 PacedPacketSender* const paced_packet_sender)
56 : incoming_feedback_ssrc_(audio_config.incoming_feedback_ssrc), 57 : incoming_feedback_ssrc_(audio_config.incoming_feedback_ssrc),
57 cast_environment_(cast_environment), 58 cast_environment_(cast_environment),
58 rtp_sender_(cast_environment->Clock(), &audio_config, NULL, 59 rtp_sender_(cast_environment, &audio_config, NULL, paced_packet_sender),
59 paced_packet_sender),
60 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)), 60 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)),
61 rtp_audio_sender_statistics_( 61 rtp_audio_sender_statistics_(
62 new LocalRtpSenderStatistics(&rtp_sender_)), 62 new LocalRtpSenderStatistics(&rtp_sender_)),
63 rtcp_(cast_environment->Clock(), 63 rtcp_(cast_environment,
64 rtcp_feedback_.get(), 64 rtcp_feedback_.get(),
65 paced_packet_sender, 65 paced_packet_sender,
66 rtp_audio_sender_statistics_.get(), 66 rtp_audio_sender_statistics_.get(),
67 NULL, 67 NULL,
68 audio_config.rtcp_mode, 68 audio_config.rtcp_mode,
69 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), 69 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval),
70 true, 70 true,
71 audio_config.sender_ssrc, 71 audio_config.sender_ssrc,
72 audio_config.rtcp_c_name), 72 audio_config.rtcp_c_name),
73 weak_factory_(this) { 73 weak_factory_(this) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 time_to_next); 128 time_to_next);
129 } 129 }
130 130
131 void AudioSender::SendRtcpReport() { 131 void AudioSender::SendRtcpReport() {
132 rtcp_.SendRtcpReport(incoming_feedback_ssrc_); 132 rtcp_.SendRtcpReport(incoming_feedback_ssrc_);
133 ScheduleNextRtcpReport(); 133 ScheduleNextRtcpReport();
134 } 134 }
135 135
136 } // namespace cast 136 } // namespace cast
137 } // namespace media 137 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698