1817 Commits

Author SHA1 Message Date
James Dong
65c83b906d Merge "Refactor Stagefright::StartMPEG4Recording()" into gingerbread 2010-07-01 14:11:01 -07:00
Eric Laurent
a0c2b53966 Merge "Fix issue 2811538: System server crash when disconnecting BT headset after using SCO off call." into gingerbread 2010-07-01 11:54:00 -07:00
James Dong
7b06de6d5a Refactor Stagefright::StartMPEG4Recording()
- Also, better error handling

Change-Id: Ic18d08dc6489adf92c6a588efa4baca66429b175
2010-07-01 10:28:38 -07:00
Andreas Huber
45bac57aa0 Support for writing the extracted data to an .mp4 file in the stagefright commandline tool.
Change-Id: I972324a8fc9757e6e8116b0270ec0882106f8733
2010-07-01 09:08:38 -07:00
Chih-Chung Chang
09b9005769 Add multiple camera support for in MediaProfiles.
Change-Id: Ie89568a0f5f5fd08ede77e33f9a559215d6bed9a
2010-07-01 10:57:15 +08:00
Eric Laurent
e2dd8c4592 Fix issue 2811538: System server crash when disconnecting BT headset after using SCO off call.
Problem:
When the bluetooth device is removed, the AudioService clears all active SCO connections
and unlinks from the client application's binder interface death.
The problem is that the unlinking is done even if no more connections are active for a given client,
which throws a runtime exception that is not catched causing the system server to crash.

The fix consists in calling unlinkToDeath() in ScoClient.clearCount() only if the number of
active SCO connections for this client is not 0. The NoSuchElementException exception is also
catched when calling unlinkToDeath()

Change-Id: I29a28fcce1a579217cea271956a55778e05d3e37
2010-06-30 19:41:56 -07:00
Andreas Huber
c543a21a40 Support for vanilla YUV420sp => RGB565 color conversion.
Change-Id: I22e5b554909e169eaf153d1f25b636f6f04a1871
2010-06-30 10:32:39 -07:00
James Dong
c0ab2a6458 Added encoding parameters set up for H263 video encoder
Also:
- Allowed start() call when encoder already starts and stop() call when encoder has not started yet
- Handled default value for audio/video sources/encoders and file output format

Change-Id: I03b2f7d3cf570baa0fd011a8c0ad200f2f2a5da1
2010-06-29 16:44:19 -07:00
Andreas Huber
8ef64c9606 Add qcom's new OMX components to the list.
Change-Id: Ic8d261aaa5b15c1be7e6d57aee6be51cecb10bb1
2010-06-29 11:38:41 -07:00
James Dong
d4760c243f Collect statistical data from authoring engine (second part)
- added sample duration to the statistcal log messages.
- fixed the bug on miscalcuting the average frame rate.

- also fixed an issue where both frame and time progress status notifications
  are sent out even though only one of them is explicitly requsted.

Change-Id: Ib86f15a85fad3dbeabde120c3c782b79c16da46c
2010-06-28 17:09:51 -07:00
James Dong
fe1bafecde Separate MediaRecorderClient with MediaPlayerClient
- An alternative would be to define a common base class that
  both MediaRecorderClient and MediaPlayerClient can derive.
  But since the common code, onTransact() and notify() uses
  some Binder code, having a common base class may not gain
  us too much in terms of code reuse.

Change-Id: Ibc06720278ad173fceacff3d267b7060856c6316
2010-06-28 15:32:26 -07:00
James Dong
09936ed192 Provide progress status report during authoring
- Track either the number of A/V frames authored, or the time elapsed
- Track the completion of the authoring
- Add multiple camera support for authoring by accepting a camera id parameter
- Set file type based on the OUTPUT_FORMAT requested

Change-Id: I0f9d31b3b7a8fa43eb53f572410fb0ebd4fa0bb7
2010-06-25 16:20:42 -07:00
Eric Laurent
8e103da1f1 Merge "Various fixes and improvements in audio effects implementation" into gingerbread 2010-06-25 12:35:30 -07:00
Eric Laurent
53334cdb81 Various fixes and improvements in audio effects implementation
Effect API:
- Use different definitions for audio device, channels, formats... in AudioSystem and EffectApi:
  Removed media/AudioCommon.h file created for initial version of EffectApi
- Indicate audio session and output ID to effect library when calling EffectCreate(). Session ID can be useful to optimize
the implementation of effect chains in the same audio session. Output ID can be used for effects implemented in audio hardware.
- Renamed EffectQueryNext() function to EffectQueryEffect() and changed operating mode:
  now an index is passed for the queried effect instead of implicitly querying the next one.
- Added CPU load and memory usage indication in effects descriptor
- Added flags and commands to indicate changes in audio mode (ring tone, in call...) to effect engine
- Added flag to indicate hardware accelerated effect implementation.
- Renamed EffectFactoryApi.h to EffectsFactoryApi.h for consistency with EffectsFactory.c/h

Effect libraries:
- Reflected changes in Effect API
- Several fixes in reverb implementation
- Added build option TEST_EFFECT_LIBRARIES in makefile to prepare integration of actual effect library.
- Replaced pointer by integer identifier for library handle returned by effects factory

Audio effect framework:
- Added support for audio session -1 in preparation of output stage effects configuration.
- Reflected changes in Effect API
- Removed volume ramp up/down when effect is inserted/removed: this has to be taken care of by effect engines.
- Added some overflow verification on indexes used for deferred parameter updates via shared memory
- Added hardcoded CPU and memory limit check when creating a new effect instance

Change-Id: I43fee5182ee201384ea3479af6d0acb95092901d
2010-06-25 11:59:35 -07:00
Andreas Huber
357f8209f3 Merge "Finetune some of the prefetcher parameters to a) buffer as much as froyo did b) ensure that keepalives actually trigger a network read instead of just draining internal buffers" into gingerbread 2010-06-25 11:03:42 -07:00
Andreas Huber
909a8cf62c Finetune some of the prefetcher parameters to a) buffer as much as froyo did b) ensure that keepalives actually trigger a network read instead of just draining internal buffers
Change-Id: Iaedfb5645e3052a63789244c90900573f8449bac
2010-06-25 10:44:24 -07:00
James Dong
6feaa46496 Enable passing parameters to the MediaWriter at runtime (at start() call).
- estimate the moov box size for mp4 file writer based on the file
  size/duration limit and target bit rate.
- can switch to use 64 bit file offset at runtime

rebased

Change-Id: Ibbe1f57e91ab2605820d5d96e8048d11e5559c53
2010-06-25 10:24:35 -07:00
James Dong
5a905ceb06 Merge "Track maximum amplitude and fix getMaxAmplitude()" into gingerbread 2010-06-25 09:43:14 -07:00
James Dong
57e7f83c03 Track maximum amplitude and fix getMaxAmplitude()
- only start to track the max amplitude after the first call to getMaxAmplitude()

Change-Id: I64d3d9ca0542202a8535a211425e8bccceca50fc
2010-06-24 21:59:25 -07:00
Andreas Huber
7b5b27ada1 Merge "Properly identify malformed (too short) chunks in mpeg4 files." into gingerbread 2010-06-24 13:14:38 -07:00
Andreas Huber
736c22d3e0 Properly identify malformed (too short) chunks in mpeg4 files.
Change-Id: Id2efb1bba195c4ad6f132cd706cc813135ead8a4
2010-06-24 12:16:25 -07:00
James Dong
7fd22aab45 Merge "Fixed the software AAC encoder" into gingerbread 2010-06-24 09:46:48 -07:00
Andreas Huber
a2549bb644 Merge "Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright." into gingerbread 2010-06-24 09:05:08 -07:00
James Dong
438e4f62ad Fixed the software AAC encoder
Make sure that each input frame contains at least 1024 samples, as
required by the AAC encoder, and fix the incorrect timestamp.

Change-Id: I344cafe8c89be51d6e64552fab70539990ff6049
2010-06-23 17:12:11 -07:00
Andreas Huber
8d65dd2653 Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright.
Change-Id: Ieafe75a4550c273ad59b4518d7cd4c0fce0f7cce
related-to-bug: 2370115
2010-06-23 16:40:57 -07:00
James Dong
9afc1b3ed3 Merge "Fixed some meta data issues in the recorded mp4 file" into gingerbread 2010-06-23 15:13:55 -07:00
James Dong
39a0b21c65 Fixed some meta data issues in the recorded mp4 file
- Mainly correcting the location of stbl box which should be a child of minf box.
  This resolved the issue where the mis-muxed encoded file could not be played by QT/VLC.

- Enabled the the recorded tracks by setting the flags to 0x07 by default

- Allows for encoding either 32-bit or 64-bit offsets. By default encoding
  32-bit offsets to reduce the metadata overhead

- Fixed a edts box issue where an empty elst box was used at the end

Change-Id: I570621a26714a81dc9400271aa5d3a07b483172f
2010-06-23 14:09:18 -07:00
Andreas Huber
58e9402b12 Merge "Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cpp" into gingerbread 2010-06-23 13:14:16 -07:00
Andreas Huber
fb41d59595 Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cpp
Change-Id: I863651619f84b2b66e9a926ce1fef8ce6a53a42d
related-to-bug: 2639116
2010-06-23 11:33:43 -07:00
Andreas Huber
b64af9a221 Fix a number of timestamp mismatches in the mp3 extractor and decoder that would lead to invalid reporting of the current playback time for mono and/or non-44100 kHz mp3s.
Change-Id: I11abc05b62a958ffbc99ca997cd184a2f2199352
related-to-bug: 2667479
2010-06-23 11:11:58 -07:00
Eric Laurent
2c2ce8e53f Merge "Added support for audio sessions in MediaPlayer and AudioTrack." into gingerbread 2010-06-22 18:29:57 -07:00
Chia-chi Yeh
3238302b18 Merge "media: add AudioRecord::getMinFrameCount()." into gingerbread 2010-06-22 17:20:44 -07:00
Eric Laurent
619346f902 Added support for audio sessions in MediaPlayer and AudioTrack.
Audio sessions are used to associate audio effects to particular instances (or groups) of MediaPlayers or AudioTracks.

Change-Id: Ib94eec43241cfcb416590f435ddce7ab39a07640
2010-06-22 17:14:04 -07:00
Eric Laurent
d1559d6b2d Merge "Fix issue 2301630: Mismatch of state occurs when media server is killed while in-call." into gingerbread 2010-06-22 17:08:55 -07:00
Chia-chi Yeh
97d61f7518 media: add AudioRecord::getMinFrameCount().
Change-Id: I952071ab10aa49aa96b727d157b68470d69fff3d
2010-06-23 08:01:04 +08:00
Eric Laurent
3c652ca5a5 Fix issue 2301630: Mismatch of state occurs when media server is killed while in-call.
Use setParameters() API to indicate to audio HAL that we are restarting the media server after a crash.
The use made by audio HAL implementation of this indication is platform specific.

Change-Id: I085b174fa1474575da0e4d295921079b6b68efb8
2010-06-22 16:53:47 -07:00
James Dong
b54a917842 Single track optimization
We don't need to do interleave when the total number of tracks to be recorded is one.
Metadata-wise, we only need to have one chunk in chunk offset table, and a
single entry in the stsc table.

Change-Id: I46f0e4b3860620311e7a91b68a9067acaa137bb2
2010-06-22 11:27:37 -07:00
Andreas Huber
ef1c48d6a9 Merge "Make the prefetcher read packets from the network after a keep-alive timeout expires regardless of whether its currently actively fetching data or not." into gingerbread 2010-06-22 10:11:15 -07:00
James Dong
e5671bfe51 Merge "Audio/video sync during recording (second part)" into gingerbread 2010-06-22 10:05:02 -07:00
Andreas Huber
a486754053 Make the prefetcher read packets from the network after a keep-alive timeout expires regardless of whether its currently actively fetching data or not.
Change-Id: I7d022ac494e1cecdd7f656806b7ed45979c02840
2010-06-22 09:54:58 -07:00
James Dong
875500b47a Merge "AmrInputStream refresh: eliminate the dependency upon OpenCore's code" into gingerbread 2010-06-21 17:35:27 -07:00
James Dong
36e573bf7d Audio/video sync during recording (second part)
Change-Id: Iba0b35f57fdeac7ee1da16899406bf4b957a2c8c
2010-06-21 17:34:01 -07:00
Chia-chi Yeh
2ce999fce7 am bd240c27: media: add AudioTrack::getMinFrameCount().
Merge commit 'bd240c2737913d6ed1982788699f93bbc52330c0' into gingerbread

* commit 'bd240c2737913d6ed1982788699f93bbc52330c0':
  media: add AudioTrack::getMinFrameCount().
2010-06-21 08:54:19 -07:00
Chia-chi Yeh
bd240c2737 media: add AudioTrack::getMinFrameCount().
Change-Id: If15162583d1d16d89f59be0793106afe77417f35
2010-06-21 09:51:18 +08:00
James Dong
49b6fbaebd AmrInputStream refresh: eliminate the dependency upon OpenCore's code
Change-Id: I0e66bc0a16fcdcf70136012ae1cd4138506cc94b
2010-06-18 18:56:54 -07:00
Dave Sparks
f3c6c982f6 am 3242cc27: Merge "TimedEventQueue is apparently important for glitch-free media playback, and so having it inherit its priority from the thread that created it is a bad idea. Instead, set the priority explicitly, and bump it to slightly higher than normal." into fro
Merge commit '3242cc2719a4aeb64ac5ed273cf222d8d326d44b' into gingerbread

* commit '3242cc2719a4aeb64ac5ed273cf222d8d326d44b':
  TimedEventQueue is apparently important for glitch-free media playback, and so
2010-06-17 12:37:15 -07:00
James Dong
42a18c09e7 Check and clip some video encoding parameters against media profiles before passing them to video encoder
Change-Id: I69e0e7411806a4ece6c0bf0e02c74eaaf48a17ac
2010-06-17 11:34:10 -07:00
James Dong
cd677a3085 Merge "Remove hard-coded number of audio channels in AudioSource" into gingerbread 2010-06-17 11:25:19 -07:00
Marco Nelissen
cad5726e3a TimedEventQueue is apparently important for glitch-free media playback, and so
having it inherit its priority from the thread that created it is a bad idea.
Instead, set the priority explicitly, and bump it to slightly higher than normal.

Change-Id: I01843f24905790ce2e2cde5d11a99346cfbf968d
2010-06-16 11:09:01 -07:00
James Dong
d77d2a980c Remove hard-coded number of audio channels in AudioSource
Change-Id: I5f362252c25e2251bbfa9818b711ee23b4975248
2010-06-14 17:45:35 -07:00