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

Side by Side Diff: media/cast/sender/audio_encoder.cc

Issue 506683002: Remove implicit conversions from scoped_refptr to T* in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sender/audio_encoder.h" 5 #include "media/cast/sender/audio_encoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 default: 352 default:
353 NOTREACHED() << "Unsupported or unspecified codec for audio encoder"; 353 NOTREACHED() << "Unsupported or unspecified codec for audio encoder";
354 break; 354 break;
355 } 355 }
356 } 356 }
357 357
358 AudioEncoder::~AudioEncoder() {} 358 AudioEncoder::~AudioEncoder() {}
359 359
360 CastInitializationStatus AudioEncoder::InitializationResult() const { 360 CastInitializationStatus AudioEncoder::InitializationResult() const {
361 DCHECK(insert_thread_checker_.CalledOnValidThread()); 361 DCHECK(insert_thread_checker_.CalledOnValidThread());
362 if (impl_) { 362 if (impl_.get()) {
363 return impl_->InitializationResult(); 363 return impl_->InitializationResult();
364 } 364 }
365 return STATUS_UNSUPPORTED_AUDIO_CODEC; 365 return STATUS_UNSUPPORTED_AUDIO_CODEC;
366 } 366 }
367 367
368 void AudioEncoder::InsertAudio(scoped_ptr<AudioBus> audio_bus, 368 void AudioEncoder::InsertAudio(scoped_ptr<AudioBus> audio_bus,
369 const base::TimeTicks& recorded_time) { 369 const base::TimeTicks& recorded_time) {
370 DCHECK(insert_thread_checker_.CalledOnValidThread()); 370 DCHECK(insert_thread_checker_.CalledOnValidThread());
371 DCHECK(audio_bus.get()); 371 DCHECK(audio_bus.get());
372 if (!impl_) { 372 if (!impl_.get()) {
373 NOTREACHED(); 373 NOTREACHED();
374 return; 374 return;
375 } 375 }
376 cast_environment_->PostTask(CastEnvironment::AUDIO, 376 cast_environment_->PostTask(CastEnvironment::AUDIO,
377 FROM_HERE, 377 FROM_HERE,
378 base::Bind(&AudioEncoder::ImplBase::EncodeAudio, 378 base::Bind(&AudioEncoder::ImplBase::EncodeAudio,
379 impl_, 379 impl_,
380 base::Passed(&audio_bus), 380 base::Passed(&audio_bus),
381 recorded_time)); 381 recorded_time));
382 } 382 }
383 383
384 } // namespace cast 384 } // namespace cast
385 } // namespace media 385 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698