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

Unified Diff: media/cast/audio_receiver/audio_receiver.cc

Issue 74133002: Cast: Removed unnecessary ref counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/audio_receiver/audio_receiver.h ('k') | media/cast/video_sender/video_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/audio_receiver/audio_receiver.cc
diff --git a/media/cast/audio_receiver/audio_receiver.cc b/media/cast/audio_receiver/audio_receiver.cc
index cea52df06b1ea8cb09298d6d3ea76d2a3555b39d..ff9774c21976393ffbda0c543f3f5946858d4fb2 100644
--- a/media/cast/audio_receiver/audio_receiver.cc
+++ b/media/cast/audio_receiver/audio_receiver.cc
@@ -97,7 +97,7 @@ AudioReceiver::AudioReceiver(scoped_refptr<CastEnvironment> cast_environment,
true,
0));
} else {
- audio_decoder_ = new AudioDecoder(audio_config);
+ audio_decoder_.reset(new AudioDecoder(audio_config));
}
if (audio_config.aes_iv_mask.size() == kAesKeySize &&
audio_config.aes_key.size() == kAesKeySize) {
@@ -195,6 +195,7 @@ void AudioReceiver::GetRawAudioFrame(int number_of_10ms_blocks,
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
DCHECK(audio_decoder_) << "Invalid function call in this configuration";
+ // TODO(pwestin): we can skip this function by posting direct to the decoder.
cast_environment_->PostTask(CastEnvironment::AUDIO_DECODER, FROM_HERE,
base::Bind(&AudioReceiver::DecodeAudioFrameThread,
base::Unretained(this),
@@ -216,6 +217,8 @@ void AudioReceiver::DecodeAudioFrameThread(
desired_frequency,
audio_frame.get(),
&rtp_timestamp)) {
+ // TODO(pwestin): This looks wrong, we would loose the pending call to
+ // the application provided callback.
return;
}
base::TimeTicks now = cast_environment_->Clock()->NowTicks();
« no previous file with comments | « media/cast/audio_receiver/audio_receiver.h ('k') | media/cast/video_sender/video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698