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

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

Issue 270493003: Cast: Deduplicate event types in cast library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 months 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
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"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)), 45 rtcp_feedback_(new LocalRtcpAudioSenderFeedback(this)),
46 rtcp_(cast_environment, 46 rtcp_(cast_environment,
47 rtcp_feedback_.get(), 47 rtcp_feedback_.get(),
48 transport_sender_, 48 transport_sender_,
49 NULL, // paced sender. 49 NULL, // paced sender.
50 NULL, 50 NULL,
51 audio_config.rtcp_mode, 51 audio_config.rtcp_mode,
52 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval), 52 base::TimeDelta::FromMilliseconds(audio_config.rtcp_interval),
53 audio_config.rtp_config.ssrc, 53 audio_config.rtp_config.ssrc,
54 audio_config.incoming_feedback_ssrc, 54 audio_config.incoming_feedback_ssrc,
55 audio_config.rtcp_c_name), 55 audio_config.rtcp_c_name,
56 true),
56 timers_initialized_(false), 57 timers_initialized_(false),
57 cast_initialization_cb_(STATUS_AUDIO_UNINITIALIZED), 58 cast_initialization_cb_(STATUS_AUDIO_UNINITIALIZED),
58 weak_factory_(this) { 59 weak_factory_(this) {
59 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); 60 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize);
60 if (!audio_config.use_external_encoder) { 61 if (!audio_config.use_external_encoder) {
61 audio_encoder_.reset( 62 audio_encoder_.reset(
62 new AudioEncoder(cast_environment, 63 new AudioEncoder(cast_environment,
63 audio_config, 64 audio_config,
64 base::Bind(&AudioSender::SendEncodedAudioFrame, 65 base::Bind(&AudioSender::SendEncodedAudioFrame,
65 weak_factory_.GetWeakPtr()))); 66 weak_factory_.GetWeakPtr())));
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // We don't send audio logging messages since all captured audio frames will 143 // We don't send audio logging messages since all captured audio frames will
143 // be sent. 144 // be sent.
144 transport::RtcpSenderLogMessage empty_msg; 145 transport::RtcpSenderLogMessage empty_msg;
145 rtp_stats_.UpdateInfo(cast_environment_->Clock()->NowTicks()); 146 rtp_stats_.UpdateInfo(cast_environment_->Clock()->NowTicks());
146 rtcp_.SendRtcpFromRtpSender(empty_msg, rtp_stats_.sender_info()); 147 rtcp_.SendRtcpFromRtpSender(empty_msg, rtp_stats_.sender_info());
147 ScheduleNextRtcpReport(); 148 ScheduleNextRtcpReport();
148 } 149 }
149 150
150 } // namespace cast 151 } // namespace cast
151 } // namespace media 152 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/audio_sender/audio_encoder.cc ('k') | media/cast/logging/encoding_event_subscriber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698