summaryrefslogtreecommitdiffstats
path: root/media/audio/openbsd
Commit message (Collapse)AuthorAgeFilesLines
* Move media/audio files into media namespace (relanding)vrk@google.com2012-04-032-0/+8
| | | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests TBR=scherkus,jam Review URL: https://chromiumcodereview.appspot.com/9968054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130288 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 130180 - Move media/audio files into media namespacevrk@google.com2012-04-022-8/+0
| | | | | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 TBR=vrk@google.com Review URL: https://chromiumcodereview.appspot.com/9965076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130182 0039d316-1c4b-4281-b951-d872f2087c98
* Move media/audio files into media namespacevrk@google.com2012-04-022-0/+8
| | | | | | | | | BUG=115187 TEST=compiles and runs without breaking audio tag; media_unittests, content_unittests Review URL: https://chromiumcodereview.appspot.com/9805001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130180 0039d316-1c4b-4281-b951-d872f2087c98
* sync the openbsd audio code with linuxrobert.nagy@gmail.com2012-03-221-4/+0
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/9816012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128246 0039d316-1c4b-4281-b951-d872f2087c98
* Stopping the audio thread before destroying the AudioManager<Platform>.xians@chromium.org2012-03-141-9/+1
| | | | | | | | | | | | | The destruction of the AudioManager family happens in order of: AudioManager<Platform>, AudioManagerBase, AudioManager. So before getting into the destruction of AudioManagerBase, we have make sure the audio thread has been stopped before AudioManager<Platform> is gone, otherwise it will end up into unexpected behavior, for example, crash because of pure virtual function. BUG=117470 TEST=media_unittests, Address Sanitizer Review URL: http://codereview.chromium.org/9692038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126635 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the implementations of ReleaseOutputStream() and ReleaseInputStream() ↵xians@chromium.org2012-03-072-56/+54
| | | | | | | | | | | | | | | to AudioManagerBase and let all the AudioManagerPlatforms inherit the same implementations. Also moved the MakeAudioOutputStream() and MakeAudioInputStream() to AudioManagerBase, separate the AUDIO_PCM_LINEAR mode and AUDIO_PCM_LOW_LATENCY mode into two different functions inside the AudioManagerPlatforms. So that the structure is clearer and also easier to deprecate the AUDIO_PCM_LINEAR for the future. Made the destructor of the AudioManagerPlatforms protected so it can be called by only the AudioManagerBase. BUG=116064 TEST=media_unittests Review URL: http://codereview.chromium.org/9570014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125389 0039d316-1c4b-4281-b951-d872f2087c98
* Make linux output streams consistent with other output stream implementations.tommi@chromium.org2011-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | This include the following changes: * The implementation of Start() for ALSA was implemented "asynchronously" on the audio thread. This isn't necessary since Start() is already called on the audio thread and when it eventually runs, it would block the audio thread anyway. Also, the OnPlaying() notification could be fired before the stream is actually at the 'playing' state, which is not consistent with other implementations. * The pulse and alsa output stream classes use the message loop that the AudioManager owns - not a separate pointer. In practice this only removes a member variable but the message loop being used previously belonged to the AudioManager anyaway. * Close is now synchronous like it is in other implementations. * Updated documentation. This also simplifies the threading model for these classes and they are now (like the other stream classes) for all intents and purposes, single threaded. Background: We're working on making more of our tests work across all supported platforms. We identified this problem with these particular implementations when running tests that previously only ran for other platforms. Review URL: http://codereview.chromium.org/8930006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114415 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the AudioManager singleton.tommi@chromium.org2011-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unit tests now instantiate their own AudioManager and can choose to use the default one or provide their own mock implementation without having to worry about conflicting with the singleton. The teardown sequence of the AudioManager and its thread has been cleaned up significantly and I don't think it has been completely tested before as the audio thread was terminated before all objects that belonged to the thread had a chance to do cleanup. The AudioManager unit tests do not use the actual audio thread, so this part seems to have been left out. In Chrome, the AudioManager instance is now owned by BrowserProcessImpl and always constructed on the UI thread. This instance is then shared in the same way that several other 'manager' type objects are shared to 'content' code, via content::ResourceContext. Audio specific classes do though receive a direct pointer to the AudioManager and are required to do proper reference counting if they need to hold onto the instance. I chose to use the ResourceContext rather than direct use of g_browser_process to avoid requiring another singleton when writing relatively simple tests that touch the AudioManager. I added a couple of safeguards to guard against future regressions: - Not more than one instance of the AudioManager should be created. - The AudioManager should not be addrefed by its own thread. This can basically become a circular reference and prevent deterministic shutdown. Reviewers: Of course you're free to review everything, but here's the breakdown in terms of the bare minimum from the standpoint of "Owners approval". I'm asking Henrik to be the main reviewer of the entire patch (sorry!). Henrik: Everything minus the below, but it would be great if you could take a look at the whole thing, specifically media/audio. Pawel: I'd like you to take a generic look at this approach. The key areas as far as the singleton itself goes are in media/audio/audio_manager[_base].* and chrome/browser/browser_process*.* Satish: content/browser/speech/* media/audio/audio_manager_base.* (new reference counting code) Andrew: content/browser/renderer_host/media/* content/renderer/media/webrtc_audio_device_unittest.cc (Owner) Avi: content/browser/renderer_host/render_process_host_impl.cc content/browser/resource_context.* William: chrome/browser/profiles/profile_io_data.cc chrome/browser/browser_process*.* Robert: This is basically a heads up. I hope that I didn't break the OpenBSD implementation, but unfortunately I have no way of knowing for sure. Shijing: Please take a look at AudioManagerLinux. I replaced the set of active streams with a simple counter. BUG=105249 TEST=content_unittests, media_unittests, browser_tests. Review URL: http://codereview.chromium.org/8818012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114084 0039d316-1c4b-4281-b951-d872f2087c98
* enable the device selection for openbsd too to be in sync with linuxrobert.nagy@gmail.com2011-11-232-3/+3
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8681005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111448 0039d316-1c4b-4281-b951-d872f2087c98
* Make pulseaudio available for all posix platforms and add support on OpenBSD.scherkus@chromium.org2011-11-182-13/+94
| | | | | | | | | This time without breaking the windows build! Patch by robert.nagy@gmail.com: http://codereview.chromium.org/8499029/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110629 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110584 - Make pulseaudio available for all posix platforms and add ↵scherkus@chromium.org2011-11-172-94/+13
| | | | | | | | | | | | support on OpenBSD. Patch by robert.nagy@gmail.com: http://codereview.chromium.org/8499029/ TBR=scherkus@chromium.org Review URL: http://codereview.chromium.org/8590045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110590 0039d316-1c4b-4281-b951-d872f2087c98
* Make pulseaudio available for all posix platforms and add support on OpenBSD.scherkus@chromium.org2011-11-172-13/+94
| | | | | | | Patch by robert.nagy@gmail.com: http://codereview.chromium.org/8499029/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110584 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD patches for media, split from CR #8275005robert.nagy@gmail.com2011-10-202-15/+3
| | | | | | | | | | | | | Sync the dummy OpenBSD audio manager and exclude -mssse3 from cflags on OpenBSD since it's not supported in the used gcc version. BUG= TEST= Review URL: http://codereview.chromium.org/8329024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106590 0039d316-1c4b-4281-b951-d872f2087c98
* Add a method to the audio manager to find out if recording is currently ↵leandrogracia@chromium.org2011-10-132-7/+14
| | | | | | | | | | | | | | | active in Chrome. Adding also missing OVERRIDEs in the affected files. BUG=97388 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105333 Review URL: http://codereview.chromium.org/8208013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105337 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 105333: OVERRIDE failures on asan - Add a method to the audio manager ↵erg@google.com2011-10-132-14/+7
| | | | | | | | | | | | | | | | to find out if recording is currently active in Chrome. Adding also missing OVERRIDEs in the affected files. BUG=97388 TEST=none Review URL: http://codereview.chromium.org/8208013 TBR=leandrogracia@chromium.org Review URL: http://codereview.chromium.org/8276008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105335 0039d316-1c4b-4281-b951-d872f2087c98
* Add a method to the audio manager to find out if recording is currently ↵leandrogracia@chromium.org2011-10-132-7/+14
| | | | | | | | | | | | | active in Chrome. Adding also missing OVERRIDEs in the affected files. BUG=97388 TEST=none Review URL: http://codereview.chromium.org/8208013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105333 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Pass parameters by reference.jhawkins@chromium.org2011-06-222-4/+6
| | | | | | | | | | | | | CID=13686,13687,13688,13709,13710,13711,13712,13713,13714,13718,13715,13716, 13717,13796,13797,13798,13811,13812,13813,14708,16329 BUG=none TEST=none R=vandebo@chromium.org Review URL: http://codereview.chromium.org/7218031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90112 0039d316-1c4b-4281-b951-d872f2087c98
* Cleaning up src/media to be consistent with static versus anonymous namespaces.scherkus@chromium.org2011-03-071-4/+2
| | | | | | | | | | | | | We were using a mix of both (and sometimes even static functions *inside* anonymous namespaces!) so we decided to stick to using static. Also moved static/test code into media namespace and removed media:: prefixes. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6628020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77135 0039d316-1c4b-4281-b951-d872f2087c98
* Simplified AudioOutputStream interface.sergeyu@chromium.org2010-11-112-4/+2
| | | | | | | | | | | | | 1. Removed packet_size parameter from Open(). 2. Removed OnClose() from the callback. Now the callback is guaranteed to be called only between Start() and Stop(). 3. Added samples_per_packet in the AudioParameters struct. BUG=39825 TEST=Unittests Review URL: http://codereview.chromium.org/4661001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65766 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed OpenBSD build.sergeyu@chromium.org2010-09-022-33/+7
| | | | | | | | | | | Compilation on OpenBSD was broken by previous commits in the audio code. BUG=None TEST=None Review URL: http://codereview.chromium.org/3301007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58276 0039d316-1c4b-4281-b951-d872f2087c98
* Share one thread between all AudioOutputControllers instead of creating one ↵sergeyu@chromium.org2010-08-252-2/+7
| | | | | | | | | | | per stream. TEST=unittests BUG=39825 Review URL: http://codereview.chromium.org/3185022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57392 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 57254 - Share one thread between all AudioOutputControllers instead ↵scherkus@chromium.org2010-08-242-7/+2
| | | | | | | | | | | | | | of creating one per stream. TEST=unittests BUG=39825 Review URL: http://codereview.chromium.org/3185022 TBR=sergeyu@chromium.org Review URL: http://codereview.chromium.org/3192017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57256 0039d316-1c4b-4281-b951-d872f2087c98
* Share one thread between all AudioOutputControllers instead of creating one ↵sergeyu@chromium.org2010-08-242-2/+7
| | | | | | | | | | | per stream. TEST=unittests BUG=39825 Review URL: http://codereview.chromium.org/3185022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57254 0039d316-1c4b-4281-b951-d872f2087c98
* Add recording capability to AudioManager, and implemented on windows using ↵satish@chromium.org2010-07-142-0/+20
| | | | | | | | | | | | | the WaveIn APIs. Implementation for other platforms will follow in future patches. Also includes a unit test. BUG=none TEST=no user visible change yet, just adding audio recording backend. Review URL: http://codereview.chromium.org/2966005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52292 0039d316-1c4b-4281-b951-d872f2087c98
* Rename a header and some methods to make way for subsequent audio recording ↵satish@chromium.org2010-07-122-10/+11
| | | | | | | | | | | | | additions. Renaming audio_output.h to audio_io.h as future patches will add audio recording code to this file. Also renamed a couple of methods to make it clear that these are for audio playback/output and similar methods will be added for audio capture/recording soon. BUG=none TEST=no change in functionality. Review URL: http://codereview.chromium.org/2962006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52125 0039d316-1c4b-4281-b951-d872f2087c98
* - OpenBSD media/audio support stubpvalchev@google.com2010-03-262-0/+91
- FreeBSD has ALSA, add it to media.gyp Review URL: http://codereview.chromium.org/1301003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42699 0039d316-1c4b-4281-b951-d872f2087c98