diff options
author | miu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 11:27:57 +0000 |
---|---|---|
committer | miu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 11:27:57 +0000 |
commit | 14349ce397a0c4505f3ea661b69dd6c917ec94ac (patch) | |
tree | bf694f622111de6b05ae16aa9355253f499aa813 /media/cast/cast_sender_impl.cc | |
parent | d13a7eeaaca25b6dc26e48e4ef334c1f9f182a63 (diff) | |
download | chromium_src-14349ce397a0c4505f3ea661b69dd6c917ec94ac.zip chromium_src-14349ce397a0c4505f3ea661b69dd6c917ec94ac.tar.gz chromium_src-14349ce397a0c4505f3ea661b69dd6c917ec94ac.tar.bz2 |
Change FrameInput::InsertRawAudioFrame(PcmAudioFrame) interface to InsertAudio(AudioBus).
This is a prerequisite to "gluing" the Chrome audio capture implementation with CastSender in a later change.
Major changes:
1. AudioEncoder: Removed dependency on WebRTC ACM, using opus library directly.
2. AudioEncoder: Much moar unit testing.
3. AudioEncoder: Minor structural simplifications (e.g., provide FrameEncodedCallback to ctor, one sampling rate per instance).
4. AudioEncoder: Now populating EncodedAudioFrame::frame_id field.
5. End2EndTest: Replaced SNR code with simpler "crossing-zero counter" for confirming audio signals (works well even for resampled audio).
Review URL: https://codereview.chromium.org/51763003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/cast_sender_impl.cc')
-rw-r--r-- | media/cast/cast_sender_impl.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/media/cast/cast_sender_impl.cc b/media/cast/cast_sender_impl.cc index cbf7a4d..1bdd7c5 100644 --- a/media/cast/cast_sender_impl.cc +++ b/media/cast/cast_sender_impl.cc @@ -12,11 +12,6 @@ namespace media { namespace cast { // static -void FrameInput::DeleteAudioFrame(const PcmAudioFrame* frame) { - delete frame; -} - -// static void FrameInput::DeleteVideoFrame(const I420VideoFrame* video_frame) { delete [] video_frame->y_plane.data; delete [] video_frame->u_plane.data; @@ -52,12 +47,12 @@ class LocalFrameInput : public FrameInput { video_frame, capture_time, callback)); } - virtual void InsertRawAudioFrame(const PcmAudioFrame* audio_frame, - const base::TimeTicks& recorded_time, - const base::Closure callback) OVERRIDE { + virtual void InsertAudio(const AudioBus* audio_bus, + const base::TimeTicks& recorded_time, + const base::Closure& done_callback) OVERRIDE { cast_environment_->PostTask(CastEnvironment::MAIN, FROM_HERE, - base::Bind(&AudioSender::InsertRawAudioFrame, audio_sender_, - audio_frame, recorded_time, callback)); + base::Bind(&AudioSender::InsertAudio, audio_sender_, + audio_bus, recorded_time, done_callback)); } virtual void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, |