summaryrefslogtreecommitdiffstats
path: root/media/filters/null_audio_renderer.cc
Commit message (Collapse)AuthorAgeFilesLines
* FBTF: Remove unneeded headers from base/ (part 9)thestig@chromium.org2010-11-201-0/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5091005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66873 0039d316-1c4b-4281-b951-d872f2087c98
* Terminate FilterFactory and his nasty friendshclam@chromium.org2010-10-231-9/+0
| | | | | | | | | | | | | FilterFactory, IsMediaFormatSupported and CreateFactory are the source of evil. They also have have a gang of template functions. This patch terminate them all and make the world a better place. BUG=28207 TEST=<video> runs Review URL: http://codereview.chromium.org/3878001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63609 0039d316-1c4b-4281-b951-d872f2087c98
* Add AudioBuffersState struct. Use it for audio synchronization.sergeyu@chromium.org2010-09-291-1/+2
| | | | | | | | | | | | | The new AudioBuffersState contains current state of the audio buffers. This object is passed all the way from the device to the audio renderer. Audio renderer uses this information to synchronize audio. BUG=52196,49110 TEST=see repro steps for 51637 and 52196. Review URL: http://codereview.chromium.org/3444017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60891 0039d316-1c4b-4281-b951-d872f2087c98
* Make MediaFilter::Stop() asynchronous.boliu@chromium.org2010-06-111-2/+2
| | | | | | | | | | | | | | This is the second issue regarding making Stop() asynchronous. All Stop() in subclasses of MediaFilter is made to accept a callback and runs the callback at the end of its stop. BUG=16059 TEST=media_unittest, unit_tests, test_shell_tests still passes Review URL: http://codereview.chromium.org/2541003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49548 0039d316-1c4b-4281-b951-d872f2087c98
* Turn NULL used as int to 0.phajdan.jr@chromium.org2009-10-131-2/+2
| | | | | | | | | | | | | (Excluding chrome/browser/...) Landing patch for Jacob Mandelson. Original review: http://codereview.chromium.org/195067 BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/267076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28810 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-2/+2
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-2/+2
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* Replace the guts of AudioRendererBase with calls to scaling algorithm.kylep@chromium.org2009-08-011-9/+3
| | | | | | | | BUG=16011 TEST=audio_renderer_base_unittest.cc and buffer_queue_unittest.cc Review URL: http://codereview.chromium.org/155695 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22237 0039d316-1c4b-4281-b951-d872f2087c98
* Since the introduction of PushSource, there are two buffering layers in thehclam@chromium.org2009-06-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | browser process, the hardware buffer used in AudioOutputStream and transportation buffer in PushSource. Together with the latency in the IPC audio layer we have a serious AV sync problem. To compensate the delay and latency introduced by these three factors two parameters are added in RequestAudioPacket message that include the buffer fill level and timestamp of the request. These two parameters are used to determine the playback delay to be used by the audio renderer to update the pipeline with the time delta. So we have three parameters we need to care about: 1. Hardware buffer in AudioOutputStream 2. Buffered data in PushSource 3. IPC latency We have accurate values for 2 and 3 but not 1. We currently don't have the API in AudioOutputStream to query the remaining buffer in the hardware buffer. But usually there is a large amount of data in it, e.g. on Windows 400ms worth of data. Since we now detached the hardware buffer request of OnMoreData() from the actual packet request of IPC (by the introduction of PushSource), it is really critical to know the buffer level in the hardware. I made a guess of this buffer level by using the amount of last buffer copy. Review URL: http://codereview.chromium.org/122020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18536 0039d316-1c4b-4281-b951-d872f2087c98
* Change NullAudioRenderer to sleep for at least one millisecond to avoid ↵scherkus@chromium.org2009-05-061-1/+5
| | | | | | | | spinning the CPU. Review URL: http://codereview.chromium.org/108041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15356 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bug where NullAudioRenderer would join a previously joined thread.scherkus@chromium.org2009-04-291-1/+3
| | | | | | | | TBR=hclam Review URL: http://codereview.chromium.org/100135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14809 0039d316-1c4b-4281-b951-d872f2087c98
* Prototype audio time shift.fbarchard@chromium.org2009-04-231-1/+1
| | | | | | Review URL: http://codereview.chromium.org/92007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14366 0039d316-1c4b-4281-b951-d872f2087c98
* Lots of files touched for a very simple change. Everywhere we used a const ↵scherkus@chromium.org2009-03-261-2/+2
| | | | | | | | | | MediaFormat* we now use a const MediaFormat&. This makes for simpler code and for better pointer reference safety. Review URL: http://codereview.chromium.org/42635 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12623 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored AudioRendererImpl and NullAudioRenderer into a new base class ↵scherkus@chromium.org2009-02-241-85/+44
| | | | | | | | | | | | AudioRendererBase. AudioRendererBase handles the threaded queueing of audio data and provides simplified interfaces and methods for subclasses. As the saying goes, "threads are hard" so reducing the amount of multi-threaded code people have to write is always a good thing. Review URL: http://codereview.chromium.org/28042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10309 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed NullAudioRenderer gcc break due to not including <cmath>.scherkus@chromium.org2009-02-131-0/+2
| | | | | | | | TBR=erikkay Review URL: http://codereview.chromium.org/20367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9782 0039d316-1c4b-4281-b951-d872f2087c98
* Checking in media::NullAudioRenderer, the equivalent of decoding to /dev/null.scherkus@chromium.org2009-02-131-0/+132
NullAudioRenderer effectively uses an extra thread to "throw away" the audio data at a rate resembling normal playback speed. NullAudioRenderer can also be used in situations where the client has no audio device or we haven't written an audio implementation for a particular platform yet. It supports any type of MediaFormat as long as the mime type has been set to audio/x-uncompressed. Playback rate is also supported and NullAudioRenderer will slow down and speed up accordingly. Review URL: http://codereview.chromium.org/20339 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9780 0039d316-1c4b-4281-b951-d872f2087c98