summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_output_device.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused RenderIO() interface.xians@chromium.org2014-05-201-4/+1
| | | | | | | | | BUG=337096 TEST=bots Review URL: https://codereview.chromium.org/293673004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271536 0039d316-1c4b-4281-b951-d872f2087c98
* Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/.scherkus@chromium.org2014-01-071-5/+5
| | | | | | | | | | BUG=315922 R=dalecurtis@chromium.org TBR=jam Review URL: https://codereview.chromium.org/66183002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243390 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the message_loop header in media/.avi@chromium.org2013-07-181-1/+1
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19622002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212247 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of the shared_memory header in media/, ppapi/, webkit/.avi@chromium.org2013-07-171-2/+2
| | | | | | | | | | BUG=260807 TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/19284015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212116 0039d316-1c4b-4281-b951-d872f2087c98
* Try relanding this CL, the original CL passed the try bots but failed the ↵xians@chromium.org2013-06-031-0/+16
| | | | | | | | | | | | | | | | | | | | mac 10.7 bot because the oroginal CL queried the device info while there is no device on the bot. Hook up the device selection to the WebAudio live audio. WebAudio live audio needs to pass the session_id to the browser process so that Chrome can open the correct input device for unitfied IO. This CL looks big because it touches quite some interfaces from the render to the browser. But the change is simple and basically adding a session_id/device_id to the classes. All the changes some together and it is very hard to break it down. It also makes the media output code more similar to the media input code as well, and it will be easier to merge them for the future. TBR=henrika@chormium.org BUG=147327 TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html Change the device using the camera icon on the right of the omnibox, then reload. Verify the sound is coming from the correct input device. Review URL: https://codereview.chromium.org/15979015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203695 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 203686 "Trying relanding this CL, the original CL passed ..."xians@chromium.org2013-06-031-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | > Trying relanding this CL, the original CL passed the try bots but failed the mac 10.7 bot, I am keeping an eye on the bots and will revert it if it fails the bot again. > > Hook up the device selection to the WebAudio live audio. > WebAudio live audio needs to pass the session_id to the browser process so that Chrome can open the correct input device for unitfied IO. > > This CL looks big because it touches quite some interfaces from the render to the browser. But the change is simple and basically adding a session_id/device_id to the classes. All the changes some together and it is very hard to break it down. > It also makes the media output code more similar to the media input code as well, and it will be easier to merge them for the future. > > TBR=henrika@chormium.org > > BUG=147327 > TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html > Change the device using the camera icon on the right of the omnibox, then reload. Verify the sound is coming from the correct input device. > > Review URL: https://codereview.chromium.org/15836006 TBR=xians@chromium.org Review URL: https://codereview.chromium.org/16325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203690 0039d316-1c4b-4281-b951-d872f2087c98
* Trying relanding this CL, the original CL passed the try bots but failed the ↵xians@chromium.org2013-06-031-0/+16
| | | | | | | | | | | | | | | | | | | | mac 10.7 bot, I am keeping an eye on the bots and will revert it if it fails the bot again. Hook up the device selection to the WebAudio live audio. WebAudio live audio needs to pass the session_id to the browser process so that Chrome can open the correct input device for unitfied IO. This CL looks big because it touches quite some interfaces from the render to the browser. But the change is simple and basically adding a session_id/device_id to the classes. All the changes some together and it is very hard to break it down. It also makes the media output code more similar to the media input code as well, and it will be easier to merge them for the future. TBR=henrika@chormium.org BUG=147327 TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html Change the device using the camera icon on the right of the omnibox, then reload. Verify the sound is coming from the correct input device. Review URL: https://codereview.chromium.org/15836006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203686 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 203427 "Hook up the device selection to the WebAudio live..."justinlin@chromium.org2013-05-311-16/+0
| | | | | | | | | | | | | | | | | | | | | | Possibly caused content_browsertests to fail on Mac. > Hook up the device selection to the WebAudio live audio. > WebAudio live audio needs to pass the session_id to the browser process so that Chrome can open the correct input device for unitfied IO. > > This CL looks big because it touches quite some interfaces from the render to the browser. But the change is simple and basically adding a session_id/device_id to the classes. All the changes some together and it is very hard to break it down. > It also makes the media output code more similar to the media input code as well, and it will be easier to merge them for the future. > > > BUG=147327 > TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html > Change the device using the camera icon on the right of the omnibox, then reload. Verify the sound is coming from the correct input device. > > Review URL: https://chromiumcodereview.appspot.com/15721002 TBR=xians@chromium.org Review URL: https://codereview.chromium.org/15725013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203434 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the device selection to the WebAudio live audio.xians@chromium.org2013-05-311-0/+16
| | | | | | | | | | | | | | | | WebAudio live audio needs to pass the session_id to the browser process so that Chrome can open the correct input device for unitfied IO. This CL looks big because it touches quite some interfaces from the render to the browser. But the change is simple and basically adding a session_id/device_id to the classes. All the changes some together and it is very hard to break it down. It also makes the media output code more similar to the media input code as well, and it will be easier to merge them for the future. BUG=147327 TEST=http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html Change the device using the camera icon on the right of the omnibox, then reload. Verify the sound is coming from the correct input device. Review URL: https://chromiumcodereview.appspot.com/15721002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203427 0039d316-1c4b-4281-b951-d872f2087c98
* Use base::MessageLoop in media code.xhwang@chromium.org2013-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | MessageLoop is moved to base namespace in r191566. This CL is the followup cleanup in media code. The following folders are replaced: chrome/browser/media content/browser/renderer_host/media content/common/gpu/media content/common/media content/renderer/media media webkit/media The following command is used to make sure all instances in these folders are updated: grep -rin '[^a-zA-Z]MessageLoop[^a-zA-Z]' media chrome/browser/media content/browser/renderer_host/media content/common/gpu/media content/common/media content/renderer/media webkit/media | grep -v 'base::MessageLoop' | grep -v 'class MessageLoop' Review URL: https://chromiumcodereview.appspot.com/14385002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195626 0039d316-1c4b-4281-b951-d872f2087c98
* Merge AssociateStreamWithProducer message into CreateStream message for both ↵miu@chromium.org2013-04-171-19/+11
| | | | | | | | | | | | | | | | | | | | | audio output and input. Also: 1. Removed RendererAudioOutputDevice class, since it's no longer necessary to manage asynchronously associating a render view with a stream. 2. Clean-ups: Applied several changes/bug fixes to bring the audio input classes/impls up-to-date w.r.t. the audio output classes/impls. Filed bug 179597 for follow-up. 3. Added missing plumbing for associating audio input devices created by WebRtcAudioCapturer to render views. 4. Updated unit tests. BUG=166779 TEST=media_unittests, content_unittests, TSAN, chrome/test/functional/webrtc_*.py, and manual testing described in http://codereview.chromium.org/11359196/ Review URL: https://codereview.chromium.org/12383016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194711 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused flush operation from Chromium audio.miu@chromium.org2013-04-161-2/+2
| | | | | | | | | BUG=151051,114697 TBR=cdn Review URL: https://codereview.chromium.org/14234023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194401 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb |input_channels| all the way to AudioManagercrogers@google.com2013-02-071-9/+1
| | | | | | | | | | | | | | | | | | to support synchronized audio I/O without requiring use of the "Web Audio Input" enable flag. The approach taken is to include |input_channels| as part of the AudioParameters class so that we can represent synchronized I/O streams directly without needing to separately pass |input_channels| through-out the callstack. Please note that we're still not yet removing the "Web Audio Input" flag until we more properly verify the input device selection from getUserMedia(). BUG=none TEST=manual test: http://chromium.googlecode.com/svn/trunk/samples/audio/visualizer-live.html Review URL: https://codereview.chromium.org/11878032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181126 0039d316-1c4b-4281-b951-d872f2087c98
* Associate audio streams with their source/destination RenderView.miu@chromium.org2012-12-041-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first step towards implementing three major Chromium features, all of which need to associate audio outputs with their source tabs. See BUGs referenced by this change for more details. Previous attempt/approach: https://codereview.chromium.org/11166002/ Specifics: 1. Added two new IPC messages: AudioHostMsg_AssociateStreamWithProducer and AudioInputHostMsg_AssociateStreamWithConsumer. 2. Added "associate to render_view_id" IPC calls: PepperPlatformAudioInputImpl, PepperPlatformAudioOutputImpl, RenderAudioSourceProvider, RendererWebAudioDeviceImpl, WebRtcAudioRenderer. 3. AudioOutputDevice instances re-use the same stream IDs. 4. Removed AudioDeviceFactory and replaced test-injection scheme in AudioRendererMixerManager. Not in scope: 1. Associating RenderViews with audio input to WebRTC. 2. Associating RenderViews with streams produced by the AudioRendererMixer. 3. Speech Input (implementation is in the browser process, not the render process). Testing method: Confirm correct render_view_id shows up in debug logging when engaging the various audio code paths. Some of the many test sites used: 1. PPAPI (in and out): http://www.midomi.com/index.php?action=main.mic_check 2. WebMediaPlayer (e.g., <audio> and <video>): http://html5video.org/ 3. WebAudio API: http://chromium.googlecode.com/svn/trunk/samples/audio/convolution-effects.html 4. WebRTC (output only): http://apprtc.appspot.com/ BUG=3541,64215,153392 TEST=Enabled debug logging via --vmodule=audio_renderer_host=1,audio_input_renderer_host=1 and then engaged the various Chrome audio code paths to confirm correct render_view_id shows up in browser process. Review URL: https://chromiumcodereview.appspot.com/11359196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170919 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent AudioDeviceThread from starting if clients have called Stop() (round 2).scherkus@chromium.org2012-09-201-0/+8
| | | | | | | | | | | My first attempt at a fix (r157378) was no good as it's legal to repeatedly start and stop an AudioOutputDevice. This time around we use flag to track a pending stop so we don't start AudioDeviceThread knowing the client had requested a stop. BUG=147499 Review URL: https://chromiumcodereview.appspot.com/10958004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157841 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r157378 as it caused WebRTC to dereference null pointers when ↵scherkus@chromium.org2012-09-191-3/+2
| | | | | | | | | | | | | restarting a call. I've kept my unit test changes intact but disabled until I get a proper fix. BUG=147499,150805 TBR=henrika Review URL: https://codereview.chromium.org/10946040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157626 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent AudioDeviceThread from starting if clients have called Stop().scherkus@chromium.org2012-09-181-3/+3
| | | | | | | | | | | Due to ordering of messages between the media thread and the IO thread it was possible for AudioOutputDevice to receive OnStreamCreated() after AudioRendererImpl had called Stop(). Since AudioRendererImpl is deleted shortly after calling Stop(), AudioDeviceThread would get started with a callback pointer to a potentially deleted AudioRendererImpl. BUG=147499 TEST=media_unittests, asan build w/ test file included in bug report Review URL: https://codereview.chromium.org/10938006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157378 0039d316-1c4b-4281-b951-d872f2087c98
* Allow audio system to handle synchronized low-latency audio I/Ocrogers@google.com2012-09-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | As an important part of WebAudio/WebRTC integration, we need to be able to process and analyse live audio. This change adds the ability to our audio system for handling synchronized audio input and output in the same callback (same thread) which is important for good performance and low-latency. As a part of this change, the audio IPC system now takes an optional |input_channels| argument in the CreateStream() message and associated browser-side code in AudioRendererHost::OnCreateStream(), etc. |input_channels| will be 0 during normal operation of audio output (and no input). But when synchronized audio I/O is needed, then a non-zero value can be passed in here. The |params| passed in represents both the input and output format, particularly the frames_per_buffer() and sample_rate(). AudioRendererSink now has an new InitializeIO() method which will allow the use of synchronized I/O with the |input_channels| argument. AudioRendererSink::RenderCallback now has a new RenderIO() which will be called instead of Render() in the case where a non-zero value is passed in for |input_channels|. BUG=none TEST=none (manual testing on early Mac OS X and Windows audio back-ends) Review URL: https://chromiumcodereview.appspot.com/10830268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156234 0039d316-1c4b-4281-b951-d872f2087c98
* Move AudioDevice and AudioInputDevice to media.tommi@chromium.org2012-07-271-0/+161
This CL does the following: * Move AudioDevice, AudioInputDevice out of content, into media/audio. * ...and a couple of dependent classes: AudioDeviceThread and ScopedLoopObserver. * ...and the unit test. * Renamed AudioDevice -> AudioOutputDevice * Moved the classes into the media namespace. * Updated the unit test code as necessary. Aside from the unit test*, there are minimal code changes. Only what was required to make things build and work as before - mostly just adding or removing "media::". * The unit test changes were to add expectations for AddDelegate/RemoveDelegate since previously a mock class was inheriting from AudioMessageFilter and not the IPC interface. Review URL: https://chromiumcodereview.appspot.com/10834033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148777 0039d316-1c4b-4281-b951-d872f2087c98