summaryrefslogtreecommitdiffstats
path: root/media/cast/cast_sender_impl.cc
diff options
context:
space:
mode:
authormiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 10:14:45 +0000
committermiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-13 10:14:45 +0000
commitd732891b4ee22048d942a6d6523fbaa311c11cb4 (patch)
treeeb986a7045788c684fa05697104a9cf05462fd35 /media/cast/cast_sender_impl.cc
parent2898118f05e9ddd70951c2f14f528c0c1ca62cd1 (diff)
downloadchromium_src-d732891b4ee22048d942a6d6523fbaa311c11cb4.zip
chromium_src-d732891b4ee22048d942a6d6523fbaa311c11cb4.tar.gz
chromium_src-d732891b4ee22048d942a6d6523fbaa311c11cb4.tar.bz2
Clean-up: Fix FrameInput::InsertAudio() interface, and remove ref-counting of AudioEncoder.
1. Rather than pass a done callback around, explicitly pass ownership of each AudioBus to the InsertAudio() calls. 2. AudioEncoder is no longer ref-counted. Instead, its inner "impl class" is ref-counted since it can be referenced by two threads (MAIN and AUDIO_ENCODER). BUG=344628 Review URL: https://codereview.chromium.org/198333002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256786 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/cast_sender_impl.cc')
-rw-r--r--media/cast/cast_sender_impl.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/media/cast/cast_sender_impl.cc b/media/cast/cast_sender_impl.cc
index c461d35..3c90461 100644
--- a/media/cast/cast_sender_impl.cc
+++ b/media/cast/cast_sender_impl.cc
@@ -51,16 +51,14 @@ class LocalAudioFrameInput : public AudioFrameInput {
base::WeakPtr<AudioSender> audio_sender)
: cast_environment_(cast_environment), audio_sender_(audio_sender) {}
- virtual void InsertAudio(const AudioBus* audio_bus,
- const base::TimeTicks& recorded_time,
- const base::Closure& done_callback) OVERRIDE {
+ virtual void InsertAudio(scoped_ptr<AudioBus> audio_bus,
+ const base::TimeTicks& recorded_time) OVERRIDE {
cast_environment_->PostTask(CastEnvironment::MAIN,
FROM_HERE,
base::Bind(&AudioSender::InsertAudio,
audio_sender_,
- audio_bus,
- recorded_time,
- done_callback));
+ base::Passed(&audio_bus),
+ recorded_time));
}
protected: