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

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

Issue 145873007: Cast: Added missing DCHECKs to ThreadChecker calls and minor cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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
« no previous file with comments | « no previous file | media/cast/logging/logging_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 private: 89 private:
90 RtpReceiver* rtp_receiver_; 90 RtpReceiver* rtp_receiver_;
91 }; 91 };
92 92
93 AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment, 93 AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment,
94 const AudioReceiverConfig& audio_config, 94 const AudioReceiverConfig& audio_config,
95 transport::PacedPacketSender* const packet_sender) 95 transport::PacedPacketSender* const packet_sender)
96 : cast_environment_(cast_environment), 96 : cast_environment_(cast_environment),
97 event_subscriber_( 97 event_subscriber_(
98 cast_environment->GetMessageSingleThreadTaskRunnerForThread(
99 CastEnvironment::MAIN),
100 kMaxEventSubscriberEntries, 98 kMaxEventSubscriberEntries,
101 ReceiverRtcpEventSubscriber::kAudioEventSubscriber), 99 ReceiverRtcpEventSubscriber::kAudioEventSubscriber),
102 codec_(audio_config.codec), 100 codec_(audio_config.codec),
103 frequency_(audio_config.frequency), 101 frequency_(audio_config.frequency),
104 audio_buffer_(), 102 audio_buffer_(),
105 audio_decoder_(), 103 audio_decoder_(),
106 time_offset_(), 104 time_offset_(),
107 weak_factory_(this) { 105 weak_factory_(this) {
108 target_delay_delta_ = 106 target_delay_delta_ =
109 base::TimeDelta::FromMilliseconds(audio_config.rtp_max_delay_ms); 107 base::TimeDelta::FromMilliseconds(audio_config.rtp_max_delay_ms);
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 } 498 }
501 if (audio_decoder_) { 499 if (audio_decoder_) {
502 // Will only send a message if it is time. 500 // Will only send a message if it is time.
503 audio_decoder_->SendCastMessage(); 501 audio_decoder_->SendCastMessage();
504 } 502 }
505 ScheduleNextCastMessage(); 503 ScheduleNextCastMessage();
506 } 504 }
507 505
508 } // namespace cast 506 } // namespace cast
509 } // namespace media 507 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/cast/logging/logging_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698