summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/AudioSource.cpp
Commit message (Collapse)AuthorAgeFilesLines
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-2/+2
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* A/V synchronization at the beginning of a recording sessionJames Dong2011-02-171-1/+14
| | | | | | | | | | | | | o do not use edts/elst boxes since these optional boxes are ignored o manipulate the first video/audio frame duration to make sure that the rest of the audio/video is in sync (ideally, we should only manipulate the vidoe frame duration, not the audio) o reduce the initial audio mute/suppression period, which is used to eliminate the "recording" sound. bug - 3405882 and 3362703 Change-Id: Ib0acfb4f3843b365157288951dc122b006299c18
* Decouple AudioRecord read and audio encodingJames Dong2011-02-161-128/+145
| | | | | | bug - 3313754 Change-Id: I951dd0e21e34aa1412c391f003bc32103d0424b0
* Catch read error from AudioRecord and do not assertJames Dong2011-02-091-4/+3
| | | | | | bug - 3439313 Change-Id: Ie29d6e4945978ef27fc3e5849e467d895c7736d3
* Report errors to applications if AudioRecord->start() failsJames Dong2011-01-251-1/+4
| | | | | | bug - 3385198 Change-Id: I86ac8071eb28a538b333e102192193d1b9eda5eb
* Revert "Allows the authoring engine to skip frame."James Dong2010-12-111-45/+1
| | | | | | | | | | | | | | o Skipping frames could lead to a lot of issues such as I frames is lost etc. It is not being used anyway. This reverts commit 53d4e0d58e2d5c18f6e026c705af833b9bdd7aba. Conflicts: media/libstagefright/AudioSource.cpp media/libstagefright/CameraSource.cpp Change-Id: I3abba1647de48db25bdc369066eb2a7ae4dedec2
* Fix audio input sample timestamp when audio driver loses audio samplesJames Dong2010-09-141-1/+4
| | | | Change-Id: Ic0f1489f710929af50e7714867ae5153b3242dd8
* HW audio encoder expects timestamp via kKeyTime from each input bufferJames Dong2010-09-081-1/+3
| | | | | | - This fixes media server crashes on droid Change-Id: I7191cadc5275107425ec3ee3d437b2c5295858dc
* Calculate audio media drift time from AudioSourceJames Dong2010-09-011-3/+12
| | | | | | | | | | | | | | | | | | | The problem was that the time to receive an output buffer from an audio encoder is different because the encoder does not need to read from the source for all output buffers. This leads to large fluctuation in terms of wall clock duration between two neighboring audio sample outputs from the audio encoder. As a result, the media time for the video track after adjustment using the drifting changes wildly sometimes. This patch addresses this issue by only updating the media drift time when an audio source input buffer is read. the wall clock for the audio track is also calculated at the same time when the input audio buffer is read at AudioSource. bug - 2959800 Change-Id: I3174aa182f744784b540f0a7198524d4eee8bd7b
* Make sure that if initialization fails, AudioSource still behaves well.James Dong2010-09-011-4/+17
| | | | Change-Id: I16dfc90bcb8a324d6ee9a38a5a1a31cc094c820a
* Suppress the video recording start signalJames Dong2010-08-261-0/+46
| | | | | | - bug 2950297 Change-Id: I0044d07178691feb904cf81e87c1b6d4b714dc1a
* Handle large audio lostJames Dong2010-08-101-9/+17
| | | | Change-Id: I2687ad855aac758946954d0b3fe7aff9f7b5ae7c
* Add lost frame handling in AudioSourceJames Dong2010-07-301-45/+92
| | | | | | - Also collect stats on lost audio frames instead of time spent on reading Change-Id: I6380b143e4fbdcd894491aaae523331e90d0f04f
* Allows the authoring engine to skip frame.James Dong2010-07-221-36/+59
| | | | | | | | | | | This is 1st part of the work to allow audio and video resync if we found out that audio and video are out of sync during authoring - also fixed a problem in AACEncoder::read() where the buffer acquired from the buffer group does not release when error out at reading from source. Change-Id: I8a2740097fcfdf85e6178869afeb9f3687a99118
* Track maximum amplitude and fix getMaxAmplitude()James Dong2010-06-241-0/+29
| | | | | | - only start to track the max amplitude after the first call to getMaxAmplitude() Change-Id: I64d3d9ca0542202a8535a211425e8bccceca50fc
* Audio/video sync during recording (second part)James Dong2010-06-211-10/+23
| | | | Change-Id: Iba0b35f57fdeac7ee1da16899406bf4b957a2c8c
* Remove hard-coded number of audio channels in AudioSourceJames Dong2010-06-141-4/+14
| | | | Change-Id: I5f362252c25e2251bbfa9818b711ee23b4975248
* Initial checkin for pause and resume controlJames Dong2010-06-111-4/+6
| | | | Change-Id: Ibdcf7bea5fb66baa81878704ba4091dfcfe382ee
* Initial check-in for collecting stats from authoring engine at runtimeJames Dong2010-06-081-1/+34
| | | | Change-Id: I93a9d8bd260efc5e7fc135b726e3f1307c6df794
* Support AAC recordingJames Dong2010-05-031-0/+4
| | | | | | | | - Extend the audio recording to AAC format - Add support for setting some recording parameters - Add stss box to the meta data in the recorded file Change-Id: I41167bfd9d70ef9cd33906f8437b39c232b6d3b7
* Initial checkin of AudioSource and AMRWriter, a pair of classes supporting ↵Andreas Huber2010-01-251-0/+122
pure-audio recording in stagefright. related-to-bug: 2295449