• Home
  • History
  • Annotate
  • only in /frameworks/av/include/media/
History log of /frameworks/av/include/media/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
96076964863ee6887f0bed9d0f11f424b48ab9b9 01-Nov-2012 Andreas Huber <andih@google.com> Make video encoders' bitrate mode (constant, variable, ...) configurable

through the desired output format. Configure the video encoder to use
constant bitrate mode for WFD.

Change-Id: Id7bd619598153c13448a9c5acd69d80f8a01f333
related-to-bug: 7459597
tagefright/ACodec.h
d7086030fcf731e4bcef6c033cc6418cd04e6b91 10-Oct-2012 Jean-Michel Trivi <jmtrivi@google.com> Support querying active record sources

Add support for querying whether there is currently a recording
underway from the specified audio source.

Bug 7314859

Change-Id: I986b231a10ffd368b08ec2f9c7f348d28eaeb892
udioSystem.h
AudioPolicyService.h
575a5361fc970476cd7979638ee3ac00cc6e5024 03-Oct-2012 Andreas Huber <andih@google.com> Better power savings with wifi display code.

No more polling the encoder for work to do, the encoder instead notifies
if there's activity.

Change-Id: Ia707211b4f5c5a6e6b70d750233d204a2d6bb778
related-to-bug: 7248248
tagefright/MediaCodec.h
af5dd7753e62353411cf0daf3b513c38818e9662 02-Oct-2012 Andreas Huber <andih@google.com> ALooper::GetNowUs() now relies on systemTime instead of gettimeofday.

Change-Id: Ia31eb0940b02581327a8bf51af6df135f9ab6de3
related-to-bug: 7266324
tagefright/AudioSource.h
tagefright/TimeSource.h
0868deae404604b577892413c128d55a2bafc56e 02-Oct-2012 Andreas Huber <andih@google.com> Optionally have SurfaceMediaSource return absolute timestamps

based on systemTime().

Change-Id: I2eff15dd149a4b737d6e7473d1907cf0c80b6b38
related-to-bug: 7266706
tagefright/SurfaceMediaSource.h
0e1d71641624c641a0a1abe4098943f5a42c6f94 01-Oct-2012 Andreas Huber <andih@google.com> Remove double negatives from SurfaceMediaSource

ensure mStarted actually reflects the state of SurfaceMediaSource

Change-Id: I92557896993ad8da23fe6940e997402ad63b8cbc
related-to-bug: 7258622
tagefright/SurfaceMediaSource.h
003d9f71937070791418bf7efc1f7fe1e4c6b821 28-Sep-2012 Glenn Kasten <gkasten@google.com> Enable write side of MonoPipe to be shutdown

Bug: 7253033
Change-Id: Iea8390763b59ffa7a8e2a6b77dd04ea23442698f
baio/MonoPipe.h
96fc6cc65ca93009a759a3a874b82a35771b9714 28-Sep-2012 Andreas Huber <andih@google.com> Various improvements to a cleaner shutdown of the wifi display connection.

Change-Id: Id029a89939e53c2bd1d20e572d3975ec2795c239
related-to-bug: 7247918
tagefright/SurfaceMediaSource.h
cc0f1cfb69ce8b8985fc2c0984847a06a13ad22d 24-Sep-2012 Glenn Kasten <gkasten@google.com> Implement android.media.AudioManager.getProperty()

Bug: 6635041
Change-Id: I3386a4a6c226bc4eceaf65556119e4fb15f73224
udioSystem.h
AudioFlinger.h
207e18540fefbaf530a4fdf506d266f34ddec84f 21-Sep-2012 Andreas Huber <andih@google.com> Remove legacy code and APIs in wifi display related code.

Change-Id: Ia010e7a00534f9356b3247369d0ffd65591d91aa
MediaPlayerService.h
efbb781c15abf8e085f5ab8d39710bd58ea0b6e4 18-Sep-2012 Andreas Huber <andih@google.com> HDCP module binderized

Change-Id: I866768b1e3f3b232f1934a35b65f66befc12f3f6
MediaPlayerService.h
c92bed3a73c06e90217f8f199ca0b517aa7595d2 18-Sep-2012 Andreas Huber <andih@google.com> Now we only support a single client connection

and it cannot be initiated from the local interface address for security
reasons.
Also, there's at most one playback session active at any time, and when
it dies we shutdown the client connection altogether and signal an error
to the listener.

related-to-bug: 7139784
Change-Id: Ia8d02bc994ce9986936947ddda1f2a3dddbf5714
RemoteDisplayClient.h
2637cb172105939052d8a02f4eea693a90549518 14-Sep-2012 James Dong <jdong@google.com> Merge "Allow OMXCodec to specify an output color format for OMX decoder component" into jb-mr1-dev
496238cc7551d414067dcbbb4fe3bd801f205f95 14-Sep-2012 Andreas Huber <andih@google.com> Support IDR requests in wifi display, MediaCodec and ACodec.

Change-Id: I596cf8dd61b63465437f78413186fad2be287244
tagefright/ACodec.h
tagefright/MediaCodec.h
00f41327264fa2e59cc05abaa5c554b2a32938e1 12-Sep-2012 Andreas Huber <andih@google.com> Throttle SurfaceMediaSource.

Change-Id: I214ce60f8d94df9c07041577e34ed1ad5e199fdb
tagefright/SurfaceMediaSource.h
8fa80e3be63ffde5ef029afa713877440856b663 08-Sep-2012 James Dong <jdong@google.com> Allow OMXCodec to specify an output color format for OMX decoder component

The output color format is specified via the meta argument in OMXCodec::Create()

o related-to-bug: 7122195

Change-Id: Id3247686b893af25cc190685201e53ad34b0399c
tagefright/OMXCodec.h
2e5f22e85d177b34e790f832789d03aee438a7db 24-Aug-2012 John Grossman <johngro@google.com> Add a small hook to support gapless in AAH.

Change-Id: Ie07eca6b45142bdd83412ee0e38d732a4c355630
ediaPlayerInterface.h
49c74da132fe42dd4d2066131f8f0e2df301c1dd 06-Sep-2012 Jeff Brown <jeffbrown@google.com> Merge "Update remote display API." into jb-mr1-dev
455d02eca342d8159637af317a5d83219d267812 06-Sep-2012 Jeff Brown <jeffbrown@google.com> Update remote display API.

Renamed disconnect() to dispose() to emphasize the fact that
this method is intended to clean up the IRemoteDisplay
completely, not just temporarily disconnect the current client
(which might be useful someday).

Other minor tweaks.

Change-Id: I1209639eb0cd8af09c724206642d7e52aab48257
RemoteDisplay.h
RemoteDisplayClient.h
9c6cb7a896f41cb8ad2f2ad63f8f6edfbb56ed4f 06-Sep-2012 Marco Nelissen <marcone@google.com> Merge "Fragmented mp4 extractor" into jb-mr1-dev
56997121c5031598fbbba7b7c53980b7fd529c2d 29-Aug-2012 Marco Nelissen <marcone@google.com> Fragmented mp4 extractor

Still experimental. Set property "media.stagefright.use-fragmp4" to true to
enable.

Change-Id: I210b9c5b5164b5c5eefc31309845ee881ac7db8e
tagefright/Utils.h
e104596061b219e9bce6d4db49a9d15242f8d2e5 05-Sep-2012 Jeff Brown <jeffbrown@google.com> Implement remote display service stubs.

Change-Id: I582ed000026bba6d116db8304e15a3c52f8a9a01
MediaPlayerService.h
RemoteDisplay.h
RemoteDisplayClient.h
66e72bc85fb762876baff60ef29de729da93cf26 05-Sep-2012 Andreas Huber <andih@google.com> Configure the SurfaceMediaSource to emit the same number of buffers

as the video encoder allocates for its input. Do this before connecting
the bufferqueue through surface flinger.

Change-Id: Ibc81db1359afe2d88fdb75b23fadae65c8a6f7cc
tagefright/SurfaceMediaSource.h
cd89e8014368af1bbdfa08406d5d2eb0bbbfcca1 31-Aug-2012 Andreas Huber <andih@google.com> Merge "Added an additional virtual method IStreamSource::flags()." into jb-mr1-dev
da7ff5321539ac07ec76d0d03bd1b9b09a1823bf 31-Aug-2012 Andreas Huber <andih@google.com> Added an additional virtual method IStreamSource::flags().

Change-Id: I89e62d84328e12f08c8f73cbfd53cfb42569de97
StreamSource.h
c3ae93f21280859086ae371428ffd32f39e76d50 30-Jul-2012 Glenn Kasten <gkasten@google.com> Update audio comments

Change-Id: Ie7504d0ddb252f7e4d4f99ed0b44cfc7b1049816
udioTrack.h
5dcc2c988eefba1049fe64172bc5fc7e6ee27c8b 31-Aug-2012 Andreas Huber <andih@google.com> Merge "Only run the wifi display RTSP server on demand, and only on the wifi direct" into jb-mr1-dev
b9cba9b731195d4387ee21b7e9ba1137a3cfda68 31-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Move libnbaio out of AudioFlinger" into jb-mr1-dev
bcf09f8c995221e75c7cd328f25c7cc6d2b5f7c9 30-Aug-2012 Andreas Huber <andih@google.com> Only run the wifi display RTSP server on demand, and only on the wifi direct

interface.

Change-Id: I7d3c44cb79cd40e73499f2d7ccf35c69b628e6d7
MediaPlayerService.h
082830f92373a1b9e512dbbfb940187ffa1c2c6f 30-Aug-2012 Andreas Huber <andih@google.com> Prepare for transmitting audio through AudioSource.

AudioSource can now be configured to output buffers timestamped based
on looper time (absolute) instead of based on systemTime() relative to
start time.

Change-Id: I8eca42648eb50033ac4aafbe5daac64a98a40690
tagefright/AudioSource.h
2dd4bdd715f586d4d30cf90cc6fc2bbfbce60fe0 29-Aug-2012 Glenn Kasten <gkasten@google.com> Move libnbaio out of AudioFlinger

libnbaio is now a separate shared library from AudioFlinger, rather
than a static library used only by AudioFlinger.

AudioBufferProvider interface is now also independent of AudioFlinger,
moved to include/media/

Change-Id: I9bb62ffbc38d42a38b0af76e66da5e9ab1e0e21b
udioBufferProvider.h
xtendedAudioBufferProvider.h
baio/AudioBufferProviderSource.h
baio/AudioStreamInSource.h
baio/AudioStreamOutSink.h
baio/LibsndfileSink.h
baio/LibsndfileSource.h
baio/MonoPipe.h
baio/MonoPipeReader.h
baio/NBAIO.h
baio/Pipe.h
baio/PipeReader.h
baio/SourceAudioBufferProvider.h
baio/roundup.h
d8ee4e56f92eeb44ddc0997efe280b9f28ad814d 30-Aug-2012 Andreas Huber <andih@google.com> Merge "Initial checkin of support for acting as a wifi display source" into jb-mr1-dev
d7bee3a9d2ad76d073d91f0ee36d5ac5f9df480c 29-Aug-2012 Andreas Huber <andih@google.com> Initial checkin of support for acting as a wifi display source

Change-Id: I08f17efa0c7d007e17408feb7d4fbef0a19f531a
MediaPlayerService.h
tagefright/ACodec.h
1b19c9d120869c3182373a9b06a1ed98898df882 29-Aug-2012 Andreas Huber <andih@google.com> Preliminary support for HDCP as a binder service for wifi display support.

Change-Id: Ie0de1c086c629a668d1c7863992eef56fb94157c
HDCP.h
1c356d38527efbbee0894188c0a8f82074b0f441 27-Aug-2012 James Dong <jdong@google.com> Merge "Fixed a native crash due to unexpected state at destroy time when encoder component's source fails to start" into jb-mr1-dev
a0ead0a2d2ce1d114ad3a17d755dddce831abb40 24-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceMediaSource: a few fixes / cleanups

- Remove the setting of mStopped to true in onBuffersReleased
- Cleaned up a few function call logs
- Removed the 'reset' method.

Change-Id: I56bab1d5cb2f3e6d59d54698c2e045d796d1849f
tagefright/SurfaceMediaSource.h
aa8879d381918335c9d829fc279b76d53a15a550 24-Aug-2012 James Dong <jdong@google.com> Fixed a native crash due to unexpected state at destroy time when encoder component's source fails to start

o Encoder component initializes to be in the state of EXECUTING before its source gets started, because we wanted to be able
to configure the source to use the advertised number of input buffers. However, if the source fails to start, then the encoder
ends up in the state of EXECUTING when OMXCodec object gets destroyed. As a result, the assertion on the expected state in
OMXCodec's constructor fails. The fix is to stop the video encoder component right way when its source fails to start so to
bring the state of the encoder component back to the expected state.

o related-to-bug: 7045494

Change-Id: I6d4a221eb809d7137f53e58098a04816998f7a25
tagefright/OMXCodec.h
dbcb4c17f16230dfc6af908f176681c49f61b13e 24-Aug-2012 Marco Nelissen <marcone@google.com> Allow directly setting a DataSource for NuMediaExtractor

This adds NuMediaExtractor::setDataSource(const sp<DataSource> &source),
which some new code under frameworks/av will use to let applications
provide a custom data source for extractors.

Change-Id: I8fb743441d04b4eadbda3c2d76858c3d60e2a3b2
tagefright/NuMediaExtractor.h
6a8ea471a9f3b001bd0ffa3381eba12975dfc59f 21-Aug-2012 Glenn Kasten <gkasten@google.com> Merge "Revert "Swap the order of creating IAudioTrack and thread"" into jb-mr1-dev
8ec1f2a4f3c72fe7472f8b8fa227f6b7bbc9279b 06-Aug-2012 John Grossman <johngro@google.com> Move the AAH RTP code out of framework and into vendor.

Relocate the AAH RTP code from framework/av into
vendor/google_devices/phantasm. This change is the deletion, there
will be a separate CL which re-introduces on the vendor side of
things.

Change-Id: Ibe7e6d4b633a3886b87a615691a2692f2382af6c
Signed-off-by: John Grossman <johngro@google.com>
ediaPlayerInterface.h
44a7e42f0310831e6a846d1b6bb40bf3a399bf6d 22-Jun-2012 John Grossman <johngro@google.com> Add the ability to dynamicaly register MediaPlayer types.

Add the ability to dynamically register low level MediaPlayer
factories which will be probed at setDataSource time to determine the
proper MediaPlayerBase to instantiate.

This change is in preparation for moving libaah_rtp out of
frameworks/base and into phantasm platform directory.

Change-Id: Icf8904db3ab9e3c85df6e780d5546d9988cb9076
Signed-off-by: John Grossman <johngro@google.com>
MediaPlayer.h
ediaPlayerInterface.h
b3e12a4d15a329821979bf287c49a9630486e23f 11-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 3ca352c4: am 24893fef: Merge "MPEG2TSWriter: Write a proper CRC in PAT and PMT"

* commit '3ca352c4cd01f6df3b691f835efc68a5771e724e':
MPEG2TSWriter: Write a proper CRC in PAT and PMT
3ca352c4cd01f6df3b691f835efc68a5771e724e 11-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 24893fef: Merge "MPEG2TSWriter: Write a proper CRC in PAT and PMT"

* commit '24893fef8e0f816a8a21749fa3eb9eed9173a0fd':
MPEG2TSWriter: Write a proper CRC in PAT and PMT
24893fef8e0f816a8a21749fa3eb9eed9173a0fd 11-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "MPEG2TSWriter: Write a proper CRC in PAT and PMT"
751fa786aa9599c694219085601f9f5ebe96a516 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 31a593b9: am 2001d2ac: Merge "MPEG2TSWriter: Write proper continuity counters for PAT and PMT"

* commit '31a593b901eeb924ae5214962c628397dd0197f2':
MPEG2TSWriter: Write proper continuity counters for PAT and PMT
31a593b901eeb924ae5214962c628397dd0197f2 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 2001d2ac: Merge "MPEG2TSWriter: Write proper continuity counters for PAT and PMT"

* commit '2001d2ac01e36c13c1abda5f73b6404cba2648e1':
MPEG2TSWriter: Write proper continuity counters for PAT and PMT
2001d2ac01e36c13c1abda5f73b6404cba2648e1 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "MPEG2TSWriter: Write proper continuity counters for PAT and PMT"
e983aa4ff4d80af7702888e230b9aaa93a7b7e57 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 51af4af2: am e28df5b9: Merge "Store correct time stamps in recorded mp4 files"

* commit '51af4af2414cdaaf0185b971a41fc0b4f8c0b7e4':
Store correct time stamps in recorded mp4 files
51af4af2414cdaaf0185b971a41fc0b4f8c0b7e4 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am e28df5b9: Merge "Store correct time stamps in recorded mp4 files"

* commit 'e28df5b996af3480b457c7a9908dbb9d52ad8d7c':
Store correct time stamps in recorded mp4 files
a997e7a7c5aa2fc7e95316218316f8b7b98786ba 07-Aug-2012 Glenn Kasten <gkasten@google.com> Revert "Swap the order of creating IAudioTrack and thread"

This reverts commit 5d464eb0b8cffb994a754ff108795e858a882414.
It caused the wrong thread ID -1 to be passed to IAudioFlinger::createTrack().

Change-Id: Ic221d2bb4af572d3d2d752af19238c52f6728e3a
udioTrack.h
e671207115fac3914134c61b336d5fa0242c68ca 26-Jun-2012 Andreas Huber <andih@google.com> Make sure codec names and corresponding quirks are returned together.

Previously they were returned in separate vectors and only one of them was sorted if
software codecs were preferred, leaving the quirks no longer matching the codec name
at the same index.

Change-Id: Id3f1e6f9f7f8c9cc4b6ebfb86a203b4d59de8604
related-to-bug: 6737884
tagefright/OMXCodec.h
a6ee7bc5f9524c220377e37f6525e2d46c69b75b 07-Aug-2012 James Dong <jdong@google.com> Remove obsolete hack for TI specific code

o related-to-bug: 6566886

Change-Id: I39aad214cbf7b748a95a9d22db50cd8f421931e6
tagefright/OMXCodec.h
a3b71fa5235b758d5f9ea00b9c58fbfd707fb9dd 03-Aug-2012 Marco Nelissen <marcone@google.com> Merge "experimental support for fragmented mp4 playback in nuplayer" into jb-mr1-dev
840667883fd09d44015716d79bc3ac4d60edc0f0 16-Aug-2011 Andreas Huber <andih@google.com> experimental support for fragmented mp4 playback in nuplayer

cherry picked from change 170999

Change-Id: I407775f0290154ad4961134839a15c9f296424c0
tagefright/foundation/hexdump.h
983cf231ab2d176a14595cdae46ff1b0c239af47 02-Aug-2012 James Dong <jdong@google.com> Dynamically configure the number of video buffers used by camera source, if supported

o related-to-bug: 6920805

Change-Id: I413bb50954cc84e32ed40bcb713842dc7b58e2b6
tagefright/CameraSource.h
0dff606f42292b8a31b9eee842877f9875279dab 02-Aug-2012 James Dong <jdong@google.com> Allocate buffers before calling start on its source in OMXCodec::start() for encoder case

o This makes it possible to configure the source to use the same number of input buffers
as requested by the video encoder, before the source starts. As a result, hardcoded
number of video buffers for camera source, for instance, can be avoided.

o related-to-bug: 6920805

Change-Id: I13d2c308dce34967768cd407f02988e92ef10a89
tagefright/MetaData.h
c9729ca1cb1760da836e293e3ed7a82f769f3e07 24-Jul-2012 Insun Kang <insun@google.com> Unifying TimedTextDriver's resume() and start().

(cherry picked from gtv bb23a2b7e06c59f56e353fd4a2a66a9b8179d425)

Change-Id: If5f14549fa315c34e32d6fed7c1ea09deabceb63
tagefright/timedtext/TimedTextDriver.h
bb6bc8491fe819f96e1902e56694715cb110ce94 10-Jul-2012 Insun Kang <insun@google.com> Adds resume() function

o Revived resume() function to fix pause/resume bug. (Bug: 6663740)
o Mannually cherry-picked from GTV change.
(commit: ad1197226d1c6745959f0e469f510ca06f99489f)

Change-Id: I77ac90085fb1f1d2e7eb706642978a4fa4d28b49
tagefright/timedtext/TimedTextDriver.h
5a81ad893eada20c32596be53dabe203b99bec3c 31-Jul-2012 James Dong <jdong@google.com> Allows MediaMetadataRetriever to retrieve video rotation angle

o related-to-bug: 6872687

Change-Id: I34e74b0756f8269edefdf3a25d8806c76fd1e2f8
ediametadataretriever.h
efcdf187baab9ec29e12adcf85e63fe3e6d5aa4d 08-Mar-2012 Johannes Carlsson <johannes.carlsson.x@sonymobile.com> Store correct time stamps in recorded mp4 files

According to the specification (ISO_IEC_14496-12_2008 page 17, 19 and
21) the time is "in seconds since midnight, Jan. 1, 1904, in UTC time"
which is not the same as Unix epoch time. This is already correctly
handled in MPEG4Extractor.cpp when reading files.

The specification also supports 64 bit timestamps which would make
it a bit more future proof, but unfortunately it seems like support
for this in players are poor (tested both Windows media player and
Quicktime player).

Change-Id: I102d728f098b8b0a21013956f017b0c4f2d69112
tagefright/MPEG4Writer.h
5d464eb0b8cffb994a754ff108795e858a882414 23-Jun-2012 Glenn Kasten <gkasten@google.com> Swap the order of creating IAudioTrack and thread

Simplifies the error recovery in case IAudioTrack fails.

Change-Id: I6aee41a2ac747a5689fb4836b04174e6107bf32f
udioTrack.h
0ec23ce0d1ff79566c402bc30df3074f6e25a22b 10-Jul-2012 Glenn Kasten <gkasten@google.com> Clean up start() parameters

Document where int is used instead of AudioSystem::sync_event_t
(probably because of a header file dependency).
TrackBase::start() and RecordTrack::start() don't need default parameters.

Change-Id: I82f4a4d078be900f3aa4bd926697e32f5ed68ec8
AudioRecord.h
58e5aa34f01d663654d8bafad65db1dda42161ff 20-Jun-2012 Glenn Kasten <gkasten@google.com> effect_descriptor_t const correctness

Change-Id: Iad008f20d35a18acf500f773900164552fd0c19e
udioSystem.h
AudioPolicyService.h
c374dae535b83d9b499dd9fe8f9dabdb8b0ac9fd 20-Jul-2012 James Dong <jdong@google.com> Added a callback to signal when the rendering of the video frame just occurred

Change-Id: Ifbd78606ffc33483aecebf02cb18e0e52af9624d
related-to-bug: 6851811
ediaplayer.h
955e78180ac6111c54f50930b0c4c12395e86cf7 21-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord locking

Fix race conditions for EVENT_MARKER and EVENT_NEW_POS callbacks.
Marker and new position update fields are protected by lock.

getSampleRate() doesn't need a lock because it reads from shared memory
control block.

Enforce that the parameter passed with EVENT_MARKER and EVENT_NEW_POS
cannot not be changed by the callback handler, and will not change during
the call by another thread.

Session ID should never change; log if it does.

Change-Id: Ia2c63cf1a71b10bb06c37981bd76437f83fffa91
udioRecord.h
28b76b334f92a15a2be3cc9e2f7d229a3275d1ac 04-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t for channel mask

Change-Id: I1c1896da48983aa9f1462a4b471f910498816f60
udioTrack.h
dcda3b325f465aa6ec2be11db1c56c8a5e867f33 16-Jul-2012 Glenn Kasten <gkasten@google.com> Merge "AudioRecord::stop() return void"
2bdb2f25861f3a3ac9cf3b7af561975fc9b9eead 14-Jul-2012 Edwin Wong <edwinwong@google.com> am 190313ec: am 65e8d62a: Merge "Fixed sample video corrupted in MediaCodec mode." into jb-dev

* commit '190313ec68e81c10d200ff3c20ac152cf90760d6':
Fixed sample video corrupted in MediaCodec mode.
d64cd233eef39430561c1e1df423336a199cc5d7 21-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord::stop() return void

like AudioTrack::stop()

Change-Id: Iab62f4665151345f1ad5874c97a21d1a331f0154
udioRecord.h
68337edf595a0c345ba4b8adcd4f1e541a1d7eb7 12-Jul-2012 Glenn Kasten <gkasten@google.com> AudioRecord client threading cleanup

Rename ClientRecordThread to AudioRecordThread to be more similar to
AudioTrack naming.

Only create the thread once, and use resume() and pause() for start()
and stop(). This will allow us to have a known client callback thread
tid that we can pass to AudioFlinger before start().

mActive:
Made mActive a bool not int.
mActive is protected by mLock; volatile is meaningless.
Fixed a few places where mActive was accessed without a lock:
- stopped()
- processAudioBuffer()
These aren't used internally, so no need for _l() versions.

Change-Id: I4b8a5c90f3a22d3894b344564cb1c5aef4f1fda2
udioRecord.h
fa2b8f243eb048fb2b8e5a14356190f69eb31a36 11-Jul-2012 Edwin Wong <edwinwong@google.com> Fixed sample video corrupted in MediaCodec mode.

Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
Crypto.h
5f0033d27b75fead593ed7ca2b86f5b6f5adf6cc 13-Jul-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead code in libmedia"
1879fff068422852c1483dcf8365c2ff0e2fadfc 12-Jul-2012 Glenn Kasten <gkasten@google.com> Add tid parameter to IAudioFlinger::openRecord

Not yet implemented

Change-Id: I35523fb15ad71727ecc9f4bb870f07e4b7397dc4
AudioFlinger.h
d4070955e28ae62aa4be1657f9d32acde104bb86 12-Jul-2012 Glenn Kasten <gkasten@google.com> Remove dead code in libmedia

Change-Id: I7d8201590cda29c9fa99662a4fdba222091febfe
udioRecord.h
udioTrack.h
isualizer.h
bf04a5d7f287fc712e0ed91849dc85c90c1e182d 12-Jul-2012 Glenn Kasten <gkasten@google.com> Simplify AudioRecord::getInputFramesLost()

This also fixes a benign race in reading mActive without a lock.

Change-Id: I19e953d4f275e5c266ca1ca3fece7b6c02ad1707
udioSystem.h
254af180475346b6186b49c297f340c9c4817511 03-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t more places

Use it in AudioSystem::getOutput(), AudioSystem::getInput(),
IAudioPolicyService::getOutput(), IAudioPolicyService::getInput(),
and various other places in AudioFlinger.

Not done: AudioTrack and OutputDescriptor.

Change-Id: I70e83455820bd8f05dafd30c63d636c6a47cd172
udioSystem.h
AudioPolicyService.h
983995747ed3adaf25035c433df1ccbaa056a898 23-Jan-2012 Paul Fariello <fariello@archos.com> MPEG2TSWriter: Write a proper CRC in PAT and PMT

Change-Id: I6ec8039b176878da6f02691194d96b0a1e894055
tagefright/MPEG2TSWriter.h
d4e5af6bc0a012e8d43975ca8b5627631333920d 23-Jan-2012 Paul Fariello <fariello@archos.com> MPEG2TSWriter: Write proper continuity counters for PAT and PMT

Change-Id: If94e31e51c563867db6d2376ad771f9751416084
tagefright/MPEG2TSWriter.h
dd8104cc5367262f0e5f13df4e79f131e8d560bb 02-Jul-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t more consistently

In IAudioFlinger::createTrack() and IAudioFlinger::openRecord(),
declare input parameter to use correct type audio_channel_mask_t.

In IAudioFlinger::getInputBufferSize(), input parameter is now channel mask
instead of channel count.

Remove unused IAudioFlinger::channelCount(audio_io_handle_t).

In AudioRecord::getMinFrameCount() and AudioSystem::getInputBufferSize(),
input parameter is channel mask instead of channel count.

Change-Id: Ib2f1c29bea70f016b3cfce83942ba292190ac965
udioRecord.h
udioSystem.h
AudioFlinger.h
0dc6d5ef45c0721c76f0e55354ff80371d795e5d 26-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "AudioRecord comments"
02e84eaff54414e9f10c0f605152728a682c6874 25-Jun-2012 Glenn Kasten <gkasten@google.com> AudioRecord comments

Group the private fields according to how they are used

Change-Id: I7ce3d0939510c10f34bd91a55f6e03afc8e7d43c
udioRecord.h
20010053daabfa43fcfe781bbf004473b4c08538 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove acoustics from AudioSystem::getInput()

Change-Id: I29fb3ee5664c1f0ee0409c1bb2be087ecca637db
udioSystem.h
AudioPolicyService.h
624a7fcb377f2a40109c16de5109ae8ea1f67a69 22-Jun-2012 Glenn Kasten <gkasten@google.com> Use audio_channel_mask_t in AudioRecord

Change-Id: I9e1b918b2635d961604a4a9d88eb1c7179a167a7
udioRecord.h
70be725da4d8aafb94d47c1962e897ecd5fdf823 22-Jun-2012 Glenn Kasten <gkasten@google.com> Remove unused AudioRecord::channels()

It was declared but never implemented or called.

Change-Id: If5846147fcbd7f6d4187971e2044dd6fd3252b42
udioRecord.h
868a6a357018e5872e064b7a13a9b891e2078962 22-Jun-2012 Glenn Kasten <gkasten@google.com> Include what you use

Change-Id: I12ef9367d05dbe069c037b1b4acd6347a8cf3ece
udioRecord.h
46ec58976b3c04a99ce6e7eda2531543bfb151c7 25-Jun-2012 Glenn Kasten <gkasten@google.com> Merge "Remove AudioRecord record_flags"
2cd25a9056cc150b9fd3ac9b0bca37a1334ffd47 22-Jun-2012 Jamie Gennis <jgennis@google.com> SurfaceMediaSource: keep refs to current buffers

This change fixes a bug in SurfaceMediaSource where it would not keep a
reference to all of the Gralloc buffers that the video encoder is currently
using.

Bug: 6655597
Change-Id: Ifd99976cc7ae57ed724bbf2bbcff357a39497391
tagefright/SurfaceMediaSource.h
f92eec53f886f43e4374a36195be55f2a7bbcf36 07-Mar-2012 Glenn Kasten <gkasten@google.com> Remove AudioRecord record_flags

Change-Id: I021ddcc1bcb63132a4597d13e3d09db2a5f2c628
udioRecord.h
28ed2f93324988767b5658eba7c1fa781a275183 07-Jun-2012 Glenn Kasten <gkasten@google.com> Reduce underruns in screen off, esp. with EQ

Add MonoPipe APIs to specify setpoint.
Use screen state to configure pipe setpoint.
Fix a long-standing bug where pipe sleep time was excessive,
which interacted poorly with governor and low clock frequencies.
Now it deducts the elapsed time since last write(),
which was significant when there was EQ and low clock frequency.

Bug: 6618373
Change-Id: I6f3b0072c2244aeb033ef0795ad164491a164ff5
udioParameter.h
bc098410be55f9d96f394b3981a0c482b83859b6 22-May-2012 Andreas Huber <andih@google.com> Tell surface flinger that we want to protect output buffers from being

sent to HDMI (without HDCP) and push a few black frames on IDLE->LOADED
similar to OMXCodec's behaviour.

Change-Id: Iea6055a115151ca881220a70a31af6ade2c58cb3
related-to-bug: 6537187
tagefright/ACodec.h
88ba895b5ddd8b3da364c3ceacdb698224ee746f 17-May-2012 Andreas Huber <andih@google.com> Merge "Stop extrapolating audio time from the anchor if we're paused or reached eos." into jb-dev
8c460498c028888c533ab442be12b6d4b669b965 15-May-2012 James Dong <jdong@google.com> Speed up stsz box write in MPEG4Writer

With this patch, the write time for 30+ minutes recording session is reduced from 10+ seconds down to around 2-3 seconds.

related-to-bug: 6435176

Change-Id: I83b705cea42d8de798e7032c770c5c7b033e267e
tagefright/MPEG4Writer.h
a99a5bca365277271915cbaeea811ad87131270d 16-May-2012 Andreas Huber <andih@google.com> Stop extrapolating audio time from the anchor if we're paused or reached eos.

Change-Id: I55903ba625d9c075a9a6e7bcd5ff95d450b915b2
related-to-bug: 6479613
tagefright/AudioPlayer.h
2986460984580833161bdaabc7f17da1005a8961 09-May-2012 Eric Laurent <elaurent@google.com> Fix issues with synchronous record start.

- Added a timeout in case the trigger event is never fired.
- Extend AudioRecord obtainBuffer() timeout in case of
synchronous start to avoid spurious warning.
- Make sure that the event is triggered if the track is
destroyed.
- Reject event if the triggering track is in an incompatible state.

Also fix a problem when restoring a static AudioTrack after
a mediaserver crash.

Bug 6449468.

Change-Id: Ib36e11111fb88f73caa31dcb0622792737d57a4b
udioSystem.h
e4451a91a61a341014f5eff61db356156c3ecb37 15-May-2012 Andreas Huber <andih@google.com> Smoothen audio "real" time by compensating with system_time()

for the delay since the last buffer submission to the audio sink.

Change-Id: Ib1a8672f96ba8bbef07d23372f1076fbb1f0bdcc
related-to-bug: 6479613
tagefright/AudioPlayer.h
7cf0de49dbdcb2da7d9bf9421f58adf442dfeaea 12-May-2012 James Dong <jdong@google.com> Merge "Remove unused VideoSourceDownSampler class" into jb-dev
3a2633008be4a92fbca6e76c057f86e220558197 11-May-2012 James Dong <jdong@google.com> Remove unused VideoSourceDownSampler class

Change-Id: I2faf5962ff4cc366c688ef5bb27f53596f08fe0a
related-to-bug: 6484217
tagefright/VideoSourceDownSampler.h
eb61431af13741aa8b7e57a39f69bba5a6c190dc 11-May-2012 Andreas Huber <andih@google.com> Increase AAC software decoder's buffer count. Refactor how clients

of ACodec get notified about codec buffers and buffer ids.

Change-Id: I962f873262dae7aa7b43f5f68a6d60268282f91e
related-to-bug: 6478823
tagefright/ACodec.h
af9e6a17d7038b411b61a3cb0669694058511a05 10-May-2012 Andreas Huber <andih@google.com> Merge "Properly connect/disconnect to/from the native window in MediaCodec." into jb-dev
7541ff5d83a3e77cb533841a0326a241550b95d9 10-May-2012 Andreas Huber <andih@google.com> Properly connect/disconnect to/from the native window in MediaCodec.

Change-Id: Ib5bf90a3b81fca8ff2346235bc28a2bd0bc7bfb1
related-to-bug: 6472161
tagefright/MediaCodec.h
2f74ef3cdc192f817ee1121f41765f0852c1d81e 30-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> OMX IL wrapper for FLAC encoder

Add wrapper around libFLAC for FLAC encoding in OpenMAX IL.

Declare FLAC encoder in OMX component roles.

Bug 5525503

Change-Id: I19bbce41c216870669d09365693f4ea89f8bc0f7
tagefright/ACodec.h
8ee516a515c70a492c395b67ce12e19e7d159804 08-May-2012 Andreas Huber <andih@google.com> Submit codec specific data automatically

if it is contained in the format passed to MediaCodec::configure.

Change-Id: I8ef6755e8389ec47b44a9c70904ea6c03a00f4f2
related-to-bug: 6364139
tagefright/MediaCodec.h
9806555d3930be43e11106281dee354820ac1c88 03-May-2012 Andreas Huber <andih@google.com> Respect channel mask in ACodec and NuPlayer.

Refactor conversion from MetaData into AMessage while we're at it.

Change-Id: I5479129836ea4316e8de28cf1b472bf19e3ac4ab
related-to-bug: 6439076
tagefright/ACodec.h
tagefright/Utils.h
4f6eed0d1c7972a983c075bdcf03089569e13fe1 30-Apr-2012 James Dong <jdong@google.com> Impl for supporting two video scaling modes

o allows the video scaling mode to change at any time
o also remove the scaling mode logic in OMXCodec.cpp

o related-to-bug: 5454345

Change-Id: I6f1714eb0c2774591ce650d56c1e779b8afd085f
ediaplayer.h
4c9cd95b27a638701be2ffa1713273ba2f624770 30-Apr-2012 Dave Burke <daveburke@google.com> Merge "Added support for HE-AAC recording" into jb-dev
8b71241ce7353731ab75322c46e090ee35014a33 27-Apr-2012 Marco Nelissen <marcone@google.com> Fix mono gapless playback for decoders that output stereo

The old AAC decoder always outputs stereo, even for mono source material, so we
need to use the number of channels of the output when calculating the number of
bytes to skip, not the number of channels in the source.
This makes OMXCodec skip the right amount of data, and prevents NuPlayer from
writing half a frame and then asserting when the AudioSink doesn't accept it.
Also move use of the SkipCutBuffer from NuPlayer to ACodec, so that it also
works when using the new Java APIs, and make SkipCutBuffer derive from RefBase.
b/774846

Change-Id: I34df9fea3e6730617eae559afaa556f4085ef0a0
tagefright/ACodec.h
tagefright/OMXCodec.h
tagefright/SkipCutBuffer.h
f60c660f048d5f5e2458cff243c20400d73757a7 29-Apr-2012 Dave Burke <daveburke@google.com> Added support for HE-AAC recording

Fixed bug in decoder related to sample rates / channel counts
Made decoder follow Fraunhofer pattern
Log if bitrate not available
Bug: 6275957

Change-Id: I47a8e29358fa4a88ebc73fe02d46a2bfb96c64fe
ediarecorder.h
9d07855aaff8a6b502a3ab058002cdd4a278b965 26-Apr-2012 Andreas Huber <andih@google.com> NuMediaExtractor API to unselect tracks and finer control over seeking.

Change-Id: I44d5a2b01d34b771bb0ff48b12829e33314c2374
related-to-bug: 6276111
tagefright/NuMediaExtractor.h
aeb8fd460ed87d032b3fb8bb61e21eb542ce0f5b 19-Apr-2012 Dave Burke <daveburke@google.com> Add Fraunhofer AAC encoder with AAC-ELD support.

Change-Id: I6cd499d257d72f50a5b508bed97796a591a51506
ediarecorder.h
tagefright/AACWriter.h
tagefright/ACodec.h
tagefright/MetaData.h
tagefright/OMXCodec.h
e370bb62b89d2f2980f519392010ea08a24c558e 25-Apr-2012 Andreas Huber <andih@google.com> Bump up the max number of items in an AMessage, remove overly stringent

CHECK() limiting us to just audio/* or video/* tracks.

related-to-bug: 6399405
Change-Id: I9bdaf7e709665ecc22da8839c8b16c081dbf4535
tagefright/foundation/AMessage.h
c1d8115e8a0bdaeb2b723d395b9a85a02c90c933 24-Apr-2012 Andreas Huber <andih@google.com> Make sure OMXCodec and ACodec both accept more than 2 channels of audio

and fill in the OMX channel mask properly.

Change-Id: I915950a0b252142b9eb3277cf7c6e0d9f5875305
tagefright/OMXCodec.h
a636433cbd09c0708b85f337ef45c0cdef3bcb4d 19-Apr-2012 Glenn Kasten <gkasten@google.com> Use C APIs instead of C++ APIs for policy

The C++ APIs are going away.

Note: we use tid == 0 which is not supported yet by the C APIs,
do not submit this until that is added.

Change-Id: I0e90789e6c81c69f2544e899c52421ea5d1342be
udioRecord.h
udioTrack.h
dc7431e70b4b030b5f42d0dfc3ef244d4f583dd2 23-Apr-2012 Andreas Huber <andih@google.com> Make sure NuMediaExtractor is thread safe.

Change-Id: If261c4d87d5569a0d7cfd75afe311803a6ce0109
tagefright/NuMediaExtractor.h
a08f041125c7688aa33aef1b229278641ae1c375 22-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Configure policy of mediaserver threads"
3acbd053c842e76e1a40fc8a0bf62de87eebf00f 28-Feb-2012 Glenn Kasten <gkasten@google.com> Configure policy of mediaserver threads

Change-Id: Ifd825590ba36996064a458f64453a94b84722cb0
udioTrack.h
AudioFlinger.h
AudioRecord.h
AudioTrack.h
3463fa2799a14631222c15245ac1ad85d19b77ca 22-Apr-2012 Eric Laurent <elaurent@google.com> Merge "Made AudioRecord a subclasss of RefBase"
a0a98ca6ec9b599af79a597cb7c5350b61a77624 21-Apr-2012 Eric Laurent <elaurent@google.com> Made AudioRecord a subclasss of RefBase

Made AudioRecord a subclass of RefBase to allow using strong
references and solve concurrency issues.

Issue 6254582.

Change-Id: Ic1f3845958f477e8b2d23d3d25bf0f666addcb3b
udioRecord.h
f853499c6a088ef8506cacbb3ccdffa87e0cec3e 21-Apr-2012 Eric Laurent <elaurent@google.com> Merge "Add support for deep audio buffers"
1948eb3ea6eee336e8cdab9b0c693f93f5f19993 14-Apr-2012 Eric Laurent <elaurent@google.com> Add support for deep audio buffers

Allow AudioSink to use deep audio buffering when the
source is audio only and its duration is more than
a certain threshold.
This helps improve battery life but implies higher
audio latency.

Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
ediaPlayerInterface.h
tagefright/AudioPlayer.h
a53d87c7b1428fe02f535c31dafd64cb1362fde9 20-Apr-2012 Andreas Huber <andih@google.com> Add the ability to query the amount of cached data to NuMediaExtractor.

Change-Id: I0966270a2bd36698330beaa03f47d02fc6a40c44
related-to-bug: 6364341
tagefright/NuMediaExtractor.h
8d6086781c79620ce6133df7bd27f0efdee6b4e6 19-Apr-2012 Andreas Huber <andih@google.com> Merge "Allow propagation of error information and description from the CryptoPlugin to"
5b8987e7de9d04b09153f329c680d2316cdb44ec 19-Apr-2012 Andreas Huber <andih@google.com> Allow propagation of error information and description from the CryptoPlugin to

the higher layers.

Change-Id: I9f434ad55cdf575803c208bedf47b607baff2330
related-to-bug: 6365261
Crypto.h
tagefright/MediaCodec.h
tagefright/MediaErrors.h
eee7f9dd0d3410877dd58a14c4b80aacbeb32d72 19-Apr-2012 James Dong <jdong@google.com> Merge "Make timed text source type explicit in TimedTextDriver"
2d359a85ef5b72f1cb47df227b44fe4f3c5fbd60 19-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add support for scaling mode parameter"
3476de62fb10e76412452ef4c6bd71936c9f7db1 16-Apr-2012 Jean-Michel Trivi <jmtrivi@google.com> Add support for scaling mode parameter

Support VISUALIZER_PARAM__SCALING_MODE parameter.

Modify process() function to use new volume scaling parameter,
used to set whether captured values are maximized by current
headroom in the buffer (default existing behaviora) or left
as is and thus affected by volume.

Modify AudioEffect to allow subclasses to override the following
events: control status changed, enable status changed, command
executed.
In Visualizer class (a subclass of AudioEffect), reset the
scaling mode and capture size on the actual effect
as cached when control is regained.
This will allow the effect to be properly
configured whenever Visualizers with different scaling
modes or capture sizes are released (e.g. from java
release() method).

Change-Id: I05cb9f925a296dceca91bafa9fe294ef2b2c2bd5
udioEffect.h
isualizer.h
692ac36c4b6a09fed5113a4f45f00a041665a769 19-Apr-2012 James Dong <jdong@google.com> Make timed text source type explicit in TimedTextDriver

o related-to-bug: 5542712

Change-Id: Ifdc730e616336e8b16783e8a5766f27df62a0592
tagefright/timedtext/TimedTextDriver.h
0ca3cf94c0dfc173ad7886ae162c4b67067539f6 18-Apr-2012 Eric Laurent <elaurent@google.com> rename audio policy output flags

Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioPolicyService.h
f69e53033f23f9f70fcdb28a3c2e650de0147459 18-Apr-2012 Andreas Huber <andih@google.com> Some refactoring and cleanup of now obsolete crypto fields.

codec commandline tool no longer supports decryption.

Change-Id: I7b10be6524631b20ac5d361d47949b00addf4a93
tagefright/MetaData.h
tagefright/NuMediaExtractor.h
52bef17f5953cd07b1655a3371d833f4de01caae 18-Apr-2012 James Dong <jdong@google.com> Merge "Fix for multiple audio/timed track feature implementation - part one"
eec46abb88dcc50621fd2d3f17a6b8d24fd07a19 12-Apr-2012 James Dong <jdong@google.com> Fix for multiple audio/timed track feature implementation - part one

o getTrackInfo now returns all tracks, rather than just the timed text tracks.
o the index of the track info is kept to the same as the track index if the
track is not from an external source
o correctly maps the selectTrack() and unselectTrack() calls to the right
track index

o TODO:
1) note that the selectTrack() and unselectTrack() only works for timed text
track at present; 2) the lock is timed text specific

o related-to-bug: 6110705

Change-Id: Ib1feeef2184bc992930ace0d1197b6c00a2636d7
tagefright/timedtext/TimedTextDriver.h
a98db787397633155fd71b06ecaa765a7ad20cf2 16-Apr-2012 Andreas Huber <andih@google.com> Merge "Change NuMediaExtractor's API to support different kinds of data sources."
db9b87e30a2ffe71554150e33066738ab134bc3c 13-Apr-2012 James Dong <jdong@google.com> Merge "Add external timed text source using a passed file descriptor"
613c8ae1b7a2b4f43b33a72dc2fff0bc8b7d4c6f 13-Apr-2012 James Dong <jdong@google.com> Add external timed text source using a passed file descriptor

o Also fixed a minor issue where the file length should be of type off64_t rather than size_t

o related-to-bug: 5542712

Change-Id: I35fd8ceea0bc75e553b7f4a99932cf58ea560c4e
tagefright/timedtext/TimedTextDriver.h
918c7652b9a38c02e26c0c46541cea82070c0e43 13-Apr-2012 Andreas Huber <andih@google.com> Change NuMediaExtractor's API to support different kinds of data sources.

Change-Id: I080aa2ce28300a72a85751509334dbdc491936c6
related-to-bug: 6276111
tagefright/NuMediaExtractor.h
5892e3e173f20e01956f318ae7dce43d46c5fc1d 12-Apr-2012 Andreas Huber <andih@google.com> Add metadata keys to communicate encrypted fragments and associated info.

Change-Id: I90a27c9bbe649328b88144b161c420916673846f
related-to-bug: 6275919
tagefright/MetaData.h
2d531e1b5865d61d5ca25d77d53017b1ad180efa 11-Apr-2012 Mathias Agopian <mathias@google.com> Merge "Refactored SurfaceMediaSource"
bdddc659a941afdb7f4958f582c6901c07246097 31-Mar-2012 Daniel Lam <dalam@google.com> Refactored SurfaceMediaSource

SurfaceMediaSource takes advantage of BufferQueue to avoid
duplicated code.

Change-Id: I5e60b8eca21e6c3cf728d363cd8f3786125182d1
tagefright/SurfaceMediaSource.h
4b75a9c8b93a90749bc5d22912ad0d96c12f4ecf 06-Apr-2012 Andreas Huber <andih@google.com> New API to support submitting encrypted buffers to the decoder.

Change-Id: I69dd60e43078c4211c6123cf6e0ce90e676bf873
related-to-bug: 6275919
tagefright/MediaCodec.h
f15cb4472aaca54c13f8250e4c7872470c4bed83 04-Apr-2012 Jeff Tinker <jtinker@google.com> Merge "frameworks/av/media portion of removing YouTube specific error codes"
a4c5a550e2a3bc237179b8684e51718e05894492 29-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: load audio hw modules.

Audio HW modules are now loaded upon request from audio policy manager
according to the configuration in audio_policy.conf.
Removed hard coded HW module loading by AudioFlinger at init time.
Added methods to IAudioFlinger and AudioPolicyInterface
to control the loading of audio HW modules.
Added methods to open an output or input stream on a specific hw module.

Change-Id: I361b294ece1a9b56b2fb39cc64259dbb73b804f4
AudioFlinger.h
1a9ed11a472493cac7f6dfcbfac2064526a493ed 21-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: add configuration file

removed outputs to stream mapping cache in audio system: the output for a
given stream type must always be queried from audio policy manager as the cache
is not always updated fast enough by audioflinger callback.

removed AudioFlinger::PlaybackThread::setStreamValid() not used anymore if
stream to output mapping is not cached.

Change-Id: Ieca720c0b292181f81247259c8a44359bc74c66b
udioSystem.h
8f883be3bd1fffd4e30bc7298c34085a4055be2b 04-Apr-2012 Jeff Tinker <jtinker@google.com> frameworks/av/media portion of removing YouTube specific error codes

Change-Id: Id0d84d3aaaf340cd5287611c9dc7cb8d11466772
related-to-bug: 5883949
tagefright/MediaErrors.h
1bd139a2a68690e80398b70b27ca59550fea0e65 03-Apr-2012 Andreas Huber <andih@google.com> New Crypto services talking to the new crypto "HAL".

Change-Id: I69ed31e7a8b4d69d1209d2d516f94d258f072566
related-to-bug: 6275919
Crypto.h
tagefright/MediaCodec.h
4a446bd090efb36ce06ae8966d42357fd5472715 03-Apr-2012 Andreas Huber <andih@google.com> Merge "Add a few more APIs to MediaCodecList."
69829f3bd09ee4e6be49fee8795c5df24c4da70e 30-Mar-2012 Andreas Huber <andih@google.com> Add a few more APIs to MediaCodecList.

Change-Id: I5ac193cd40c82bbcd87c1e55003b78102e8d4674
tagefright/MediaCodecList.h
tagefright/OMXCodec.h
2d6486f9112a6f0d23f17eaaad94bac62e16caab 02-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "Update AudioParameter"
dca856f5cb849b8feab2d24f3248f25d887211ee 02-Apr-2012 Glenn Kasten <gkasten@google.com> Merge "AudioTrack client fast policy"
4110c101c3d0dd8dbc44c8d2d0edd3e2e7d6652f 29-Mar-2012 Marco Nelissen <marcone@google.com> Add gapless playback support for NuPlayer

This makes NuPlayer use a SkipCutBuffer when needed, and adds a new
AudioSink method to retrieve the number of frames written so far, so
NuPlayerRenderer can calculate how much data it can write without blocking.
Also make some more methods const.

Change-Id: Id7d253ad8a7b85e9a84ca2baafbe32817b16c744
ediaPlayerInterface.h
4a4a0959bca78e03e3c3f486ba17829c28314d8c 19-Mar-2012 Glenn Kasten <gkasten@google.com> AudioTrack client fast policy

Change-Id: I42ce691df3f586ac061b62237f35a263a0116f1f
udioTrack.h
edf47a8cba2d1d8985b64bf4a4fac661ba34f35a 01-Apr-2012 Glenn Kasten <gkasten@google.com> Update AudioParameter

Use definitions for AUDIO_PARAMETER_STREAM_* from <hardware/audio.h>
instead of repeating these constants.

String constants are const char * const.

Change-Id: I1c9ebe0bc9c827d719d3181aea55251c6db28ec4
udioParameter.h
40a1da57d21bbc883630e7a854a279685fe1fa61 31-Mar-2012 Eric Laurent <elaurent@google.com> Merge "implemented synchronous audio capture"
a011e35b22f95f558d81dc9c94b68b1465c4661d 30-Mar-2012 Eric Laurent <elaurent@google.com> implemented synchronous audio capture

Added the infrastructure to support the synchronization of playback and
capture actions on specific events.
The first requirement for this feature is to synchronize the audio capture
start with the full rendering of a given audio content.
The applications can further be extended to other use cases
(synchronized playback start...) by adding new synchronization events and
new synchronous control methods on player or recorders.

Also added a method to query the audio session from a ToneGenerator.

Change-Id: I51f1167290d9cafdf2fbcdf9e4785156973af44c
udioRecord.h
udioSystem.h
AudioRecord.h
oneGenerator.h
df7e6ea0c755fb95a77d21010105e3a2eac69ff8 30-Mar-2012 Mathias Agopian <mathias@google.com> reduce IPCs in BufferQueue

Change-Id: I1f8c32a771a411476d225adc62d1f07c24f39a3e
tagefright/SurfaceMediaSource.h
cb5b766bb0a3ed992998a5bd66de0ee1d2223b81 29-Mar-2012 Marco Nelissen <marcone@google.com> Add ABuffer support to SkipCutBuffer

Add support for ABuffer to SkipCutBuffer, and make it (re)allocate an
appropriately sized buffer when needed, rather then relying on the
caller to tell it ahead of time how big the buffers are going to be.

Change-Id: I8b5c9ba5dd2fc13ef8870b7d4fe93a1bfdc7a626
tagefright/SkipCutBuffer.h
559bf2836f5da25b75bfb229fec0d20d540ee426 28-Mar-2012 James Dong <jdong@google.com> AV Android make files changes

o plus a few file relocation: ActivityManager.cpp/h, SoundPool.h, etc
o remove some runtime dependencies to libandroid, libandroid_runtime, etc

Change-Id: I047a47c5fb361dd5cf85cd98798c39f629a75d10
oundPool.h
15147270aa1c56503902b424f946389294875665 26-Mar-2012 Andreas Huber <andih@google.com> Merge "Provisional support for secure decryption of media streams."
ed3e3e046840d5bf1ca84a8c0cc097425e89d6d6 26-Mar-2012 Andreas Huber <andih@google.com> Provisional support for secure decryption of media streams.

Change-Id: Ib3982a9c960bfdb0cb7e1b174440b141b194cfbe
Crypto.h
MediaPlayerService.h
tagefright/ACodec.h
tagefright/MediaCodec.h
tagefright/MetaData.h
tagefright/NuMediaExtractor.h
tagefright/OMXCodec.h
tagefright/foundation/AString.h
131c36ef343a604e9aee10c830ebe9c55a743379 26-Mar-2012 Eric Laurent <elaurent@google.com> Merge "reorganize SoundPool and JetPlayer code."
2e66a7896c9a9da3a15fc6cff9be28b4174d8719 26-Mar-2012 Eric Laurent <elaurent@google.com> reorganize SoundPool and JetPlayer code.

Reorganize SoundPool and JetPlayer code to be ready for the
creation of libmedia_native.

Split SoundPool between libsoundpool (JNI) and libmedia(sound pool implementation).
Remove dependencies on nativehelper/jni.h from JetPlayer.

Change-Id: I130c6014173b714329929dd82c5dfb70b757a610
etPlayer.h
cc1110dc92e53e9cc0afbb043e6ef8295bd9c5d5 19-Mar-2012 Glenn Kasten <gkasten@google.com> Add TRACK_FAST for IAudioFlinger::createTrack

Currently not implemented by client or server

Change-Id: Ib11dda57db3eeb871bcc7b546e340078776875f5
AudioFlinger.h
b83d38feeeb88a8a2a6219e1fca2480b5a14fb0d 26-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "IAudioFlinger::createTrack and openRecord flags"
8f7f7ad54c698cb57a2a369cf1ae5b917853917b 24-Mar-2012 Colin Cross <ccross@android.com> remove jni.h include from IOMX.h

jni.h is not used in IOMX.h and is not available in pdk builds,
remove it.

Change-Id: I9bc8fd70f617942712d9f684c6fc927bf18be753
OMX.h
be9b24b86d2c84f2dc45bb8c8d1578b55cbd151d 24-Mar-2012 James Dong <jdong@google.com> Fixed missing return value from a method should have returned status_t

Change-Id: I83ad2735eaf8a8dfa5f8f29f30aec1311b3222de
tagefright/SurfaceMediaSource.h
a411f779465504ff3e1a59c8ffa43d18385852b8 22-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Remove enforceFrameCount"
a98478bfbcc0f7fb4b164d3dce40ca96df75667d 21-Mar-2012 Marco Nelissen <marcone@google.com> Support gapless playback for mp3 and m4a

Gapless playback for appropriately tagged mp3 and m4a files.
Currently this is implemented in OMXCodec, which most players
use, but should be easy to support in other players as well by
using the SkipCutBuffer utility class.

Change-Id: I748c669adc1cfbe5ee9a7dea2fad945d48882551
tagefright/OMXCodec.h
tagefright/SkipCutBuffer.h
291f4d505aff81969e6666049d3cc3446f836af2 19-Mar-2012 Glenn Kasten <gkasten@google.com> Remove enforceFrameCount

It was only used to decide whether to issue a warning.
The warning was issued the first time track was created but
not at re-creation. Now it is a verbose message every time,
not a warning since it happens all the time with key clicks on A2DP.

Change-Id: I9d39f53c0a7eb84b666e55b1b76ff830cf8f37ba
udioTrack.h
2f694b3ef6af235e7ba850d57538eece9f136499 21-Mar-2012 Marco Nelissen <marcone@google.com> Merge "Add MetaData::dumpToLog"
feba11fd788c99b0b63e0bce724730817688d82f 21-Mar-2012 Marco Nelissen <marcone@google.com> Add MetaData::dumpToLog

Utility method for dumping the content of a MetaData object to the log.

Change-Id: I2d91b991e1d9fed2215e8995a73c2b1854205074
tagefright/MetaData.h
7153494670bdac8b650cb10b8b1838651e0ca418 21-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Whitespace"
6da08fc33642b832d1cde2e46815a5fd67dd0016 20-Mar-2012 Marco Nelissen <marcone@google.com> Merge "Parse mp3 encoder padding/delay"
b636abde14f2612ea236257846b9ab15d87d4623 19-Mar-2012 Marco Nelissen <marcone@google.com> Parse mp3 encoder padding/delay

Get the mp3 encoder padding and delay from a XING frame or iTunSMPB tag.

Change-Id: Icde598c8857d7e7c187a718f478ee9799d6a1b8a
tagefright/MetaData.h
ea7939a079b3600cab955760839b021326f8cfc3 14-Mar-2012 Glenn Kasten <gkasten@google.com> Whitespace

Fix indentation, and add blank lines in key places for clarity

Change-Id: I57a0a8142394f83203161aa9b8aa9276abf3ed7c
udioTrack.h
a075db4ff9b086ac2885df77bb6da0869293df92 06-Mar-2012 Glenn Kasten <gkasten@google.com> IAudioFlinger::createTrack and openRecord flags

createTrack and openRecord don't need the "old" flags parameter,
which was either audio_policy_output_t or audio_in_acoustics_t
shifted left by 16 bits. But they do need "new" flags, which
are defined by the application use case. Initially, the only
application use case flag is timed output, but others are planned.

For output, the audio_policy_output_t flags are passed to
AudioSystem::getOutput, which returns an audio_io_handle_t, and that
handle is then passed to createTrack. So createTrack doesn't need the
old flags parameter.

For input, the audio_in_acoustics_t flags are passed to
AudioSystem::getInput, which returns an audio_io_handle_t, and that
handle is then passed to openRecord. So openRecord doesn't need the
old flags parameter.

Change-Id: I18a9870911846cca69d420c19fe6a9face2fe8c4
udioRecord.h
AudioFlinger.h
f9d660a5e0196240add5daf0199f128d471e592c 16-Feb-2012 Insun Kang <insun@google.com> Defines MediaPlayer APIs to support multiple audio/video/timedtext
tracks.

o Newly introduced APIs are (MediaPlayer):
getTrackInfo() / addExternalSource() / enableTrack() / disableTrack().

o Timed text tracks are supported only, for now.

o TODOs:
- Define the audio/video behavior for enableTrack and disableTrack.
- Refactoring AwesomePlayer / TimedTextDriver so that all types of
track index can be managed in the correct order and be ready for
supporting audio/video tracks.
(MediaExtractor and MediaSource for text file might be necessary.)

Change-Id: Idb85e1b3f2ed49a64f377d05472dd6663ce94e07
ediaplayer.h
tagefright/MediaDefs.h
tagefright/timedtext/TimedTextDriver.h
d191213ab0146526541913f3fed2d5aa95f58899 14-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Use correct syntax for #include <> """
b4d307481960b6b348fae4b4e8edefd003c3d36c 13-Mar-2012 Glenn Kasten <gkasten@google.com> Use correct syntax for #include <> ""

Change-Id: I943137108668ae66f8eba18dafe069a7951bcd8f
etPlayer.h
36a4d2cc7a44eb42d0d9ef5fe50b6747a7a34cab 13-Mar-2012 Marco Nelissen <marcone@google.com> Merge "Gapless playback, step 1."
6b74d671a1321a6ecc4a40b6c87beedfecc1ec44 29-Feb-2012 Marco Nelissen <marcone@google.com> Gapless playback, step 1.

Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly
by reusing the initial AudioTrack for subsequent players.

Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
5e7616cc0e5493241211333134555d74aec89982 13-Mar-2012 James Dong <jdong@google.com> Merge "Switched to use the header files in /frameworks/native and deleted the duplicate header files in /frameworks/base"
e53b9ead781c36e96d6b6f012ddffc93a3d80f0d 13-Mar-2012 Glenn Kasten <gkasten@google.com> Whitespace and indentation

Fix indentation to be multiple of 4.
Make it easier to search:
sp< not sp < to
"switch (...)" instead of "switch(...)" (also "if" and "while")
Remove redundant blank line at start or EOF.
Remove whitespace at end of line.
Remove extra blank lines where they don't add value.

Use git diff -b or -w to verify.

Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
AudioRecord.h
AudioTrack.h
MediaMetadataRetriever.h
MediaPlayerClient.h
MediaRecorderClient.h
etPlayer.h
ediaMetadataRetrieverInterface.h
ediaProfiles.h
emoryLeakTrackUtil.h
6c6b4d0d2b98a7ceee8b697daaf611f8df3254fb 12-Mar-2012 James Dong <jdong@google.com> Switched to use the header files in /frameworks/native
and deleted the duplicate header files in /frameworks/base

o related-to-bug: 6044887

Change-Id: I17e0692d9a9b5c8796ded36677c833ca8ab36795
tagefright/HardwareAPI.h
tagefright/MetadataBufferType.h
tagefright/OMXPluginBase.h
tagefright/openmax/OMX_Audio.h
tagefright/openmax/OMX_Component.h
tagefright/openmax/OMX_ContentPipe.h
tagefright/openmax/OMX_Core.h
tagefright/openmax/OMX_IVCommon.h
tagefright/openmax/OMX_Image.h
tagefright/openmax/OMX_Index.h
tagefright/openmax/OMX_Other.h
tagefright/openmax/OMX_Types.h
tagefright/openmax/OMX_Video.h
2d6ef93773465cd3e66146fac35050a472c589f7 12-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Remove virtual from methods that don't need it"
18868c5db2f90309c6d11e5837822135e4a0c0fa 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use audio_policy_output_flags_t consistently

This affects:
- IAudioFlinger::openOutput
- AudioTrack::AudioTrack
- AudioTrack::set
- apps that call these

Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
udioTrack.h
AudioFlinger.h
f2015b625cd6bea86da7401e725332c35b90e7cf 10-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Use AudioRecord::record_flags consistently"
688aac7675f18bdd7bff13334759e20bc4e6c390 09-Mar-2012 Glenn Kasten <gkasten@google.com> Remove virtual from methods that don't need it

Change-Id: I30e17e61aae25b036436c0e270313c80c43e5f06
AudioFlinger.h
679ab0b0792846a89162ce41c953819d70030112 07-Mar-2012 Glenn Kasten <gkasten@google.com> Use AudioRecord::record_flags consistently

Change-Id: I6f369a2b99eb515603bc7d5629a07db2b96783fe
udioRecord.h
a19ffb656616feec70613ba67ddfe15a504a4e76 09-Mar-2012 Eric Laurent <elaurent@google.com> Merge "audio policy: use audio_devices_t when appropriate"
6374252107fd6539397598195ea6defd5870fafb 08-Mar-2012 Eric Laurent <elaurent@google.com> audio policy: use audio_devices_t when appropriate

Change-Id: I1b3a5879e81c789fb53d356af3d3a1ee2dca955f
udioSystem.h
AudioPolicyService.h
b81cc8c6f3eec9edb255ea99b6a6f243585b1e38 01-Mar-2012 Glenn Kasten <gkasten@google.com> IAudioFlingerClient::ioConfigChanged param2 const

The 3rd parameter (param2) to AudioFlingerClient::ioConfigChanged
is used as an input. So changed it from void * to const void *.
It is then cast to const OutputDescriptor *
or const audio_stream_type_t * depending on the event.

Change-Id: Ieec0d284f139b74b3389b5ef69c7935a8e5650ee
udioSystem.h
AudioFlingerClient.h
22f9dd98d9c4c3e0e58586cf6a6008ca6ee946e5 06-Mar-2012 Eric Laurent <elaurent@google.com> Merge "AudioTrack: relax check on minimum buffer size"
56617834920554fc68a818da17b56e0c2ad8f254 06-Mar-2012 James Dong <jdong@google.com> Merge "Remove unused code - MediaSourceSplitter"
054a5a69374efae97924c83c2ee7ec7210bf3283 06-Mar-2012 James Dong <jdong@google.com> Remove unused code - MediaSourceSplitter

Change-Id: Icf37832a1c234501ee3ff91ff13eece2242425ae
tagefright/MediaSourceSplitter.h
d8d6185c978c9b27ca69e7791785e0983ed9e8b8 06-Mar-2012 Eric Laurent <elaurent@google.com> AudioTrack: relax check on minimum buffer size

Current AudioTrack implementation enforces that the requested audio
buffer size is at least corresponding the audio latency.
This requirement is too strong and leads to problems with current
stagefright and AudioSink implementations when playing over output
streams with long latency.

Ultimately, the AudioSink design should be changed to specify a minimum
buffer size in time or frames units but not in buffer count units.

Change-Id: I8ba603956f92ac49143a8249572665aa548f2f0f
udioTrack.h
eb7de4504bdb3a0182021ca6f022cccca01dbf1e 05-Mar-2012 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add channel mask in AudioSink"
786618ffe881aceb64d65a6a2e2d76ede6e01ec0 02-Mar-2012 Jean-Michel Trivi <jmtrivi@google.com> Add channel mask in AudioSink

Add support for specifying a channel mask when opening an AudioSink.
This parameter does not replace the channel count parameter in order
to not have to duplicate the logic to derive a mask from the
channel count everywhere an AudioSink is used without a known mask.

A mask of 0 (CHANNEL_MASK_USE_CHANNEL_ORDER) means a mask will
be automatically derived from the number of channels.

Update existing AudioSink implementations to use the channel mask,
and users of AudioSink to specify the mask if available, and
CHANNEL_MASK_USE_CHANNEL_ORDER otherwise.

Change-Id: Ifa9bd259874816dbc25ead2b03ea52e873cff474
ediaPlayerInterface.h
tagefright/MetaData.h
985ed9a1a22ec7e6e245d3fb8e93d3a23bdc539b 02-Mar-2012 Glenn Kasten <gkasten@google.com> Merge "Fix typos and line length in AudioRecord comments"
c795b64060c3af9d7961fc1371e4ccfa8ee3e450 23-Feb-2012 John Grossman <johngro@google.com> Switch the way we configure for MediaPlayer retransmission.

This is a cherry-pick of I6ab07d89b2eeb0650e634b8c3b7a0b36aba4e7dd
with merge conflicts addressed by hand and additional changes made in
response to code review feedback.

Move in the direction of a more publishable API for configuring a
media player for retransmission. It used to be that we used a custom
invoke and a modified URL (prefixed with aahTX://). There are many
issues with this technique and it was never meant to stand the test of
time.

This CL gets rid of all that. A new (but currently hidden) method was
introduced to the java level MediaPlayer API, called
setRetransmitTarget(InetSocketAddress), which allows an app writer to
set the retransmit target. For now, this method needs to be called
before a call to setDataSource (which is pretty unusual for the
MediaPlayer API) because this mid level code uses this as a cue to
instantiate an aahTX player instead of relying on the data source to
select a player. When retranmit functionality becomes part of the
existing android player implemenation, this
set-retrans-before-set-data-source behavior can go away, along with
the aahTX player itself.

Change-Id: I3b46c5227bbf69acb2f3cc4f93cfccad9777be98
Signed-off-by: John Grossman <johngro@google.com>
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
f08d7d0ee19c225d5b67fb49046290adfd9ab4bc 01-Mar-2012 Andreas Huber <andih@google.com> Merge "Instead of hardcoding OMX component names in our code, support"
afc16d667afa23f5aa00154ccad62f8c45cf5419 01-Mar-2012 Andreas Huber <andih@google.com> Instead of hardcoding OMX component names in our code, support

a config file instead.

Change-Id: I5835903ab9f1c4a22ccc605ca99ed966767adf57
tagefright/ACodec.h
tagefright/MediaCodecList.h
tagefright/OMXCodec.h
3030fcefcfcfc48789612659206b957cd0489a54 01-Mar-2012 Eric Laurent <elaurent@google.com> renamed audio policy output flag.

Renamed AUDIO_POLICY_OUTPUT_FLAG_INDIRECT to AUDIO_POLICY_OUTPUT_FLAG_NONE
which is more appropriate.

Change-Id: Ia14d60397df0f2dcd9bea0186400a09da35bc104
udioSystem.h
AudioPolicyService.h
ec539ae64d8a3eadf9115ec7ebe31e4e47788a2e 29-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "AudioRecord const methods"
5687da3359c7939dbd982de9fa2e5f19e41ae411 29-Feb-2012 Andreas Huber <andih@google.com> Merge "Separate the notion of "stop" from that of "release", i.e."
c95c2ddcdfc974f42408a377fbe2de51b94a8c94 29-Feb-2012 Andreas Huber <andih@google.com> Separate the notion of "stop" from that of "release", i.e.

stop - means transition back to LOADED state and keeping the component
instance allocated.

release - means we get rid of the component completely.

Change-Id: I40ad01ce70821faaad43f57999249904f9144924
tagefright/ACodec.h
tagefright/MediaCodec.h
606ee61616efdba4696ae591ad10a4be33d8c946 25-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord const methods

Change-Id: Ifae4fd7820b650aaca2b13c8658c292db1c46c0f
udioRecord.h
3254b25e8b0f674ccc2226609e01dd86a600802e 27-Feb-2012 Insun Kang <insun@google.com> Moves TimedTextDriver.h into include/media/stagefright/timedtext.

So that other players can include TimedTextDriver.h properly.

Change-Id: I15e72bf655de8555eef6244a6c853c27a0828a1d
tagefright/timedtext/TimedTextDriver.h
9eeafeb52fecf90882e9b44eeefcb7c3e16aa915 25-Feb-2012 Mathias Agopian <mathias@google.com> remove dependency on android_native{s_priv|buffer}.h

Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
tagefright/HardwareAPI.h
417c27304c67057779693007a7bc08e4dd80c262 24-Feb-2012 Glenn Kasten <gkasten@google.com> Fix typos and line length in AudioRecord comments

Change-Id: I85cfb9a2b9b3ade098161aa7687b4d4f7eb226ea
udioRecord.h
2d8bedd05437b6fccdbc6bf70f673ffd86744d59 21-Feb-2012 Andreas Huber <andih@google.com> Add new APIs AMessage::(set|find)Buffer to make it safer to pass

ABuffer objects through messages.

Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
tagefright/foundation/AMessage.h
5778822d86b0337407514b9372562b86edfa91cd 21-Feb-2012 Andreas Huber <andih@google.com> Implementation of a java media codec interface and associated tools.

Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b
tagefright/ACodec.h
tagefright/MediaCodec.h
tagefright/MediaErrors.h
tagefright/NativeWindowWrapper.h
tagefright/NuMediaExtractor.h
tagefright/foundation/AMessage.h
c33305c5dd4cc06e71eb0c66a7150aa6ab647c99 21-Feb-2012 James Dong <jdong@google.com> Merge "Limit the amount of audio record data in each buffer"
761defc341c5ce9019a42919c441f035f665ec0d 10-Feb-2012 John Grossman <johngro@google.com> Upintegreate AAH TX and RX players from ICS_AAH

Upintegrate the android at home TX and RX players developed in the
ICS_AAH branch.

Change-Id: I8247d3702e30d8b0e215b31a92675d8ab28dccbb
Signed-off-by: John Grossman <johngro@google.com>
ediaPlayerInterface.h
4ff14bae91075eb274eb1c2975982358946e7e63 09-Feb-2012 John Grossman <johngro@google.com> Upintegrate Audio Flinger changes from ICS_AAH

Bring in changes to audio flinger made to support timed audio tracks
and HW master volume control.

Change-Id: Ide52d48809bdbed13acf35fd59b24637e35064ae
Signed-off-by: John Grossman <johngro@google.com>
udioTrack.h
AudioFlinger.h
AudioTrack.h
b575ddce78d266fa218006f90306158dda5c8f56 14-Feb-2012 James Dong <jdong@google.com> Limit the amount of audio record data in each buffer

o The size of each input buffer should be less than or equal to kMaxBufferSize
o related-to-bug: 5977032

Change-Id: I04343169aac3df56694aad4ba7967ec45337ad7e
tagefright/AudioSource.h
d9b9b8d09e7471b0ffa21cfa9f944ef4ad300a71 14-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Update comments"
99e53b86eebb605b70dd7591b89bf61a9414ed0e 19-Jan-2012 Glenn Kasten <gkasten@google.com> Update comments

We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
udioSystem.h
udioTrack.h
ffectsFactoryApi.h
AudioTrack.h
emoryLeakTrackUtil.h
ed15977476a3d53103866e6d527fa3fb65d4166c 14-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead code AudioTrack::getLoop"
6dbc1359f778575d09d6da722b060a6d72c2e7c5 02-Feb-2012 Glenn Kasten <gkasten@google.com> AudioRecord and AudioTrack client tid

Inform AudioFlinger of the tid of the callback thread.

Change-Id: I670df92dd06749b057238b48ed1094b13aab720b
udioRecord.h
AudioRecord.h
AudioTrack.h
7a8b0ed6419e57dd8b41d3806893d63d3df91aab 02-Feb-2012 Jean-Michel Trivi <jmtrivi@google.com> Playback rate on MediaPlayer

Add support for modifying the playback rate of a MediaPlayer
by altering the sample rate of its AudioTrack.
The playback rate is expressed in permille, where 1000 is the
playback at normal speed.

Change-Id: I981d060ab32f7bae7a767e82c60c88ae635dceed
ediaPlayerInterface.h
ediaplayer.h
tagefright/AudioPlayer.h
f1d5aa162c02a16b7195a43a9bcea4d592600ac4 07-Feb-2012 James Dong <jdong@google.com> Move away from MediaDebug and use ADebug instead

Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
tagefright/MediaDebug.h
38f5d71e72f3b76c5b519614d27f051d53cd2712 08-Feb-2012 Glenn Kasten <gkasten@google.com> Remove dead code AudioTrack::getLoop

Change-Id: I868329c52f31bc20125f068500d8f892b4ec9796
udioTrack.h
7ae4a2c130ec2cb5dec69d095b810698acc543b3 08-Feb-2012 James Dong <jdong@google.com> Merge "Enable B frame support in MPEG4Writer"
72ef00de10fa95bfcb948ed88ab9b7a177ed0b48 17-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_io_handle_t consistently instead of int

Other:
- add a comment to nextUniqueId
- made ThreadBase::mId const, since it is only assigned in constructor.

Change-Id: I4e8b7bec4e45badcde6274d574b8a9aabd046837
udioSystem.h
AudioFlinger.h
AudioFlingerClient.h
5e92a7861196ddae14638d4b7a63fc4892b7ef59 30-Jan-2012 Glenn Kasten <gkasten@google.com> Effect UUID inputs passed by pointer are const

Change-Id: I1f5c338bcb7368e3dd8cd5f804b2e6d9fbe087f8
udioEffect.h
ffectsFactoryApi.h
AudioFlinger.h
4f9b0c54011eb8fd2ccfb393c2dcd51cd07800e0 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead mutex in AudioTrack/AudioRecord thread"
f22147e5d2982e0c461f7ce8058c2d596d518bd4 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "AudioTrack declare more methods const"
e98bbd36d67243fe987b09904956550a68af1cc7 08-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Declare more IAudioFlinger methods const"
000e18370baae60ffd9f25b509501dd8c26deabf 07-Feb-2012 James Dong <jdong@google.com> Enable B frame support in MPEG4Writer

This patch allows us to automatically detect whether ctts box is needed in MPEG4Writer.
MPEG4Writer uses ctts version 0 (non-negative offset value) store the composition time
offset on a needed basis.

Currently, the size of the ctts box is not optimized. Optimization will be addressed
in a subsequent patch.

o also changed the private method retrieveDecodingTime(bool) in OMXCodec
to getDecodingTime()

o related-to-bug: 4232183

Change-Id: Ic6dc7b25ecd258c2506ca4b9c25156e922456e51
tagefright/OMXCodec.h
60c2b4ece6528d6d3f4e9e2c7e45772b65c4b87d 04-Feb-2012 James Dong <jdong@google.com> Don't call virtual function in destructor of SurfaceMediaSource

Change-Id: I3cbc2b1222335b61c814b5cdcfaefa495148b0ec
tagefright/SurfaceMediaSource.h
f9289a4ca88d8f72cb0d6b3ca16fbc44ef4a2aeb 04-Feb-2012 James Dong <jdong@google.com> Merge "Don't call virtual functions in the destructor for audio and camera source classes"
a5224f319e2ba4b51ddb4287705ccf8d4b8ecc51 04-Jan-2012 Glenn Kasten <gkasten@google.com> AudioTrack declare more methods const

Change-Id: I4999e984460893961d0d8092cff17f3cf07d7214
udioTrack.h
f587ba5b991c7cd91e4df093d0d796bd419e5d67 27-Jan-2012 Glenn Kasten <gkasten@google.com> Declare more IAudioFlinger methods const

This is just documentation, as C++ method const-ness doesn't mean anything
for a binder API. Instead, here const means "no side effects".

Change-Id: Iaa9cd2fe477db10ae9a40cac4f79f0faa9b4e5e6
udioEffect.h
AudioFlinger.h
f3623993b78669a624d9b3a703b361ed6c035ad9 04-Feb-2012 James Dong <jdong@google.com> Merge "Don't call virtual functions in destructors for the writer classes"
787bae0578fbaab6219ebf23494866b224d01438 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_in_acoustics_t consistently"
ff3c83e04ae459c4252b86dd4440b4e37ee92c16 03-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Use ToneGenerator::tone_type consistently"
a0d68338a88c2ddb4502f95017b546d603ef1ec7 28-Jan-2012 Glenn Kasten <gkasten@google.com> Use NULL not 0 for raw pointers

Use if (p != NULL) instead of if (ptr)

Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
udioEffect.h
udioRecord.h
udioTrack.h
isualizer.h
b44c9d2bdc0d5b9cb03254022a58e017b516e9e6 03-Feb-2012 James Dong <jdong@google.com> Don't call virtual functions in the destructor for audio and camera source classes

Change-Id: Ia74ffc1c0cbd7971697f5e3c476e340ec5c7727a
tagefright/AudioSource.h
tagefright/CameraSource.h
tagefright/CameraSourceTimeLapse.h
8bcc65c753085fe3328592cceda0cf0e8f8b0a45 03-Feb-2012 James Dong <jdong@google.com> Don't call virtual functions in destructors for the writer classes

Have not found any concrete bugs related to these calls yet, but we should avoid
calling virtual functions in destructors, regardless.

Change-Id: I2d47b79d3fb2d29f418619bee83aa147d232a5d4
tagefright/AACWriter.h
tagefright/AMRWriter.h
tagefright/MPEG2TSWriter.h
tagefright/MPEG4Writer.h
457d4c01ec0e922771ef57158431f48e4d267905 02-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "More audio_stream_type_t"
0e265cf36d201a7ccc0238b5c60b50f43d1dc450 02-Feb-2012 Glenn Kasten <gkasten@google.com> Remove dead mutex in AudioTrack/AudioRecord thread

The client callback threads had mutexes called AudioTrackThread::mLock
and ClientRecordThread::mLock. These mutexes were only used by start()
and stop(), and were unused by the thread itself. But start() and
stop() already have their own protection provided by AudioTrack::mLock
and AudioRecord::mLock. So the thread mutexes can be removed.

Change-Id: I098406d381645d77fba06a15511e179a327848ef
udioRecord.h
udioTrack.h
d459b485c61bd3e7fd81c5cd3af8ada27fc3e8d3 31-Jan-2012 Andreas Huber <andih@google.com> Slighly improve the API to discover if the OMX stack is running in the local

process.

Change-Id: Idd3c2f0d4a9542af01a3fdfd3b0bfab90e083505
OMX.h
211eeaf17e5565b68447d29799dbf158a33cf4cf 20-Jan-2012 Glenn Kasten <gkasten@google.com> More audio_stream_type_t

Change-Id: I1260259efe0aa3fc1ef13de69758aaa592e1f815
udioSystem.h
3d2f877c1cb4e4ae4ddde7f57f4353de9341f11b 28-Jan-2012 Glenn Kasten <gkasten@google.com> Use ToneGenerator::tone_type consistently

Also remove defaults in startToneCommand(), they're not needed and the
default for tone type was nonsense.

Change-Id: I70fa8cee4f3dbb8c66ceb3719c8d3d2f447f05b9
oneGenerator.h
de9719b3ec71472e6bf75117152176af51d1a515 27-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_in_acoustics_t consistently

Change-Id: I0a9dd668fb2e57b1c3ece3190588194974b99062
AudioFlinger.h
fd267d7cf640225bb57f0ed1af44efc153275f6d 27-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_source_t consistently"
eba51fb3a361f67a6a64d5a16eba6084fe27d60e 23-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_source_t consistently

Was a mix of audio_source_t, uint8_t, and int.

Related fixes:
- fix comments in MediaRecorder.java
- AudioPolicyService server side was not checking source parameter at
all, so if the client wrapper was bypassed, invalid values could be
passed into audio HAL
- JNI android_media_AudioRecord_setup was checking source for positive
values, but not negative values. This test is redundant, since already
checked at Java and now checked by AudioPolicyService also, but might
as well make it correct.

Change-Id: Ie5e25d646dcd59a86d7985aa46cfcb4a1ba64a4a
udioRecord.h
udioSystem.h
AudioPolicyService.h
tagefright/AudioSource.h
2b1892db4a2ab47bfc09e59a4c11751aea99e4ea 26-Jan-2012 Andreas Huber <andih@google.com> The software AAC encoder is now an OMX component.

Yay.

Change-Id: I74938a20b4e0a622836ea5184d3761180eb0f5de
tagefright/OMXCodec.h
335787fe43596f38ea2fa50b24c54d0823a3fb1d 21-Jan-2012 Glenn Kasten <gkasten@google.com> Remove AudioFlinger dependencies on client

Change-Id: Ibb591e41a3ca5d7015e2b66b98b8fef5f415fb37
udioTrack.h
58f30210ea540b6ce5aa6a46330cd3499483cb97 12-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_format_t consistently, continued

Was int or uint32_t.

When AudioFlinger::format can't determine the correct format,
return INVALID rather than DEFAULT.

Init mFormat to INVALID rather than DEFAULT in the constructor.
Subclass constructors will set mFormat to the correct value.

Change-Id: I9b62640aa107d24d2d27925f5563d0d7407d1b73
udioRecord.h
udioSystem.h
AudioFlinger.h
AudioPolicyService.h
31acba114c686e7364fd8875c89e48acb32f9733 20-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead file include/media/thread_init.h"
ea3cc3bca949139e401b77f2ac0cce7ac6e76f8f 20-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Remove dead setRingerMode(mode, mask)"
03e9231e4f29a332df13d06bd90dc1fe28eb36e3 19-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead file include/media/thread_init.h

Change-Id: I98688bb7109b5f82953988935c7c33fe3c7f4ec0
hread_init.h
27a0d83f53ddbfd6449ab0e3c786742a2cd135a9 19-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Fix incorrect includes of AudioTrack.h"
a3f1fa308728976fc9ca1b4f37d26e633b32b9ac 18-Jan-2012 Glenn Kasten <gkasten@google.com> Fix incorrect includes of AudioTrack.h

Remove unnecessary includes of AudioTrack.h.
Use forward declaration of class names in preference to #include when possible.

Change-Id: I12982811fa75c2c7695d8bbfa595a7aaec047dc0
udioRecord.h
0b07b8085d7b837b4dd5f09e0c8c39408f6bdbf7 18-Jan-2012 Glenn Kasten <gkasten@google.com> Remove dead setRingerMode(mode, mask)

Change-Id: Ia4cc8be8424a40b3dcb7ebd0264fdff4e5247f7f
udioSystem.h
AudioPolicyService.h
c813985abd8ba61e999b3505f6a332574f87a1be 18-Jan-2012 Andreas Huber <andih@google.com> Temporarily restore AudioSystem/AudioTrack APIs with their former signatures

until we get updated prebuilts from vendor.

Change-Id: I8aae81d2513edca0ab268053a11c8c4206879e61
udioSystem.h
udioTrack.h
63ad6aacc6ce6b729bf25f41376cfea731a2c1eb 18-Jan-2012 Eric Laurent <elaurent@google.com> Merge "audio framework: manage stream volume per device"
83844cc2f95dc279015b47fd1e18c7cb4eabe9a1 19-Nov-2011 Eric Laurent <elaurent@google.com> audio framework: manage stream volume per device

Improve volume management by keeping track of volume for each type
of device independently.
Volume for each stream (MUSIC, RINGTONE, VOICE_CALL...) is now maintained
per device.

The main changes are:
- AudioService now keeps tracks of stream volumes per device:
volume indexes are kept in a HashMap < device , index>.
active device is queried from policy manager when a volume change request
is received
initalization, mute and unmute happen on all device simultaneously
- Settings: suffixes is added to volume keys to store each device
volume independently.
- AudioSystem/AudioPolicyService/AudioPolicyInterface: added a device argument
to setStreamVolumeIndex() and getStreamVolumeIndex() to address each
device independently.
- AudioPolicyManagerBase: keep track of stream volumes for each device
and apply volume according to current device selection.

Change-Id: I61ef1c45caadca04d16363bca4140e0f81901b3f
udioSystem.h
AudioPolicyService.h
0696400a6bb9abbed62b3b9c6aa105495dc600a2 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_mode_t consistently"
a9b21c5a7c24fe14d20372263c0bf5faf3d3e348 17-Jan-2012 Glenn Kasten <gkasten@google.com> Rename Visualizer::mLock

This avoids confusion with parent class AudioEffect's mLock which is
protected.

Change-Id: I2ae0b0869fe3c606f682252973795b34477951d0
isualizer.h
613882293184e575a44bff681a3decaefe889e69 17-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use size_t for frame size"
b9980659501d0428d65d8292f3c32da69d37fbd2 11-Jan-2012 Glenn Kasten <gkasten@google.com> Use size_t for frame size

except in the control block, where we don't have room.

In AudioFlinger::ThreadBase::TrackBase::getBuffer,
read the frame size from control block only once.

Change-Id: Id6c4bccd4ed3e07d91df6bbea43bae45524f9f4e
udioRecord.h
udioTrack.h
fff6d715a8db0daf08a50634f242c40268de3d49 13-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_stream_type_t consistently

At native level it was a mixture of audio_stream_type_t, int, uint32_t,
and uint8_t. Java is still int. Also fixed a couple of hard-coded -1
instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0
instead of AUDIO_STREAM_VOICE_CALL.

Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioPolicyService.h
MediaPlayer.h
ediaPlayerInterface.h
oneGenerator.h
ediaplayer.h
09192653e836b21689f004bf8dee375356641181 13-Jan-2012 James Dong <jdong@google.com> Merge "Separate sniffing from session initialization"
9d2f386dd2885eaffa11fd494ae258bb09fe6397 10-Jan-2012 James Dong <jdong@google.com> Separate sniffing from session initialization

This avoid lengthy/duplicate sniffing for drm plugins when a decrypt session is opened

o The change is backward compatibile in that no update is required
for existing drm plug-ins if they do not plan to provide separate
sniffer/extractor

related-to-bug: 5725548

Change-Id: I7fc4caf82d77472da4e2bc7b5d31060fb54fd84c
tagefright/DataSource.h
tagefright/FileSource.h
tagefright/MediaExtractor.h
4cc55d53d542c4f4ed645738cebb65b9e7eb6c44 12-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Use audio_format_t consistently"
f78aee70d15daf4690de7e7b4983ee68b0d1381d 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_mode_t consistently

It was int or uint32_t.
Also make getMode() const.

Change-Id: Ibe45aadbf413b9158e4dd17f2b3bcc6355288d37
udioSystem.h
AudioFlinger.h
AudioPolicyService.h
544096247a907bc55688e5c03d5586ba5219d82a 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Fix bug in JetPlayer::loadFromFile"
0132e12ded92529b1520ad62f5134fa31361c90b 11-Jan-2012 Glenn Kasten <gkasten@google.com> Merge "Declare IAudioTrack methods in binder opcode order"
0049acfc8b1c33eb90afc925dacd08a487618e17 10-Jan-2012 Glenn Kasten <gkasten@google.com> Fix bug in JetPlayer::loadFromFile

A long pathname would corrupt the heap due to incorrect use of strncpy.

Also was using hard-coded constant 256 instead of PATH_MAX.

Change-Id: Iba382bbb38624fbc41fec91449f9814f77d4ac0d
etPlayer.h
1099586bd48a8a90bb1cc4e7c279703bc7259214 03-Jan-2012 Glenn Kasten <gkasten@google.com> Declare IAudioTrack methods in binder opcode order

This makes it easier to match up the declarations.

Change-Id: I0996c20b2903b778b356dfe52b07b0ec634855dd
AudioTrack.h
e1c3962e268ffc12bfd1bd9ea84da1f135f36960 04-Jan-2012 Glenn Kasten <gkasten@google.com> Use audio_format_t consistently

Was int, uint32_t, uint16_t, and uint8_t with 2-bit bitfield.
Also replace 0 by AUDIO_FORMAT_DEFAULT and replace 1 by
AUDIO_FORMAT_PCM_16_BIT.

Change-Id: Ia8804f53f1725669e368857d5bb2044917e17975
udioTrack.h
MediaPlayerService.h
ediaPlayerInterface.h
ediaplayer.h
9a2aaf927e56a4b4acab23ef16b3f133a9f48a63 03-Jan-2012 Glenn Kasten <gkasten@google.com> Clean up AudioTrack::mActive and stopped()

mActive is protected by mLock; volatile is meaningless on SMP.

Fixed a couple of places where mActive was accessed without a lock:
- stopped()
- processAudioBuffer()

Added stopped_l() for cases where we already hold the lock.

Made mActive a bool not int.

Moved down a lock in setPosition that was being acquired too early.

Change-Id: I73ff368e991c0db9f9472df0b3f96fd33fcc7311
udioTrack.h
362c4e697d8e9c034e964ac7b40227e054491547 14-Dec-2011 Glenn Kasten <gkasten@google.com> Audio C++ comments

Change-Id: I84906ebb9dfcfa5b96b287d18364b407f02a30c1
udioTrack.h
AudioTrack.h
8afbf8e07fd1d75dfa0a517267beb6c1fa818027 30-Nov-2011 Andreas Huber <andih@google.com> am 52607c53: am d12dc284: Merge "If an error occurs that prevents us from reallocating buffers during a format change" into ics-mr1

* commit '52607c5364446df6ac5b2f55cb50e146e6023a4f':
If an error occurs that prevents us from reallocating buffers during a format change
c089d02cf2bddf1bba6eaa2b2fcce149dc44633e 30-Nov-2011 Andreas Huber <andih@google.com> am 074133b2: am 351143fb: Merge "Updated (internal) API for IStreamSource to signal discontinuities" into ics-mr1

* commit '074133b260f8d12e484e93b9aa5a33a4983b7349':
Updated (internal) API for IStreamSource to signal discontinuities
5274010d068b05333e3e5544d59ca284802b1a8e 29-Nov-2011 Andreas Huber <andih@google.com> Merge "If an error occurs that prevents us from reallocating buffers during a format change" into ics-mr1
bfcc8d8ab7c56bc013bd221a29e1ecf3a6390813 29-Nov-2011 Andreas Huber <andih@google.com> Updated (internal) API for IStreamSource to signal discontinuities

Change-Id: Idd4b9d8e7cec16b3e3c91c70e75144d42be30f96
related-to-bug: 5553055
StreamSource.h
c9260c15c1e7e2743039c964b8769379a3fff332 28-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "Make AudioTrack a RefBase so wrappers not needed"
d3d822204249eaca4259bdf46f6f0357b96e8e21 28-Nov-2011 Andreas Huber <andih@google.com> If an error occurs that prevents us from reallocating buffers during a format change

we need to transition to executing state anyway to be able to properly flush/shutdown
in the future.

Change-Id: Ie48bc09ea31942009ae3a5a45aabc9ffad9fb91f
related-to-bug: 5655016
tagefright/ACodec.h
a7e4865306b72e8eb97ee73719c897c432c53a0c 22-Nov-2011 Andreas Huber <andih@google.com> am 31626b30: am cb6fbc89: Merge "Report a runtime error instead of asserting on malformed avc configuration data." into ics-mr1

* commit '31626b3075335f4cf579342e99436bb45870cf55':
Report a runtime error instead of asserting on malformed avc configuration data.
e933cb5ae546d023ab756391a135c170874e7901 22-Nov-2011 Andreas Huber <andih@google.com> Merge "Report a runtime error instead of asserting on malformed avc configuration data." into ics-mr1
7c56bb3ac1fb758a222a0c23805704a2789657b6 22-Nov-2011 James Dong <jdong@google.com> am d0a25456: am 02740dc4: Merge "Fix log spamming during time lapse video recording" into ics-mr1

* commit 'd0a254566f5f0be5607b4d64839a575c888c94f6':
Fix log spamming during time lapse video recording
e8e5f86e9e310b065596c8cbbca1543eb833dee1 20-Nov-2011 James Dong <jdong@google.com> Fix log spamming during time lapse video recording

Change-Id: I4fc0809203684ebb02eaf217d7abad00aefc898f

related-to-bug: 5626569
tagefright/CameraSource.h
tagefright/CameraSourceTimeLapse.h
71b61a960ae30df990976ca5dbe780d85a15b0d1 18-Nov-2011 Andreas Huber <andih@google.com> Report a runtime error instead of asserting on malformed avc configuration data.

Change-Id: Ibcd9c3fb5b6532eba843ed80ecdcdacaf50d8845
related-to-bug: 5641069
tagefright/OMXCodec.h
528312c36a3ded860ead1a512df51663d03767ff 17-Nov-2011 Glenn Kasten <gkasten@google.com> Merge "JetPlayer uses C++ Thread not createThreadEtc"
a23856c0ad1f49a6ebcb71d3f63f329edc999a72 24-Jun-2011 Glenn Kasten <gkasten@google.com> JetPlayer uses C++ Thread not createThreadEtc

This permits leveraging future improvements to Thread.

Change-Id: I60deed8565ed54f13d9f770c76504e411b154276
etPlayer.h
879135196fd1c97deefc538c888037c56c2879a7 23-Jun-2011 Glenn Kasten <gkasten@google.com> Bug 4903178 Restore priority and cgroup on stop

On AudioTrack and AudioRecord stop or failed start, restore the priority
and cgroup of the caller to their previous values, rather than forcing
to NORMAL. Dependent on new thread APIs.

Also fixes bug where priority was set to AUDIO but cgroup not set.

Change-Id: Ib83893918fb4fdf57c6b87884b51038997a631d8
udioRecord.h
udioTrack.h
b68a91a70bc8d0d18e7404e14443d4e4020b3635 15-Nov-2011 Glenn Kasten <gkasten@google.com> Make AudioTrack a RefBase so wrappers not needed

Change-Id: I2305abe586ac41251af04a194bc818c110a1b293
udioTrack.h
9621addc73c029e77fd3d50f38a34f8f264b6e38 15-Nov-2011 Hong Teng <hongteng@google.com> Merge "Fix for issue 5309336 -add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage." into ics-mr1
3a9cefebd2c5d2157aefaed01c54f151dc64a5b3 10-Nov-2011 Hong Teng <hongteng@google.com> Fix for issue 5309336
-add videoeditor maximum prefetch YUV frames in media_profiles.xml to limit the total memory usage.

Change-Id: I41ffbc192fcce4c7635e5b0a1f2835852e5ee509
ediaProfiles.h
4948818cb91176df74c972ac27b2f392b5d148bc 09-Nov-2011 James Dong <jdong@google.com> Add support for retrieving location information in mp4/3gpp files

Change-Id: Ib8427704ef9ee5a4fa8fe1818c8a62d77b4ea687
related-to-bug: 5560253
ediametadataretriever.h
tagefright/MetaData.h
3901e5d87573447db33fb9930871a1f5266a9b2c 25-Oct-2011 Andreas Huber <andih@google.com> Remove surface legacy APIs and code.

All surfaces are now supported through surface textures.

Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
262620399c228b3b201c2c4b39c87508d3047d74 28-Oct-2011 Jamie Gennis <jgennis@google.com> am 08479cee: Merge "Stagefright: ANW::connect in MediaPlayerService" into ics-mr0

* commit '08479ceeba56c460fb52f60a24df27776f1936c3':
Stagefright: ANW::connect in MediaPlayerService
7dae00baa6e8957be15523c46bb948bd1dde64c3 27-Oct-2011 Jamie Gennis <jgennis@google.com> Stagefright: ANW::connect in MediaPlayerService

This change moves the ANativeWindow connect and disconnect logic from
MediaPlayer to MediaPlayerService::Client.

Bug: 5502654
Change-Id: Ifc43b98b01ad8f35d62d7ece43110724ec7fda3d
ediaplayer.h
71adab54edf9d0e2c89473d3be12edb6b9dc4549 26-Oct-2011 Jamie Gennis <jgennis@google.com> am b7b4eaaa: Merge "Stagefright: push blank buffers when tearing down" into ics-mr0

* commit 'b7b4eaaa05284634d50d581d924a250f1194f66d':
Stagefright: push blank buffers when tearing down
1765d6e0c962d2b89897c0278f969084f632d181 25-Oct-2011 Jamie Gennis <jgennis@google.com> Stagefright: push blank buffers when tearing down

This change makes OMXCodec push RGB 565 buffers filled with black to an
ANativeWindow when tearing down after decoding to protected gralloc
buffers. This allows the OMX tear down to zero out any protected
buffers that were used without the possibility that the buffer is still
being used by SurfaceFlinger or HWComposer.

Bug: 5483222
Change-Id: I8acedd81a7bb67dfdc2fd15733e3375b6ce8d560
tagefright/OMXCodec.h
1d2acaffde56ad79e6e96f228d7857863462397c 20-Oct-2011 Dave Burke <daveburke@google.com> am 23d64420: Merge "Stagefright: idle OMX after ANW errors" into ics-mr0

* commit '23d644202a44383bf008ff86f6faa3ea7e447290':
Stagefright: idle OMX after ANW errors
b1d666f5cb555d135eb69e005e88a03330bbb54c 20-Oct-2011 Jamie Gennis <jgennis@google.com> Stagefright: idle OMX after ANW errors

This change fixes an issue in Stagefright where the state of an OMXCodec
object can get out of sync with the state of the OMX component. In
particular, if one of the ANativeWindow functions failed and put the
OMXCodec into the ERROR state, this would cause Stagefright to skip
doing the Executing -> Idle transition. Without this transition the
freeBuffersOnPort call would never be made, and the MediaBuffers would
end up being leaked (which would also leak the Gralloc buffers they
reference).

Bug: 5333695
Change-Id: I85ea0cf92d18e7ef6d35c7d1e2a7b4e2c9745d34
OMX.h
f337772630b0a1b48d7828647d1079ebdc22919d 13-Oct-2011 Andreas Huber <andih@google.com> Merge "Support for an MPEG2 Program Stream extractor."
d20bf0676d6db8f12edcd2307f82409c076c7015 30-Sep-2011 Lakshman Gowda <lakshman79@ti.com> Set crop params to ANative Window during Initialization.

The native_window_set_crop() is called when port reconfig event callback comes from decoder's and
crop parameters are changed from default getconfig() OMX_IndexConfigCommonOutputCrop values.
Since the default crop params are same as port reconfig crop params, the native_window_set_crop()
is not called, hence resulting in displaying the whole frame(paddedWidth x paddedHeight).
By calling native_window_set_crop() during initilaization of output port of decoder ensures
in setting up ANative window to crop region.

Change-Id: I68926464a1f5c7e6053804615c8b9bd32ea85688
Signed-off-by: Lakshman Gowda <lakshman79@ti.com>
tagefright/OMXCodec.h
2944eca607304a095ea43ba2b8f0b9de61249f9f 08-Sep-2011 Andreas Huber <andih@google.com> Support for an MPEG2 Program Stream extractor.

Change-Id: I606d87c278f72b22a5b6d7ee57bce6b02e280d41
tagefright/MediaDefs.h
d3523f89a867afa111bb332887bf006ec3ae93e6 16-Sep-2011 Gilles-Arnaud Bleu-Laine <gilles@ti.com> Gracefuly return on detecting wrong AAC format from corrupted files

Return BAD_VALUE error upon detection of wrongly formatted files.
The client should abort the initialization upon error detection.

The current CHECK() interrupts the configurecodec() preventing a graceful
exit.

Change-Id: Ic79313fa76a63284897df5d91635de87d06f3100
Signed-off-by: Gilles-Arnaud Bleu-Laine <gilles@ti.com>
tagefright/OMXCodec.h
729de186450f78c099637e1fce743fe531862c52 28-Sep-2011 Andreas Huber <andih@google.com> Support AMR, G.711 and vorbis audio in ACodec and friends.

Change-Id: I08c03219bf2d60fc5c6e89957bd4b4c615570983
tagefright/ACodec.h
dc9bacd838442a524585887e6ea6696836be2eda 26-Sep-2011 Andreas Huber <andih@google.com> Propagate error signalled by the source all the way to the output EOS notification.

Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
tagefright/ACodec.h
669012d77b00a2aacb6fd12837f2870f9ec17865 20-Sep-2011 James Dong <jdong@google.com> Add QVGA resolution to CamcorderProfile

Change-Id: Icebbafb68d8164370f98a2c36699845d10ef081b
related-to-bug: 5145483
ediaProfiles.h
5dc2812abddde309234edc786a541d251c4f820a 15-Sep-2011 James Dong <jdong@google.com> Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications"
6de6b48237423a65ec041288c90e3f78fd3fce48 14-Sep-2011 Eric Laurent <elaurent@google.com> Merge "Issue 5298399: Lost speech after a crash in gTalk."
cfe2ba6b01a258e39f9c215ffc7b750e0b68f708 14-Sep-2011 Eric Laurent <elaurent@google.com> Issue 5298399: Lost speech after a crash in gTalk.

Fixed problem in AudioTrack::restoreTrack_l() causing a permanent
failure if the IAudioTrack interface to AudioFlinger could not be
restored at the first attempt.

Change-Id: I039d4fe2dca8d3baf71f1a6c51119f27a67b6611
udioTrack.h
9a5e04438df742c297c5dbcdb60e6fd4d8f8321d 13-Sep-2011 James Dong <jdong@google.com> Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications

Change-Id: I522a994981d86329ccc86c3b536b561dc6e40eeb
related-to-bug: 5300618
tagefright/OMXCodec.h
cc54fbaa69c0b69929467449d2c19192f15b5039 12-Sep-2011 Andreas Huber <andih@google.com> Turn an another assertion into a runtime error in ACodec's implementation

Change-Id: I6779b29f200b90d088273ab3204724ef3d8d59bd
related-to-bug: 5284760
tagefright/ACodec.h
fb6f03425a791dcc4188462c860becf6ca6be4ea 08-Sep-2011 Guang Zhu <guangzhu@google.com> Make MediaScanner skip certain directories

The list of directories to skip are configurable via setprop.
The main motivation is that some test data folder takes long time
to scan, and media scanner may compete for CPU time against perf
tests therefore skewing the results.

Bug: 5263115
Change-Id: I568213e2a4babf6033021c1d336ef0347c0e3315
ediascanner.h
d681bbb1767bed09415e050ba78975df214bcd68 30-Aug-2011 Dave Burke <daveburke@google.com> Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
MediaPlayer.h
MediaPlayerService.h
ediaplayer.h
77d2e08add3ba24fdc527809408028efe3e06b6b 01-Sep-2011 Pannag Sanketi <psanketi@google.com> Merge "Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource"
ed362eccc7eabc669f9f39169e26662a7215d198 30-Aug-2011 Pannag Sanketi <psanketi@google.com> Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource

The buffers in SurfaceMediaSource were 4 earlier, whereas
we need 5 for one of the devices.

Change-Id: I87bf5e28bbb0f7c9661dc01b040baa903d95d2c2
tagefright/SurfaceMediaSource.h
af6764da53c022768290e735bbcc3088bec333d8 31-Aug-2011 Eino-Ville Talvala <etalvala@google.com> Merge "Fix SurfaceMediaSource timestamp handling."
b76e90de3c64626fe07a68469d0a59a31c8efb6b 30-Aug-2011 Eric Laurent <elaurent@google.com> Merge "226483: A2DP connected, but music out to speaker"
df4a59c61103e7e0e9332e167a0be67da5d82ff3 30-Aug-2011 Eino-Ville Talvala <etalvala@google.com> Fix SurfaceMediaSource timestamp handling.

Was not basing timestamps on startTimeUs.
Now synchronizes properly with audio.

Bug: 4510826
Change-Id: I613db0aa91e51fc75d120e65540e742d8ab2ae43
tagefright/SurfaceMediaSource.h
9f6530f53ae9eda43f4e7c1cb30d2379db00aa00 30-Aug-2011 Eric Laurent <elaurent@google.com> 226483: A2DP connected, but music out to speaker

When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
udioSystem.h
6004f2dc9af4088e34cc72b1ac3c4a3c5cd4ae14 27-Aug-2011 Pannag Sanketi <psanketi@google.com> Merge "Modify enum value of OMX_COLOR_FormatAndroidOpaque"
790332a3170f967d58cee5d89cc92be8205d9aa3 27-Aug-2011 Pannag Sanketi <psanketi@google.com> Modify enum value of OMX_COLOR_FormatAndroidOpaque

The enum value chosen earlier had a conflict with one of the vendors.

Change-Id: I47832dd1157447f89324d56e8ab146260cd7927c
tagefright/openmax/OMX_IVCommon.h
d2824a9a392e02a09929a34f0a3dad41ac1faacf 26-Aug-2011 Andreas Huber <andih@google.com> Merge "Support for posting messages and synchronously waiting for a response."
cd07594333cbe8b2c86c6609cce01a74d6cc33f8 26-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 4364249 Play position is 0 after flushing AudioTrack

AudioTrack::stop() is not synchronous, so a stop() followed
by flush(), which is synchronous, will not always report
a playhead position of 0 after being called.
This CL adds a flag to mark a track as flushed, and report the
correct playhead position in this state.
Bug 5217011 has been created to address the real issue in the
future, where flush could be made synchronous, to properly
address bug 4364249.

Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12
udioTrack.h
5df775d2f509c76e76a46615fca83dba95299f6e 26-Aug-2011 Andreas Huber <andih@google.com> Support for posting messages and synchronously waiting for a response.

Change-Id: Id6c7a08c34fd5cb6c4632f78ece9e7898b29e52c
tagefright/foundation/ALooperRoster.h
tagefright/foundation/AMessage.h
0c5c7d2b119d2350c186ae9902919bcf28c3e277 19-Aug-2011 Pannag Sanketi <psanketi@google.com> Testing the GL/ CPU encoding w/ Gralloc buffers

This is the test for Gralloc buffers based encoding.
contains a combination of two main changes:

1. GL based encoding tests added to SurfaceMediaSource_test

2. SurfaceMediaSource ::read() colorformat

The SurfaceMediaSource::getformat() sets it to OMX_COLOR_FormatAndroidOpaque.
The omx encoder needs to interpret that colorformat and reads the format
from the Gralloc buffers directly

Change-Id: Iee2fe8901384109a4952e1d6c528c59eb01eb5b1
tagefright/SurfaceMediaSource.h
tagefright/openmax/OMX_IVCommon.h
8f74b712fbf5c24de8bc799b7129dc802747a6f4 13-Aug-2011 Rajneesh Chowdury <rajneeshc@google.com> Fix for 4142219 Don't hard code platform-specific limitations (Jni/ Java)

Also fixes 5118207 add other video codec support for video editor export.

Change-Id: If72427173bd8ff684af07ba00f4425c1deef29c6
ediaProfiles.h
c92fd24c10a6bf80b346d7e261325434d9c6964b 16-Aug-2011 Andreas Huber <andih@google.com> Error handling in ACodec and Nuplayer.

Codec errors (and codec not found errors) now trigger a controlled shutdown
of playback and signal errors to the MediaPlayer client.

Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
tagefright/ACodec.h
db7c079f284f6e91266f6653ae0ec198b1c5006e 10-Aug-2011 Eric Laurent <elaurent@google.com> Audio effects: track CPU and memory use separately

Before this change, CPU and memory usage for an audio effect were
registered and checked against the limit by audio policy manager
upon effect instantiation. Even if an effect was not enabled
it would prevent another effect to be created if the CPU load budget
was exceeded, which was too restrictive.

This change adds a method to register/unregister CPU load only when
an effect is enabled or disabled.
It also adds a mechanism to place all effects on the global output mix
in suspend state (disabled) when an effect is enabled on a specific session.
This will allow applications using session effects to have the priority
over others using global effects.

Also fixes some issues with suspend/restore mechanism:
- avoid taking actions when an effect is disconnected and was not enabled.
- do not remove a session from the suspended sessions list when corresponding
effect chain is destroyed.

Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
udioSystem.h
AudioPolicyService.h
17741baf43818ca66c2a88db6b6e252d7abfff49 10-Aug-2011 Andreas Huber <andih@google.com> Revert "Notify the OMX component that it's going to be used in "secure" mode."

This reverts commit 7616178271e95f009452a21ea45e7225997dc27a.
tagefright/HardwareAPI.h
tagefright/OMXCodec.h
129a94a569c927d4c8906a12f3de74ca0585d3f2 10-Aug-2011 Mathias Agopian <mathias@google.com> Merge changes Ie06e73e5,I7ac6b5b0

* changes:
free all buffers when ANativeWindow::disconnect is called
return correct value from query after connecting a surface
3a34befc6fb04a4945a849e8bda8b84e4bf973fe 02-Aug-2011 Marco Nelissen <marcone@google.com> Keep effects sessions active when the caller dies.

Don't remove effects until the session they are in goes away or all
AudioEffects have been explicitly released. This allows the control
panel process to die without stopping the effects.

Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
udioSystem.h
AudioFlinger.h
820a509687599edb8ff1a7577de8b9295f416263 09-Aug-2011 Mathias Agopian <mathias@google.com> return correct value from query after connecting a surface

the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.

Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
tagefright/SurfaceMediaSource.h
a1f10e8959cd4656aedb2613e855342102e59555 09-Aug-2011 Andreas Huber <andih@google.com> Notify the OMX component that it's going to be used in "secure" mode.

Change-Id: Id87c4b295eb38f7d24045918e73df298d7b842f9
related-to-bug: 5137212
tagefright/HardwareAPI.h
tagefright/OMXCodec.h
f89d780df70b7fbb8465bce4913c46cca019721f 05-Aug-2011 Andreas Huber <andih@google.com> Eliminate superfluous memcpys by wrapping an ABuffer in a MediaBuffer

Change-Id: I1313f117cd7cdfaf7d6ec25413a0b4b8ea495037
related-to-bug: 5122973
tagefright/MediaBuffer.h
cd25fed09742235fac10953b9d4b77268c695063 25-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 4599730 Get audio channel count on MediaPlayer

Related changes:
- Fix bug in get/setParameter* to recycle Parcels when done with them.

Change-Id: Iaff05e91bbd99a14fccb79d816dd873359b6ae65
ediaplayer.h
b283ac1ac6758aba907bfe56713d279e8aafd38b 26-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Adding Metadata mode to SurfaceMediaSource"
6e6e8a6cc9ab99ab299929fa0246e6ced64f8ce3 25-Jul-2011 Eric Laurent <elaurent@google.com> Merge "Added APIs for audio preprocessing"
57dae99c9fcd6becd2b5ed0c53f277ba4d7dbcfc 24-Jul-2011 Eric Laurent <elaurent@google.com> Added APIs for audio preprocessing

Added APIs to control pre processes applied on captured audio.
Those APIs are still hidden until reviewed by API council.

Three types of standard pre processes are supported:
- Automatic Gain Control (AGC) by AutomaticGainControl class
- Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class
- Noise Suppression (NS) by NoiseSuppressor class

A method is added to AudioEffect class to query audio pre processings
applied by default by the platform on a given AudioRecord session ID.

Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
udioEffect.h
AudioPolicyService.h
a4635b0cde4a4b7bf0f9aed6aaade60d88eb2fe6 25-Jul-2011 James Dong <jdong@google.com> Merge "Do not support still image capture mode for timelapse video recording"
be1cc822304d3a29c106ad5b6f330aed3e8c5658 24-Jul-2011 James Dong <jdong@google.com> Merge "Do not wait forever for output buffers in OMXCodec.cpp and error out in case time out happens"
726e4527b7a750e688fec4c1e7c5f7b9a33d1623 24-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "QueryCodecs() signature change"
3cecf640c4daf2df616b278bd9986018c8182908 30-Jun-2011 James Dong <jdong@google.com> Do not support still image capture mode for timelapse video recording

related-to-bug: 4973779

Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
MediaRecorder.h
ediarecorder.h
tagefright/CameraSourceTimeLapse.h
a361483bb5dbd3bbf132c5b99b2df7d197c3fc50 14-Jul-2011 Pannag Sanketi <psanketi@google.com> Adding Metadata mode to SurfaceMediaSource

SurfaceMediaSource operates in metadata mode only, i.e. just the
metadata is stored in videobuffers. SurfaceMediaSource passes the Gralloc
buffer handle along with a 4 byte 'type' (indicating that the metadata
is of type GrallocSource) to the encoder as opposed to the
GrallocBuffer itself.

Related to bug id: 4529323

Change-Id: I83aebc0dd10f317658cdf70be5802dfc35a1e72d
tagefright/MetadataBufferType.h
tagefright/SurfaceMediaSource.h
77882a8deb5167235ae591e49c9dcff9abb373c1 23-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Connect MediaRecorder Native to SurfaceMediaSource"
d35924d9928f29dcee6f5666b5bbd084640c7b34 22-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> QueryCodecs() signature change

Restore QueryCodecs() signature exactly as used by third-party libs.
Add an alternative function to select HW only codecs.

Change-Id: Ibb2cb4dd36fc0c6599eb93aa5751c216397e3b6f
tagefright/OMXCodec.h
29a142c7237821b6dc7bd1e8b56bb1efdc56767b 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add the abandon method.

This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.

Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
tagefright/SurfaceMediaSource.h
b33f3407bab0970a7f9241680723a1140b177c50 02-Jul-2011 Pannag Sanketi <psanketi@google.com> Connect MediaRecorder Native to SurfaceMediaSource

Making a connection from MediaRecorder Native layer to the
SurfaceMediaSource for the purpose of encoding GL Frames. This will be
called from the java side inside the Mobile Filter Framework.

The mediarecorder native layer (client), when set the videosource to
option VIDEO_SOURCE_FRAMES, asks the StageFrightRecorder on the mediaserver
side to create a SurfaceMediaSource object and pass it back as a
sp<ISurfaceTexture> object. Using that, the client side will dequeue and
queue buffers. Connecting the GL Frames to the obtained
sp<ISurfaceTexture> is not part of this CL.

Related to bug id: 4529323

Change-Id: I651bec718dd5b935779e7d7a050b841c2d0b0fcd
MediaRecorder.h
ediaRecorderBase.h
ediarecorder.h
tagefright/SurfaceMediaSource.h
85eafc680a0bf5e0253cf611ac525769fc9bef3e 22-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceMediaSource: remove getAllocator method

This change removes the getAllocator method from SurfaceMediaSource
because that method is no longer a part of the ISurfaceTexture
interface.

Change-Id: I0e2f0bc3bc1c8cd3c1b4b14246f07b9b4e3066c3
tagefright/SurfaceMediaSource.h
fe388eedca9f46ed3fee9579258acecd93e88641 22-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Renaming SurfaceEncoder to SurfaceMediaSource"
10b7197cf9016093bdff20b6f7768543fd1c5720 22-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Adding SurfaceEncoder for encoding FilterFrames"
0683eba6b35c396c21f10e926709f2f8fc05f090 18-Jul-2011 Andreas Huber <andih@google.com> Retry datasource fetches a few times before giving up (NuCachedSource2).

Change-Id: I147fc18ef55bc89d2e2fee69b7869c45abbfdd6b
related-to-bug: 3405354
tagefright/DataSource.h
1a2fafbaa36390a06cc9a066fcbe147c8c47ea77 01-Jul-2011 Pannag Sanketi <psanketi@google.com> Renaming SurfaceEncoder to SurfaceMediaSource

Related to bug id: 4529323

Change-Id: Id820d45a536bd2c65e0a59def564eb5b3ea4a71c
tagefright/SurfaceEncoder.h
tagefright/SurfaceMediaSource.h
3399b7267185646c69b04352211fca4fad9d7547 11-Jun-2011 Pannag Sanketi <psanketi@google.com> Adding SurfaceEncoder for encoding FilterFrames

Adding SurfaceEncoder which can be used to encode
custom frame data. In a sense, it is reverse
of what SurfaceTexture does.

SurfaceEncoder takes in frames from a native window and
passes them to an encoder, thus acting like a MediaSource.
It uses GRAlloc buffers underneath for passing data.
The client side sets the geometry, format in the beginning,
which cannot be changed while the recording is going on.

Currently, there is no common pixel format that both
GRAlloc and HAL understand.
Also, the encoder cannot encode using the data from the GRAlloc
buffers.

The SurfaceEncoder_test examines mainly the buffer passage
since true encoding cannot be done at this point.
SimpleDummyRecorder 'reads' the frames in the same thread
as the start(), whereas DummyRecorder 'reads' in a separate
thread much like the MPEG4Writer. The test with DummyRecorder
is much closer to the real encoding implementation.

Related to bug id: 4529323

Change-Id: I58ec19a150f8fe4d6195196dc44f55002b46c7c8
tagefright/HardwareAPI.h
tagefright/MediaSource.h
tagefright/SurfaceEncoder.h
59d49c0b3b56b24c5b6d98cdfdcd75c537322f2e 20-Jul-2011 Pannag Sanketi <psanketi@google.com> Adding AndoirdOpaque Colorformat to OMX

Adding an enum to indicate an android opaque OMX
colorformat. This will inform the encoder that
the actual colorformat will be relayed by the
Frames read from the GRAlloc Buffers

Related to bug id: 4529323

Change-Id: Iddc5bd1ce8ca2b2506a57aadf5fc91ff0c7b78ef
tagefright/openmax/OMX_IVCommon.h
a1d92359056176b6f6646efc918e0587e3de2b6f 21-Jul-2011 Hong Teng <hongteng@google.com> Merge "fix for issue 4142219 Don't hard code platform-specific limitations-jni/java part"
3a1f8a404b38aaa82d57c77cb83e48665e66e553 21-Jul-2011 Jeff Brown <jeffbrown@google.com> Merge "Untangle MediaScanner error handling. Bug: 5056917"
0cd7889d37cc60300dceaa975dab041fd35e34fd 21-Jul-2011 Eric Laurent <elaurent@google.com> Merge "Audio framework: support for audio pre processing"
7188e55f54a43c55fd6b96454720c447f1dc454e 21-Jul-2011 Jeff Brown <jeffbrown@google.com> Untangle MediaScanner error handling.
Bug: 5056917

Change-Id: I1a7a73579e3ba4e9709459329fc1901a28b0f4b1
ediascanner.h
tagefright/StagefrightMediaScanner.h
cabd5f867ec69c0dfe8333cba46323cb58917402 07-Jul-2011 Hong Teng <hongteng@google.com> fix for issue 4142219
Don't hard code platform-specific limitations-jni/java part

Change-Id: Icde261b1caf29a8cf552884c97f3c9d0b41741a3
ediaProfiles.h
4a621e6d3438876eb1d9001719c688a2329ee675 19-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "MediaPlayer: add ANativeWindow (dis)connect calls"
db4d3717b4677b3239546a248dc0a7d82db4ba50 18-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add option to query hardware decoders only"
df57a0d6d3b0609e69ff79afa63fe44dfa91f6f5 18-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Add option to query hardware decoders only

Add an option to OMXCodec::QueryCodecs() to filter out
software codecs.

Update stagefright command line tool to list the roles of codecs.

Change-Id: Icddb79118c30fe13cc3aea20f340174cc082c4e0
tagefright/OMXCodec.h
7c7f10bd4fda9a084e5e7f0eb3a040dfcbf01745 18-Jun-2011 Eric Laurent <elaurent@google.com> Audio framework: support for audio pre processing

Audio effect framework is extended to suport effects on
output and input audio path.

AudioFlinger: Support for audio effects and effect chains is
moved from PlaybackThread class to ThreadBase class so that
RecordThread can manage effects.
Effects of type pre processing are allowed on record thread
only. When a pre processing is enabled, the effect interface handle is
passed down to the input stream so that the audio HAL can call the
process function. The record thread loop calls the effect chain process
function that will only manage the effect state and commands and skip the
process function.

AudioRecord: The audio session is allocated before calling getInput() into
audio policy serice so that the session is known before the input theead is
created and pre processings can be created on the correct session.

AudioPolicyService: default pre processing for a given input source are
loaded from audio_effects.conf file.
When an input is created, corresponding effects are created and enabled.

Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
udioEffect.h
udioSystem.h
AudioPolicyService.h
a57a9a491272aa884494b2ec7854960827a73742 16-Jul-2011 James Dong <jdong@google.com> Do not wait forever for output buffers in OMXCodec.cpp and error out in case time out happens

o Deal with vendor codec hang bug

Change-Id: Ic8449afd43045f09a9e0bd3d1be9a320e59ccabe
tagefright/OMXCodec.h
61c7ef5bde2c7ed94a078396aa65da67b47e5402 13-Jul-2011 Jamie Gennis <jgennis@google.com> MediaPlayer: add ANativeWindow (dis)connect calls

This change makes MediaPlayer connect to the ANativeWindow to which it
is going to render video frames and disconnect when it is done.

Change-Id: I88ab5c2fe62493aabdc84a283ff31634f795d415
ediaplayer.h
15825c7b6f6b19092a5949b4e46aea4fa229932c 14-Jul-2011 James Dong <jdong@google.com> Merge "Support profile and level query for SW video decoders"
dab718bba3945332dc75e268e1e7f0fe2eb91c4a 14-Jul-2011 Andreas Huber <andih@google.com> Remove legacy http support from stagefright, chromium is the new hotness.

Change-Id: I6725d42d38b91e6a1cbca43174870f445aeb3d99
tagefright/ShoutcastSource.h
42e549e4ab54802d788c43e3a04a85b7a1a95e97 13-Jul-2011 Andreas Huber <andih@google.com> Enable signalling of a stream discontinuity involving a format-change

through IStreamListener.

Change-Id: Ic0409cdc4891ad26b61f2f98bdda3c7fb2e2de6a
related-to-bug: 5022434
StreamSource.h
5a5f9d636ed6c116993c6cad5abdad7a734992e8 12-Jul-2011 James Dong <jdong@google.com> Make MetadataBufferType.h C-friendly

Change-Id: I4388d8f6cf30f08858aec73aa971647feae4a5e3
tagefright/MetadataBufferType.h
3623b481fa2734b95d4553dafabca931e5d0502a 11-Jul-2011 James Dong <jdong@google.com> Merge "Do not wait for unlaunched threads in stop()"
411ba422e3635d534928ffd81abf54f4f291c739 09-Jul-2011 James Dong <jdong@google.com> Do not wait for unlaunched threads in stop()

Change-Id: If681749753bb96ee98c1539658cfd919eeb0cb65
tagefright/MPEG4Writer.h
457116d3a01618acf9a875020ca5860551ba03a6 11-Jul-2011 James Dong <jdong@google.com> Support profile and level query for SW video decoders

Change-Id: I9c20db128be96cd36cf2083e08e8c21f5e6d1fdf
OMX.h
tagefright/OMXCodec.h
ae4c1ac6401185539c03ce0819e174fd1b04b136 09-Jul-2011 James Dong <jdong@google.com> Release camera if CameraSource::start() has not been called

Change-Id: I2f7e4b8501db3d80b9aa6f99d896d778bec29e8c
tagefright/CameraSource.h
6d8b694d999e9be7d5dcc336535832a80fb6f61f 24-Jun-2011 Eric Laurent <elaurent@google.com> Moved and renamed effect API header files

Moved specific effect header files to
system/media/audio_effects/include/audio_effects
and renamed to lower case (effect_xxx.h).

Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
ffectBassBoostApi.h
ffectEnvironmentalReverbApi.h
ffectEqualizerApi.h
ffectPresetReverbApi.h
ffectVirtualizerApi.h
ffectVisualizerApi.h
isualizer.h
5895e970ae119210773a5184c019178e2516b132 06-Jul-2011 Gloria Wang <gwang@google.com> Merge "- Retrieve is_drm in MediaMetadataRetriever. - Add one more column in MediaStore to indicate whether a media file is drm-protected. - Remove old DRM code from Ringtone - Use the new DRM code in RingtoneManager"
0d0edfb024f65f7e1097bf1814ae229ce9cb367d 27-Jun-2011 Gloria Wang <gwang@google.com> - Retrieve is_drm in MediaMetadataRetriever.
- Add one more column in MediaStore to indicate whether a
media file is drm-protected.
- Remove old DRM code from Ringtone
- Use the new DRM code in RingtoneManager

Change-Id: I1311fd1c04841c2cd47df6c901589966cf55a692
ediametadataretriever.h
tagefright/MediaExtractor.h
13b263c0fb2f03f12089150c3d05b545c25257ca 01-Jul-2011 Andreas Huber <andih@google.com> Merge "Charge network traffic to the uid of the process using the MediaPlayer."
3eeab1a71b7e222b60c5413916c2f3c7ec61e37d 01-Jul-2011 James Dong <jdong@google.com> Merge "Add extended metadata buffer support by defining different types of metadata buffers"
9b80c2bdb205bc143104f54d0743b6eedd67b14e 01-Jul-2011 Andreas Huber <andih@google.com> Charge network traffic to the uid of the process using the MediaPlayer.

Change-Id: I2bcb54b8232afd3fc7ee16289f37c7a7b3f23067
related-to-bug: 4517282
ediaPlayerInterface.h
0bb6b4c5da2451ee0973372b0a3858b15c742689 30-Jun-2011 Andreas Huber <andih@google.com> Support a "secure input buffer" mode for use by Widevine DRM in OMXCodec.

Change-Id: Ie03b285265099dbac9b12f3f41d9ad758d0b50ad
tagefright/MediaSource.h
tagefright/MetaData.h
tagefright/OMXCodec.h
32eea24fe93fd43e8078b1080db17304b27ed95a 28-Jun-2011 James Dong <jdong@google.com> Add extended metadata buffer support by defining different types of metadata buffers

Change-Id: I6aa6b5da004c240c9986f6b9036950e234c8bd42
tagefright/MetadataBufferType.h
3e1763ecdf14769a534f75e94a56785f63174b47 28-Jun-2011 Andreas Huber <andih@google.com> Support for writing output data to a provided callback function instead of a file

in MPEG2TSWriter

Change-Id: Ie54a5677c7b789a973aa50b7f197c6db238425bc
tagefright/MPEG2TSWriter.h
1065b3f17d3048948e7d522049d1980b90df3dc1 28-Jun-2011 Andreas Huber <andih@google.com> Multiple changes to ACodec/codec tools:

Make sure sf2 does not coalesce input buffers, generalize ACodec's codec
instantiation based on OMXCodec's list of eligible component names.

Some changes/additions to the "sf2" commandline tool

Make surface options consistent with stagefright tool, i.e. use '-S' instead of '-s'
New option '-R' renders surface-allocated buffers.

Also fixes a longstanding bug introduced when generalizing from surfaces to native windows that never used surface-allocated buffers in sf2 even when the option was specified.

Change-Id: I59fd533f0f6ef0337ebe2806ddc81a46878eb3ae
tagefright/OMXCodec.h
4ca2c7c913f8bd4ada13aca56d36045d42d1e00f 01-Jun-2011 Wu-cheng Li <wuchengli@google.com> Add framework support for camcorder zoom.

The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
startRecording()
stopRecording()
releaseRecordingFrame()

ICameraRecordingProxyListener
dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
(1) The app: MediaRecorder.start().
(2) The recorder: ICamera.unlock() and ICamera.disconnect().
(3) The recorder: ICameraRecordingProxy.startRecording().
(4) The app: ICamera.reconnect().
(5) The app: ICamera.startRecording().
4. During recording
(1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
(2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
(1) The app: MediaRecorder.stop()
(2) The recorder: ICameraRecordingProxy.stopRecording().
(3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
MediaRecorder.h
ediaRecorderBase.h
ediarecorder.h
tagefright/CameraSource.h
tagefright/CameraSourceTimeLapse.h
cb62bc3fe54222cf05824e6f98fefafee552049a 22-Jun-2011 Anu Sundararajan <sanuradha@ti.com> Integrating TI OMAP4 Video Decoder

Added the video decoder component name to kDecoderInfo.
Set the quirks for the video decoder.
Add a new color format to OMX_IVCommon.h to denote TI OMAP4 NV12 color format.
Added a color conversion routine [ from NV12 to RGB ] for thumbnail generation.

Change-Id: I6b23c36441645ef65ec7406ba262d19f89cf64fd
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
Signed-off-by: Sreenidhi Koti <sreenidhi@ti.com>
Signed-off-by: Anu Sundararajan <sanuradha@ti.com>
tagefright/ColorConverter.h
tagefright/openmax/OMX_IVCommon.h
8e51d58fca9b7669f271378f9245e180f4360cbc 23-Jun-2011 Gloria Wang <gwang@google.com> - Public part of the Metadata API.
- Modify the media framework test for Metadata.

Change-Id: Ib8fa4991f114e1bb88a17ca662844b9b8e1d0faf
etadata.h
3b573f7bf1c5736d500e39013b8d32478a1429e6 01-Jun-2011 Gloria Wang <gwang@google.com> Timed text display format support:
1. Extract 3GPP global format descriptions
2. Extract 3GPP local format descriptions
3. Define data structure (TimedText) for applications to
retrieve the format metadata

Change-Id: I6eac2a78df29ee15beee456656331fdd83b24e8e
tagefright/MetaData.h
3f1545d22a71f960c9598a24e7e48ec16dd16267 14-Jun-2011 Dima Zavin <dima@android.com> Merge "audio: update for audio/audio_policy header names/locations"
7394a4f358fa9908a9f0a7c954b65c399f4268e6 14-Jun-2011 Dima Zavin <dima@android.com> audio: update for audio/audio_policy header names/locations

Change-Id: I36c49352eee57559403cd1597f56a8485a360289
Signed-off-by: Dima Zavin <dima@android.com>
udioSystem.h
AudioPolicyService.h
965e4239ca1cf6c824c1f8ce23116f9ba8cf6ebd 08-Jun-2011 James Dong <jdong@google.com> Add B frame support for MPEG4Writer

o requires the support of negative ctts duration values (ctts version 1)

Change-Id: Ib14130c9359c3bff3c76f20a7380d468a065dcaf
tagefright/MetaData.h
tagefright/OMXCodec.h
a0b1d4b161599c2bb2a47119e50c51e75bbe980e 08-Jun-2011 Andreas Huber <andih@google.com> Make dumpsys(media.player) more useful by having AwesomePlayer populate it.

Change-Id: I12ba7d542331a8293d67a0d47378b8be4f777759
ediaPlayerInterface.h
57ca262f8d1c0aabeea294ddb53e4db172fc6bec 03-Jun-2011 James Dong <jdong@google.com> Move OMX_QCOM_COLOR_FormatYVU420SemiPlanar definition to OMX_IVCommon.h

Change-Id: I5cbc7246a63301fa7ff735fa3d6512e940608d2b
tagefright/openmax/OMX_IVCommon.h
b33d2ac90cfce0fe6db8c3e979e7ae2bbfc28163 02-Jun-2011 James Dong <jdong@google.com> Do not call getEstimatedBandwidth if the streaming is not HTTP-based

Change-Id: I4ab6c57e5b2b989676b8dfbb98402d10a5752261
tagefright/DataSource.h
d217a8c4632b3e3065f8c2a26b9ce4dc4c97171f 02-Jun-2011 Glenn Kasten <gkasten@google.com> Revert "Use AudioTrack::event_type not int in callback"

This reverts commit 2225e4b7049fa3fb9d39a068b8268b63c952d7c1
udioTrack.h
oneGenerator.h
tagefright/AudioPlayer.h
013b5a67d6f8e12a1b06e74863daec1bee4d99c1 05-May-2011 Glenn Kasten <gkasten@google.com> Use AudioTrack::event_type not int in callback

Change-Id: Ifefc708d46874e04fd0d01cb6e2d43b987ee796c
udioTrack.h
oneGenerator.h
tagefright/AudioPlayer.h
8a72c54e74eb365971288a81687e5c2aa47963e7 01-Jun-2011 Jean-Michel Trivi <jmtrivi@google.com> Merge "Use channel mask instead of channel count for track creation"
0d255b2d9061ba31f13ada3fc0f7e51916407176 25-May-2011 Jean-Michel Trivi <jmtrivi@google.com> Use channel mask instead of channel count for track creation

Record and playback objects (resp AudioRecord and AudioTrack)
are created using a channel mask, but this information is lost
in the mixer because only the channel count is known to
AudioFlinger. A channel count can always be derived from a
channel mask.

The change consists in:
- disambiguiting variable names for channel masks and counts
- passing the mask information from the client to AudioFlinger
and the mixer.
- when using the DIRECT ouput, only verifying the format of
the track is compatible with the output's for PCM.

Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
udioRecord.h
udioTrack.h
AudioFlinger.h
5b1b8a93a07326f1cbc627f09e02988375189e0a 26-May-2011 James Dong <jdong@google.com> Send estimated bandwidth value as informational event when cache fetcher pauses

o Application can make informed decision about the available network bandwidth
when cache fetcher pauses.

o Application can also adjust how frequently the bandwidth is estimated within
a range from one second to one minute.

Change-Id: I90068001343e79da1886de03c565537787e1580b
ediaplayer.h
65580f9adf6c4d98449ad0716488f9fe3869aa5a 28-May-2011 Eric Laurent <elaurent@google.com> Removed interface to load audio effects libraries

Removed unused functions allowing dynamic loading of audio effects libraries
from effects factory API.

Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
udioEffect.h
ffectsFactoryApi.h
AudioFlinger.h
e1315cf0b63b4c14a77046519e6b01f6f60d74b0 18-May-2011 Eric Laurent <elaurent@google.com> New effect library API

Moved and renamed media/EffectApi.h to hardware/audio_effect.h
Modified the effect library API to expose a library info structure
containing an interface functions table.
Also removed enums for audio channels, audio format and devices
from effect API and use values from system/audio.h instead.

Modified effects factory to support new library interface format and
load libraries and efffects listed in audio_effects.conf file.
The file audio_effects.conf is first loaded from /vendor/etc and
then from /system/etc/audio_effects.conf if not found.

Modified existing effect libraries to implement the new library interface.

Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
udioEffect.h
ffectApi.h
ffectBassBoostApi.h
ffectEnvironmentalReverbApi.h
ffectEqualizerApi.h
ffectPresetReverbApi.h
ffectVirtualizerApi.h
ffectVisualizerApi.h
ffectsFactoryApi.h
AudioFlinger.h
8d91237333c60c4a6839358109265e8847df23f3 26-May-2011 Andreas Huber <andih@google.com> Merge "Support mpeg1,2 audio and mpeg1,2,4 video content extraction from .ts streams."
965d08ba16ee82bc85f69546360c18e7da907406 11-May-2011 Gloria Wang <gwang@google.com> For out of band timed text support (timed text in a separate file).

Change-Id: I9e024a63eb9bf6f839deee3c7766a66e63126c96
ediaplayer.h
386d609dc513e838c7e7c4c46c604493ccd560be 19-May-2011 Andreas Huber <andih@google.com> Support mpeg1,2 audio and mpeg1,2,4 video content extraction from .ts streams.

Change-Id: I9d2ee63495f161e30daba7c3aab16cb9d8ced6a5
tagefright/MediaDefs.h
2cf9c5073ca3342ee52673ad68763fadd2c2be79 18-May-2011 James Dong <jdong@google.com> Revert "Add const to the finders method in MetaData.cpp"

This reverts commit 78fed171d9d62b25aa846d7373a7040e3fd2241e.

Conflicts:

include/media/stagefright/MPEG4Writer.h

Change-Id: Ie6f497f67a473ad95b50bb949c1aa49e1804bac3
tagefright/MPEG4Writer.h
tagefright/MetaData.h
07ec01904613a0bac32caaa8444b4690998faed7 14-May-2011 James Dong <jdong@google.com> Make track informational event optional, depending on system property

o also add a track informational event to return the encoded data in kilo-bytes

Change-Id: I7c383360d57048c8a3606d0b8141ba53e4f4b224
ediarecorder.h
86b7f47aa7482424cf8fd248f1315311919be3b0 10-May-2011 James Dong <jdong@google.com> Support platform and camera dependent recording start time offset

related-to-bug: 4390777

Change-Id: Icb52973ad4ac716f04fb103ef527915a966d06d5
tagefright/MPEG4Writer.h
9b1e4f1a18ac2489e24b4272a0a7ccfd0018efcc 14-May-2011 James Dong <jdong@google.com> Merge "Add support for platform-specific recording start time offset"
07b1bb529a1ae76c46a71b01338c166f9490629d 12-May-2011 James Dong <jdong@google.com> Support for storing geo information in the recorded mp4/3gpp file.

o Geo data (latitude and longitude) is stored in udta box

Change-Id: I76e4aeb741c4b339f3753d3d28190151f3ea4919
related-to-bug: 4260295
tagefright/MPEG4Writer.h
6b25afcd9df2f1f0cc3ae03bf133f75464910560 13-May-2011 Gloria Wang <gwang@google.com> Merge "Add one more DRM error code. For bug 4422428."
5c26937264d9748a3db2a554c188e517523aa31a 13-May-2011 Gloria Wang <gwang@google.com> Add one more DRM error code. For bug 4422428.

Change-Id: I4e333f474c96c0e0f162dde4013ad32b336bebd6
tagefright/MediaErrors.h
64760240f931714858a59c1579f07264d7182ba2 11-May-2011 Dima Zavin <dima@android.com> update for new audio.h header location

Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876
Signed-off-by: Dima Zavin <dima@android.com>
udioRecord.h
udioSystem.h
ediaRecorderBase.h
tagefright/AudioSource.h
bbba88cb1bdc34705d1477208990a06904c022e7 11-May-2011 Andreas Huber <andih@google.com> Squashed commit of the following:

commit c80992e419ed567abef451042f09c4958534b90d
Author: Andreas Huber <andih@google.com>
Date: Wed May 11 14:00:07 2011 -0700

Support for the mp3 audio decoder as a software OMX component.

Change-Id: I66e10c4d0be4c3aecdef1c21b15a2c7359ceb807

commit a358d0e1bf2a88897887445f42ccdda0f5f2f528
Author: Andreas Huber <andih@google.com>
Date: Wed May 11 13:11:23 2011 -0700

Support for G.711 alaw and mulaw decoders as software OMX components

Change-Id: Ia5c76c02cb83a9f94ce39a27b2251e5880218f03

commit 79088b9c9a5c8b8c97ea66cb4f90a2b0f0d34553
Author: Andreas Huber <andih@google.com>
Date: Thu May 5 15:43:32 2011 -0700

Instead of using an RGB surface and conversion yuv420->rgb565

convert from OMX_COLOR_FormatYUV420Planar to HAL_PIXEL_FORMAT_YV12 instead.

Change-Id: I8c4fc3c54c963f0d4ba6377f3c4ab4e0013152e5
related-to-bug: 4394005

commit 69469d3bd84425777b11b9fc938c5e0c61af26a7
Author: Andreas Huber <andih@google.com>
Date: Tue May 10 15:46:42 2011 -0700

voip mustn't link against libstagefright.so

Change-Id: I4d0ba9a8b9dc9380b792a1bd04bcda231964862c

commit 2a9a9eeeeeb36ae3a9e680469c3016d509ff08c3
Author: Andreas Huber <andih@google.com>
Date: Tue May 10 14:37:10 2011 -0700

Remove most non-OMX software decoders by default

Change-Id: Ic56514bc1b56b8fa952e8c4a164ea7379ecb69d0

commit a4de62c37b335c318217765403a9fb282b20a216
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 16:50:02 2011 -0700

Conditionally build the old-style software decoders.

Change-Id: I5de609e1d76c92d26d6eb81d1551462258f3f15f

commit 5d8b039f9449dc3dad1e77c42c80cc0b54b0c846
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 16:13:12 2011 -0700

Support for MPEG4 and H.263 video decoders as soft OMX components.

Change-Id: I5e3a4835afab89f98e3aa128d013628f5830eafe

commit b25a1bfbeb0ff6e62e1cc694ce2599c91489c7d0
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 11:49:10 2011 -0700

Boost Soft OMX thread priority, fix timestamp handling in vorbis Soft OMX decoder.

Change-Id: I68d26d4999f06fcc451d69e5303663fab0cba9e8

commit c0574362f8dc3319ce84d981097867062a698527
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 11:28:53 2011 -0700

Support for the AMR decoders (NB and WB) as Soft OMX components.

Change-Id: Ia565f59833fb52653e23f26536e7e41fc329a754

commit 3e5575a8f0e27a490cb7bde77bd9456087837f08
Author: Andreas Huber <andih@google.com>
Date: Wed May 4 13:41:25 2011 -0700

Signal an error if the aac decoder failed to initialize from codec specific data.

Change-Id: I01da7831bdf722edd7d6dc5974486daa2cf2b209
related-to-bug: 4272179

commit f94aeaa9886e772ff4823e671ed237096649f4af
Author: Andreas Huber <andih@google.com>
Date: Tue May 3 13:07:38 2011 -0700

Software OMX nodes don't (yet?) support native_window mode.

Change-Id: I7d9ca9164ef4abf66b573ca21dba12d672f8b12d

commit eefdfabac8dc659e00daa56da69aea705c49cb67
Author: Andreas Huber <andih@google.com>
Date: Tue May 3 12:57:16 2011 -0700

Fixing the OMX tests to refer to appropriate files from test content.

Change-Id: I5b61c3498749bfb876abbd3946a5132356e3f6ff

commit f31b7326aef14b6a1b7946520a9688f092e844d5
Author: Andreas Huber <andih@google.com>
Date: Tue May 3 11:08:38 2011 -0700

Soft OMX components are now dynamiclly loaded/unloaded, not directly linked against.

Change-Id: I1e2ecfbfab67a8869886f738eaf0c7b3c948b6d9

commit b7f0343879e4df06f0a1c9bfece24df557954e2f
Author: Andreas Huber <andih@google.com>
Date: Mon May 2 15:58:36 2011 -0700

Support for the AVC software decoder as an OMX component.

Change-Id: I13c12df435ba4afbd968a9fc659f66b91c818bc2

commit 5bb9e616d6c8e1b13d531fe996b9a9affdfb2977
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 12:05:37 2011 -0700

Fix Vorbis OMX decoder's component role.

Change-Id: I5e871e5e11b3f951c93590210e63fd7987c467b5

commit 089c91f2333062e196c7afd5fb0ca914878aa474
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 12:05:18 2011 -0700

Support vorbis_decoder OMX testing.

Change-Id: I1985be178a12ae3f8768bc72067d9236238be170

commit 56e241fa36fc37219bc536b823bdc2ab82dc1fad
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 12:01:46 2011 -0700

SoftVorbis OMX component now respects the number of valid frames per page.

Change-Id: I82a117a064d9b083fc58a54ad900a987a763ef03

commit fcd618ec520c376fdb78f4cbb44b8d9f5d213e2b
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 10:59:38 2011 -0700

Support for the vorbis audio decoder as a soft OMX component.

Change-Id: Iaeb057e58ca306d3dce205c0445b74d5aefef492

commit d1fcc3203fc8003ad79c6e96b3a1fc4261743f16
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 10:07:50 2011 -0700

VPX decoder now properly resizes buffers after a port settings change.

Change-Id: I110749a31b6cba087891d8e5dfe420830bdbf831

commit 35c7168243cb69849d88911144a2c7fdfed5c54e
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 28 13:23:34 2011 -0700

Support for the VPX video decoder as a Software OMX component.

Change-Id: Ic345add2d6d768d4af631160153f2e9b97fcea71

commit 923b2534b4211fc5405377b5190bfa6f2dd27f32
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 28 11:34:40 2011 -0700

Table-based registration of soft omx components.

Change-Id: I7f45f0fa5b3a7950776e69c66349731f7674e937

commit 04a88f3edb2266a463da9c4481b80178be460902
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 28 11:22:31 2011 -0700

Apparently OMX_GetParameter is valid in any state other than OMX_StateInvalid

OMX_SetParameter is still constrained to OMX_StateLoaded or a disabled port.

Change-Id: I1032d7cf4011982d306aa369d4158a82830d26fb

commit 9d70ca68445e7c40f5c9b2d12466e468f514de88
Author: Andreas Huber <andih@google.com>
Date: Wed Apr 27 15:03:18 2011 -0700

Use the new soft OMX aac decoder for HTTP live playback.

Change-Id: Ifbcfb732a9edb855cb46b49f6d0ac942170ee28f

commit 213fe4a10ea93cce08e8622dc3908053f29878a1
Author: Andreas Huber <andih@google.com>
Date: Tue Apr 12 16:39:45 2011 -0700

Foundation for supporting software decoders as OMX components

Change-Id: I7fdab256563b35d1d090617abaea9a26b198d816

Change-Id: I83e9236beed4af985d10333c203f065df9e09a42
tagefright/OMXCodec.h
tagefright/openmax/OMX_Video.h
0f056290cb16763453f18bbef80cde673041dbbc 10-May-2011 James Dong <jdong@google.com> Add support for platform-specific recording start time offset

o This start time offset is used in the media framework to eliminate
the recording sound in the recorded file.

Change-Id: I97926a74f0743b8a4f985d51334e8d1486a318ea
related-to-bug: 4390777
ediaProfiles.h
70ccfd44c4bfe95ddecc2df6c3695efc48229d72 06-May-2011 James Dong <jdong@google.com> Add send session recording summary report to application

Change-Id: I9c63ddae432f0c93486c39776ed0a058a8649602
ediarecorder.h
tagefright/MPEG4Writer.h
4650ff0e86f9e815e3152a806a06c700418d071d 09-May-2011 James Dong <jdong@google.com> Add const to the finders method in MetaData.cpp

o also fixed the MPEG4Writer writeFtypBox() to take a const pointer to MetaData

Change-Id: Iaecdbe6aeab345f6dc72aac0d19f9704b6e0d28a
tagefright/MPEG4Writer.h
tagefright/MetaData.h
43ec1dfc5dc3934680a52a026c5519ddc51bdbd3 06-May-2011 James Dong <jdong@google.com> Add end of recording summary track info

Change-Id: I2fcf589e70db225776ef7c8d0f28505ceb824c45
related-to-bug: 1854633
ediarecorder.h
b21c564ce47041f9dd3ab65e36fed57c4937a42d 07-May-2011 James Dong <jdong@google.com> Refactor MPEG4Writer::writeTrackHeader() method

o most of the mp4 file boxes has its own method now
TODO: remove some of the duplicated code for esds box, for instance.

Change-Id: Iae3dbb2410b79bc79aaee081b80569d339993c47
tagefright/MPEG4Writer.h
760943b5e7a09b602aba04ec451e97662f48b0a4 21-Mar-2011 James Dong <jdong@google.com> Initial check-in for AACWriter

Change-Id: Ia21ca39a404484b2dda25c6101780d2ff11c4623

related-to-bug: 4211046
tagefright/AACWriter.h
89dc0dffdcbf0999a854a9b1bbea8f56395cc209 04-May-2011 Gloria Wang <gwang@google.com> Merge "Initial CL for the timed text support: - Add support for MP4 timed text - Add API for app to turn on/off a text track - Add timed text metadata(language) in the MediaMetadataRetriever"
7a1e3e81264189e23a1db2b174e1b5a5d4c7d1c3 04-May-2011 Gloria Wang <gwang@google.com> Initial CL for the timed text support:
- Add support for MP4 timed text
- Add API for app to turn on/off a text track
- Add timed text metadata(language) in the MediaMetadataRetriever

Change-Id: I0055beba38ac761627dbcc6d581ae9582d68bb94
ediametadataretriever.h
ediaplayer.h
tagefright/MediaDefs.h
tagefright/MetaData.h
8ce2364512f7c32c824f5ec5719688830ba72427 01-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: android_native_buffer_t -> ANativeWindowBuffer

Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
tagefright/HardwareAPI.h
d2b0088df550e3ddfa44dbdfd1cd9a79ff80a2de 30-Apr-2011 Gloria Wang <gwang@google.com> Merge "Add setParameter/getParameter to MediaPlayer API. for bug 1982947"
7340743ce30766af6334bbd9acf813eb66dd5a60 29-Apr-2011 Gloria Wang <gwang@google.com> Add DRM errors in the DRM frameworks to MediaErrors also.
For bug 4350156.

Change-Id: Ib5711ec642178a49203a448b7f5114e675d49394
tagefright/MediaErrors.h
4f9e47f2c03ce36261c4717cd7e131d7940bb068 26-Apr-2011 Gloria Wang <gwang@google.com> Add setParameter/getParameter to MediaPlayer API.
for bug 1982947

Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
5d4478556299c656b5bb940e83277e01233ec015 28-Apr-2011 Dima Zavin <dima@android.com> Merge changes I22d9e018,Ib0701fcc,Ibc637918,I9eb7e002,I4adcec73

* changes:
audioflinger: don't do work in constructor, instead do it in onFirstRef
audioflinger: enumerate all the possible audio interfaces
audio/media: convert to using the audio HAL and new audio defs
libmedia: move AudioParameter out of AudioSystem
audioflinger: move legacy audio hw/policy out to libhardware_legacy
fce7a473248381cc83a01855f92581077d3c9ee2 20-Apr-2011 Dima Zavin <dima@android.com> audio/media: convert to using the audio HAL and new audio defs

Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
udioParameter.h
udioRecord.h
udioSystem.h
udioTrack.h
ffectApi.h
AudioPolicyService.h
ediaPlayerInterface.h
ediaRecorderBase.h
ediarecorder.h
tagefright/AudioSource.h
6a62b8747b0d0c05ed315d26612d61ca085f32b7 27-Apr-2011 Gloria Wang <gwang@google.com> am d84df054: am 96974931: am 83ddcdf7: Add heartbeat error codes into MediaErrors.h

* commit 'd84df05490e8b102e81cca848f65c174398be1b6':
Add heartbeat error codes into MediaErrors.h
db5cb14318bb24cd6ea14ff7ceea0d5e1f83d903 20-Apr-2011 Dima Zavin <dima@android.com> libmedia: move AudioParameter out of AudioSystem

Change-Id: I9eb7e002d141936258050d4fa4f0ccd8202bfc54
Signed-off-by: Dima Zavin <dima@android.com>
udioParameter.h
udioSystem.h
84f64d2a48a267c6517df69dd757c1ead54db036 27-Apr-2011 Gloria Wang <gwang@google.com> Add heartbeat error codes into MediaErrors.h

related-to-bug: 4322415

Change-Id: I78137c61e3a8ce9afcb9fb38cb77a83561b9b72d
tagefright/MediaErrors.h
c5182e31b23dc381d21ef43b7f7d682ffc54bd79 24-Apr-2011 Mike Lockwood <lockwood@android.com> MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider

Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: I2d7285bd32e06c1a5c4ef6a8a15f8f8b2c33b39b
Signed-off-by: Mike Lockwood <lockwood@android.com>
ediascanner.h
b483c4724846c0b8d4e82afcbb7c17f671bae81c 12-Apr-2011 Gloria Wang <gwang@google.com> - Add another parameter in notify() to be able to send timed text sample
through listener during video playback.
- Add OnTimedTextListener in the MediaPlayer
For feature request 800939.

Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
MediaPlayerClient.h
ediaPlayerInterface.h
ediaplayer.h
c30268b9d118309a0514bcf280a03ee69f81403f 06-Apr-2011 Glenn Kasten <gkasten@google.com> Merge "Miscellaneous code cleanup in audio framework"
4bcae82f9b07d1a39956c45a6f5bec0b696c4dd1 04-Apr-2011 Glenn Kasten <gkasten@google.com> Miscellaneous code cleanup in audio framework

Changes:
- Move declaration of kClassPathName to top of file so it can be used
in more than one place, instead of "android/media/AudioSystem".
- Make private methods static.
- Add comment to stream_type, audio_mode, force_use types that they must match
values in AudioSystem.java.
- Add comment about unused types mp3_sub_format and vorbis_sub_format.
- Fix typos.
- Use @ in javadoc comments.
- Delete dead APIs setMode, getMode, setRouting, getRouting in AudioSystem.java
(they are all hidden, deprecated, and unused by rest of framework)
- Delete unused private log method.
- Fix pathname for android_media_AudioSystem.cpp.
- Improve code formatting for space after == and !=.
- Add logging of delta for changing audio policy manager ref count.

Change-Id: I18037c7beb8ab76d1fda08c11e589f6e591d36e1
udioSystem.h
abf471f9d25f7a3104c5723657e3c6c329f3f08c 05-Apr-2011 Mathias Agopian <mathias@google.com> Remove unused references to ISurface

Change-Id: I542806b5c91c525ed7cde821f6963f1e020ddf1a
MediaPlayer.h
OMX.h
ediaPlayerInterface.h
f8374dec590223ebdd6959b26d9ba90749dd8328 24-Mar-2011 Andreas Huber <andih@google.com> Support for divx files, i.e. mpeg 4 video + mpeg audio layer III in .avi files

Change-Id: I6e1e989c43300ddb0d341e3e9183cdccd69eeae6
related-to-bug: 4192562
tagefright/MediaDefs.h
6511c9755c3a3360ba869772600c7aae048a7ffc 30-Mar-2011 Andreas Huber <andih@google.com> Stagefright DataSources now expose the underlying content mime type.

Use that mime type to determine if we should do upfront buffering at the start of
playback and don't for audio streams to ensure playback starts fairly instantly.

Change-Id: If21e36d1b024f0e5c723911bceadaa2e0307ab42
related-to-bug: 4090916
tagefright/DataSource.h
108dddf924d714c811dd565b8f4c7a0178cca2f2 29-Mar-2011 Iliyan Malchev <malchev@google.com> frameworks/base: some camera-interface cleanup

Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct
image_rect_struct are no longer used (instead, the necessary information is
passed through ANativeWindow.)

Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb
Signed-off-by: Iliyan Malchev <malchev@google.com>
tagefright/CameraSource.h
84b343f29063fbfa2ee61b2e3d37ba059ca507d4 22-Mar-2011 Andreas Huber <andih@google.com> Delay signaling the end of audio playback until all frames have actually played.

Change-Id: I1fa07358a885a818fd0a5d7da425740f86095e10
related-to-bug: 3404000
tagefright/AudioPlayer.h
af8791e112c8072452bd14ef3c43a47511d19542 21-Mar-2011 Andreas Huber <andih@google.com> Support passing headers to MediaMetadataRetriever's setDataSource API

Change-Id: Ib1a5c08fc5034cac05034db27007a35c9b660b26
related-to-bug: 3506316
MediaMetadataRetriever.h
ediaMetadataRetrieverInterface.h
ediametadataretriever.h
bc07bcc65e91c7aea9713631ae67760dcf1b0286 18-Mar-2011 James Dong <jdong@google.com> Better organize media recorder error and information event and types

Change-Id: I45f1f953596985494725525c1fabf57eccc19175
ediarecorder.h
tagefright/MPEG4Writer.h
c901f74404435cc1cf2717016e2b0092b6dcea24 17-Mar-2011 James Dong <jdong@google.com> am 782ffe91: am 9c0c5b56: am 2f1f2248: Fix missing AOSP copyright headers for a bunch of media framework files

* commit '782ffe91da665c6b1fb9e297faa6e0dc6035f40c':
Fix missing AOSP copyright headers for a bunch of media framework files
27c174483a8ae9688d5d4897c19074f62c7f1701 17-Mar-2011 James Dong <jdong@google.com> Fix missing AOSP copyright headers for a bunch of media framework files

bug - 4119349

Change-Id: If5924e16a5f596d5d73d9beb66eaf5ac9a6f0e50
tagefright/ACodec.h
tagefright/MediaDebug.h
tagefright/foundation/AHandlerReflector.h
tagefright/foundation/AHierarchicalStateMachine.h
8635b7b095fbf7ffc63d3ce791891a9116ace1f6 15-Mar-2011 James Dong <jdong@google.com> Add memory leak tracking/debugging code to drm server

bug - 4099038

Change-Id: I6c048eaf3d7f34bc144b8daaa5fdef1ed474af66
emoryLeakTrackUtil.h
884d064fbf7f45f8089abd7d87bdca5d325cc2ab 11-Mar-2011 Glenn Kasten <gkasten@google.com> am 055066e1: am 92f2f3ff: Merge "Bug 3012968 DRM output control" into honeycomb-mr1

* commit '055066e1e77d944383360d50057f5b8187f23c0b':
Bug 3012968 DRM output control
2eb62955eb84b97695e8a7e56e14310cbb86412b 28-Jan-2011 Glenn Kasten <gkasten@google.com> Bug 3012968 DRM output control

Modifies Stagefright to verify that there is a hardware-protected path
to video sink for DRM content.

Change-Id: I18b8741390e803a05a88c7f180b860a24ba88a10
tagefright/OMXCodec.h
b5ce361d19e69fe156f7188c9ee0f4734b259874 25-Feb-2011 Gloria Wang <gwang@google.com> Fix for bug 3477330
This patch fixs a crash bug caused by using a NULL DecryptHandle pointer.
Fix by using sp<DecryptHandle> instead.

Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
tagefright/DataSource.h
tagefright/FileSource.h
2aac40fe9d42a15dab0af6a0efea7a2468cd9e4f 09-Mar-2011 Eric Laurent <elaurent@google.com> am 2dc78477: am cc34967f: Merge "Fix issue 3439872: video chat and bluetooth SCO" into honeycomb-mr1

* commit '2dc78477364bd4accb9a603baaafca9a5523dcec':
Fix issue 3439872: video chat and bluetooth SCO
1703cdfee717b1b312bf8979816a9e2f16a82e5d 07-Mar-2011 Eric Laurent <elaurent@google.com> Fix issue 3439872: video chat and bluetooth SCO

This change fixes the stability problems experienced when using
a bluetooth headset supporting both A2DP and SCO. Problems occur
when starting the video chat at which time the A2DP output is being
stopped to start SCO. At that time, active AudioTracks are invalidated
by AudioFlinger so that a new AudioTrack binder interface can be
recreated by the client process on the new mixer thread with correct parameters.
The problem was that the process to restore the binder interface was not
protected against concurrent requests which caused 2 binder interfaces
to be created sometimes. This could lead to permanent client deadlock
if one of the client threads was waiting for a condition of the first
created binder interface while the second one was created (as the AudioFlinger
would only signal conditions on the last one created).
This concurrent request situation is more likely to happen when a client
uses the JAVA AudioTrack as the JNI implementation uses simultaneously the
native AudioTrack callback and write push mechanisms. By doing so, the code
that checks if the binder interface should be restored (in obtainBuffer()) is
much more likely to be called concurrently from two different threads.

The fix consists in protecting the critical binder interface restore phase
with a flag in the AudioTrack control block. The first thread acting upon the binder
interface restore request will raise the flag and the second thread will just wait for
a condition to be signaled when the restore process is complete.

Also protected all accesses to the AudioTrack control block by a mutex to prevent
access while the track is being destroyed and restored. If a mutex cannot be held
(e.g because we call a callback function), acquire a strong reference on the IAudioTrack
to prevent its destruction while the cblk is being accessed.

Modified AudioTrack JNI to use GetByteArrayElements() instead of
GetPrimitiveArrayCritical() when writing audio buffers. Entering a critical section would
cause the JNI to abort if a mediaserver crash occurs during a write due to the AudioSystem
callback being called during the critical section when media server process restarts.
Anyway with current JNI implementation, either versions do not copy data most of the times
and the criticial version does not guaranty no data copy.

The same modifications have been made to AudioRecord.

Change-Id: Idc5aa711a04c3eee180cdd03f44fe17f3c4dcb52
udioRecord.h
udioTrack.h
2256d515e6fa1dd95b8fd0de05b56d8c83af8327 04-Mar-2011 Andreas Huber <andih@google.com> Added more metadata published by the MediaMetaDataRetriever

- presence of audio/video content
- video dimensions
- avg. bitrate

Change-Id: Ie6d478a3c2d0bb6bebaea99ac0a20a4c17808934
related-to-bug: 3506316
ediametadataretriever.h
4f46fed004b76d462ef859aa94a3c056b0e79b60 03-Mar-2011 Gloria Wang <gwang@google.com> Merge "- To track the usage of all audio output devices - To track the currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData()"
9ee159b79022b2e1a050acb3890ce948e99e9ccb 24-Feb-2011 Gloria Wang <gwang@google.com> - To track the usage of all audio output devices
- To track the currently used audio device
- The devices are separated as speaker and other audio devices
- Provide the collected data to battery application through pullBatteryData()

Change-Id: I374c755266b5ac6b1c6c630400f4daf901ea8acc
MediaPlayerService.h
32f3cefa373cd55e63deda36ca9d07c7fe22eaaf 03-Mar-2011 Andreas Huber <andih@google.com> Allow optional specification of a PTS timestamp when signalling a discontinuity.

If present, rendering will be suppressed until reaching the timestamp.

Change-Id: Ic64bdf4225063c5a4d042ea9809960b843a46d19
related-to-bug: 3489454
StreamSource.h
2a7e0a1eb29306982fd77bdc64d324464a48a2b9 01-Mar-2011 James Dong <jdong@google.com> Get rid of redundant media profiles

bug - 3330679

Change-Id: Idc55aea32746c0c57552c5e15a289681421aa859
ediaProfiles.h
e2ce6458659c6e1bad420357b61dc10cd8bbe2ab 24-Feb-2011 Jamie Gennis <jgennis@google.com> Add an OMX IL API for querying buffer usage flags.

This change defines an OpenMAX IL API for querying from the IL component
the gralloc buffer usage flags that should be used to allocate the
buffers. It also adds the Stagefright plumbing for using the new OMX IL
API.

Change-Id: I046b5e7be70ce61e2a921dcdc6e3aa9324d19ea6
Related-Bug: 3479027
OMX.h
tagefright/HardwareAPI.h
1173118eace0e9e347cb007f0da817cee87579ed 09-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3438258 Add SurfaceTexture as MediaPlayer sink

This change enables the use of a SurfaceTexture in place of a Surface
as the video sink for an android.media.MediaPlayer. The new API
MediaPlayer.setTexture is currently hidden.

This includes:
- New Java and C++ interfaces
- C++ plumbing and implementation (JNI, Binder)
- Stagefright AwesomePlayer and NuPlayer use ANativeWindow
(either Surface or SurfaceTextureClient)

Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
tagefright/NativeWindowWrapper.h
51b9a8b53eaa1a0188be95d4d6a749424787e0d6 23-Feb-2011 Gloria Wang <gwang@google.com> Merge "- Add method in MediaPlayerService to collect and pull codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data"
7cf180c9bff69e5cc4a2f4e53b432db45ebbebab 20-Feb-2011 Gloria Wang <gwang@google.com> - Add method in MediaPlayerService to collect and pull
codec usage (duration) for the battery app
- Collect MediaPlayer decoding usage data

Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
MediaPlayerService.h
55e26193c885b7d5acdae9978848e6587987790f 22-Feb-2011 Andreas Huber <andih@google.com> Support more MPEG4-LATM audio functionality.

related-to-bug: 3474610

Change-Id: I6dab40e8b465922c62be9ee7f168718822c6caac
Now skipping extra header that the spec claimed shouldn't be present in LATM...
tagefright/foundation/ABitReader.h
a472613aec322e25891abf5c77bf3f7e3c244920 16-Feb-2011 James Dong <jdong@google.com> A/V synchronization at the beginning of a recording session

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
tagefright/AudioSource.h
6b61f4355db1974cd0f0dfaa4effdd7117b9f09b 15-Feb-2011 James Dong <jdong@google.com> Decouple AudioRecord read and audio encoding

bug - 3313754

Change-Id: I951dd0e21e34aa1412c391f003bc32103d0424b0
tagefright/AudioSource.h
d48a6044fddc910f17e67650f280e91e7aaf5e65 16-Feb-2011 Gloria Wang <gwang@google.com> Merge "Add AAC extractor"
50c44c79d2d7dd6cd1485d9d939f67f80b8da1ca 02-Feb-2011 Gloria Wang <gwang@google.com> Add AAC extractor

Change-Id: Iedb08525ac72e65ba98e5c791734da0720a0e3f6
tagefright/MediaDefs.h
244ba87d20aeb29c9cad727820fa1e803ec3643c 12-Feb-2011 James Dong <jdong@google.com> Make available h263 DSI information from MPEG4Extractor

bug - 3446863

Change-Id: Idbaf7a564d544784fdbc36ed0339c98a519adc88
tagefright/MetaData.h
6b2718c67aa7b1a8e3b0f25a73a0d5f72c59ffc3 04-Feb-2011 Glenn Kasten <gkasten@google.com> Bug 3352047 Wrong message when adjusting volume

Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
udioSystem.h
AudioPolicyService.h
fcac8fa9421f442f024018628a6042d7a14fbfb0 09-Feb-2011 James Dong <jdong@google.com> Reduce blocking time in file write

bug - 3418787

Change-Id: I4723662bf46ed07271be8468f84ae5d93cb793fa
tagefright/MPEG4Writer.h
eeffad65d2db4879593c1d4806824ef5b4dcb3e1 08-Feb-2011 Andreas Huber <andih@google.com> Merge "Handle some edge cases when seeking while starting up OMXCodec"
9c0096378820e5a61db26e52a7e6df50ba9c872d 08-Feb-2011 Andreas Huber <andih@google.com> Handle some edge cases when seeking while starting up OMXCodec

These were exposed by the new preview-seekframe while paused code.
In particular, the codec may have been in state RECONFIGURING when attempting
to seek, or we may have initiated flushing of the output port and this may not
have completed yet by the time we want to reconfigure the output port.

Change-Id: Id7640ade11dbc7205a22f648ea0b5e3e9b49cf4b
related-to-bug: 3392259
tagefright/OMXCodec.h
889b340ec736a9d3e3e690256d305cc8740f0c4b 07-Feb-2011 Gloria Wang <gwang@google.com> - Do not use global DrmManagerClient
- Release the DrmManagerClient and DecryptHandle in DataSource
Fix for bug 3429811

Change-Id: I549f72b75225751877eb0e630ce8098f8ec6316f
tagefright/DataSource.h
tagefright/FileSource.h
349d3fcb4afacf754f7b5b5186d2f258f5bf35e7 04-Feb-2011 Andreas Huber <andih@google.com> Improvements/fixes to ACodec.

- Make sure ACodec reverts its state when it's shutdown
- Defer "resume" to after handling the OutputPortSettingsChange

- If the OMX_EventPortSettingsChanged event comes in while we're flushing, defer it
and make sure the output port can be disabled by deleting all buffers not already
owned by the component.

Change-Id: I1f8cdffa71237b57d4275a48b834647a7b263e8b
tagefright/ACodec.h
8782cb4dc783cdcac8498148ab1894b4780c18df 04-Feb-2011 Eric Laurent <elaurent@google.com> am 6f1bd261: am 9c0a1003: Merge "Fix issue 3371080" into honeycomb

* commit '6f1bd261b7fd86ac7817ca061dfb55b95150b836':
Fix issue 3371080
856990b491d84b7ed4fefe337485c8997ba9dd02 13-Jan-2011 Glenn Kasten <gkasten@google.com> Bug 1804058 FLAC extractor

Note: dependent on external/flac for libFLAC

Implemented and tested:
* FLAC container
* mono and stereo
* standard sample rates
* standard bit depths
* sniffer
* media scanner
* Vorbis comment metadata including album art
* random access seeking with "torture test"
* web browser integration for audio/flac (not audio/x-flac), but
note that most web servers don't correctly report the MIME type

Not implemented:
* 24-bit to 16-bit dither or noise shaping in AudioFlinger
* 96 kHz to 44.1 or 48 kHz downsampling low pass filter in AudioFlinger
* replay gain is better done in AudioFlinger
* multi-channel, would need AudioFlinger support
* Ogg container, does not seem to be very popular yet

Change-Id: I300873e8c0cfc2e95403d9adb5064d16a2923f17
tagefright/MediaDefs.h
eda6c364c253ba97ee45a3adeb8c2b45db1f81db 02-Feb-2011 Eric Laurent <elaurent@google.com> Fix issue 3371080

Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
udioSystem.h
AudioFlinger.h
AudioPolicyService.h
7757f5010a771fb8824b6fdf9788f588a1577e3f 26-Jan-2011 James Dong <jdong@google.com> Make sure that key frame is generated for timelapse video recording if there are at least two input video frames from camera source.

This will fix the stop failure issue where we have to wait n * time_interval before a key frame can be received by the file writer, where
o n is the actual number of buffers advertised by the video encoder
o time_interval is the interval settings for timelapse video recording
specifying the time distance between neighboring input video frames

The fix includes two parts:
o OMXCodec will not submit all n buffers at one time, but instead submit one input
frame at one time if it become available.

o Timelapse camera source made available the first two input frames and do not skip
them so that the first compressed output frame data can be received regardless
the specified time_interval

bug - 3367659

Change-Id: Ia68cc2cb0d71aa7dc54540e9ad82fae911ad530b
tagefright/CameraSource.h
tagefright/OMXCodec.h
01f394247f3d5851f5bb12c2786b5fee265b6357 26-Jan-2011 Andreas Huber <andih@google.com> Protect notification callback parameters with a mutex.

This avoids the race condition where notifications are dispatched to a NULL receiver
after notifications have been disabled.

Change-Id: I6d351ffbee97616e2c35559c132a6c5e6a66948a
related-to-bug: 3394139
ediaPlayerInterface.h
0a095d09464ba18e288a3f529410af0f1257ac2a 26-Jan-2011 Mike Lockwood <lockwood@android.com> StagefrightMediaScanner: Close metadata retriever after we are done scanning

This prevents the mediaserver from leaking a file descriptor after
the media scanner runs

BUG: 3373546

Change-Id: I82a8bae82306de3da56a5c7da5b03ecf106a4efc
Signed-off-by: Mike Lockwood <lockwood@android.com>
tagefright/StagefrightMediaScanner.h
7fac331b39ca49ce49a67e425dcc031a3cb9e97f 21-Jan-2011 Andreas Huber <andih@google.com> Properly rotate video that's marked as such and decoded to a surface.

Change-Id: I1e9144db3447e58c99aac3f47702ad471678789c
related-to-bug: 3378148
tagefright/OMXCodec.h
bc7f5b2e56107cfeaeeab13cf8979379e3c2f139 21-Jan-2011 Andreas Huber <andih@google.com> Some tweaks to HTTP live / nuplayer behaviour

- play audio-only streams again
- workaround for malformed streams that switch PIDs across bandwidths
- attempt to pick a different bandwidth stream if the previously chosen one appears
to be malformed/unsupported.

Change-Id: I426d0a40dc725aa242f619d4c9d048b69aca55c9
related-to-bug: 2368598
tagefright/foundation/ADebug.h
b45c01c2b8588ff431b511151666a55a39f0a6ae 16-Jan-2011 James Dong <jdong@google.com> Fix the presentation video resolution when it is different from the actual image resolution of the video.

bug - 3352413

Change-Id: I8f08f3896e9fb90f09119dccdb88b82af60f79f2
tagefright/MetaData.h
ccb3506ed1845121b94f4e27244e61a46eb19815 17-Jan-2011 Dharmaray Kundargi <dharmaray@google.com> integrate videoeditor preview player.

Change-Id: I83084f494605c8e6f4d198afa8c36f9e29579667
tagefright/AudioPlayer.h
7f7d52ac18dfc3c6d8f6267dad29306613e9bd0e 06-Jan-2011 James Dong <jdong@google.com> Publish MediaMetadataRetriever.java as public API

o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc

o part of a multi-project change.

bug - 2433195

Change-Id: I5ed167f1fd6a53cb143b7dc385b149431d434438
MediaMetadataRetriever.h
ediaMetadataRetrieverInterface.h
ediametadataretriever.h
32ad210e4e4bcbdf912a01c9d2ff105cb3c5056f 10-Jan-2011 Andreas Huber <andih@google.com> Merge "NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications." into honeycomb
31e2508c75018145a8238925ff1a08cbde4e799a 10-Jan-2011 Andreas Huber <andih@google.com> NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications.

Change-Id: I99b4223ad6ecfd8839a3c0e737fef3165565d76d
related-to-bug: 3336496
tagefright/ACodec.h
tagefright/foundation/AMessage.h
14c858e80dfe2030c9f343dc0c6e2048e030731b 10-Jan-2011 James Dong <jdong@google.com> Avoid deadlock in OMX::freeNode by making sure OMXCodecObserver does not hold the last reference of OMXCodec object

bug - 3336424

Change-Id: I4c79b66a900c527e3ae6a833f76d5da1b75c5a89
tagefright/OMXCodec.h
11f8109ad8646d3acd9a0987613229cde59d52c1 06-Jan-2011 Marco Nelissen <marcone@google.com> Add support for the "compilation" tag in mp3, mp4 and ogg, and also add
support for two common ways of specifying album artist in ogg files.
b/3311831

(cherry-picked from GB because of weird automerger failure)

Change-Id: Ibf12a3d6bc8bbc2ac5ea815de6b33414b8f53f0f
ediametadataretriever.h
tagefright/MetaData.h
b1787e3b95e96cc002377d41518cc183f64b58c4 06-Jan-2011 Andreas Huber <andih@google.com> Colorconverter may not support some src/dst bitmap configurations.

Let it return an appropriate error code instead of asserting.

Change-Id: I7fe0dfa169e1cbdecb04c5fcbe8501e73362d05e
related-to-bug: 3328212
tagefright/ColorConverter.h
d1108d74e13a74dc72e49513e0393e924f3d112c 06-Jan-2011 James Dong <jdong@google.com> am a8ce7736: am 35e8dcb9: Merge "Suppress the recording sound in the recorded video" into gingerbread

* commit 'a8ce773607c26dd4336f57856afce507fb98a279':
Suppress the recording sound in the recorded video
e6bf51ea9c5a4c1294e9a6c26d8a9b86534fee1f 06-Jan-2011 James Dong <jdong@google.com> am 35e8dcb9: Merge "Suppress the recording sound in the recorded video" into gingerbread

* commit '35e8dcb9df8c3d77ede120e3f1aaf842b2928639':
Suppress the recording sound in the recorded video
149d3b0565c9b7e56af344d0e5c2f121236fa119 05-Jan-2011 Andreas Huber <andih@google.com> Merge "Seek/Duration support for completed http live streams in NuPlayer."
43c3e6ce02215ca99d506458f596cb1211639f29 05-Jan-2011 Andreas Huber <andih@google.com> Seek/Duration support for completed http live streams in NuPlayer.

Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463
related-to-bug: 3321475
ediaplayer.h
019e96a6c6228c2565d8bc172f6278b31384aca5 05-Jan-2011 James Dong <jdong@google.com> Merge "Use video output if necessary for timelapse video recording"
91dcf1510491c4128f506a0d28e64de5ecbf459d 05-Jan-2011 James Dong <jdong@google.com> Suppress the recording sound in the recorded video

bug - 3309194

Change-Id: Ib8fb248943bc22f963d67537bfdbc6056c5a159b
tagefright/AudioSource.h
28934a90e168291f6c77c56e8a05f272e5151bbd 05-Jan-2011 James Dong <jdong@google.com> Use video output if necessary for timelapse video recording

Change-Id: I88d0cc824f0fbf8b2f392fbc23c69b5bfefda1b8
tagefright/CameraSourceTimeLapse.h
1aef211b4e5dc952081727bfd2318b2cb5ca4506 04-Jan-2011 Andreas Huber <andih@google.com> Properly shutdown the decoders on a reset() in NuPlayer's implementation.

related-to-bug: 3321470
Change-Id: Ida6d2171c5a3a407188d4633602b764f8fe7086a
ediaplayer.h
3e9f9f1596d4225ddd9288b4f7b24a15221374dc 16-Dec-2010 Mike Lockwood <lockwood@android.com> MediaScanner: Add support for scanning empty directories

Currently the media scanner does not create database entries for directories
unless they contain a file that is scanned.
Fixing this so we provide a consistent view of the world to MTP.

Change-Id: Ia776acfeae23192183e7192d63cdc34d830ea889
Signed-off-by: Mike Lockwood <lockwood@android.com>
ediascanner.h
2c2814b900a61fa07ddfff860b143fbbe9c740e9 16-Dec-2010 Andreas Huber <andih@google.com> Properly announce decoder output format changes, make sure AMessage::dup does.

Change-Id: Ia77f6b6d5e5c5055583740dfe876b8a3c22be9b6
tagefright/ACodec.h
tagefright/foundation/AMessage.h
f933441648ef6a71dee783d733aac17b9508b452 16-Dec-2010 Andreas Huber <andih@google.com> Initial support for a true streaming player for mpeg2 transport streams.

Change-Id: I153eec439d260a5524b21270e16d36940ec3161a
ediaPlayerInterface.h
tagefright/ACodec.h
tagefright/foundation/ADebug.h
tagefright/foundation/AHierarchicalStateMachine.h
tagefright/foundation/AMessage.h
79e23b41fad961008bfde6e26b3c6f86878ca69d 11-Dec-2010 James Dong <jdong@google.com> Revert "Allows the authoring engine to skip frame."

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
tagefright/MediaSource.h
tagefright/OMXCodec.h
92bf2f96c53d24adc1ace362439e82ca2cf6b856 07-Dec-2010 Andreas Huber <andih@google.com> Better buffer status management and verification in OMXCodec.

Change-Id: I90410f2ac0d8ff86076a239dc6e281b1bc4d8643
tagefright/OMXCodec.h
97f2c9d530c9663deeb840f332dee205a7a11cdd 07-Dec-2010 Andreas Huber <andih@google.com> Merge "API Support for both synchronous and queued commands, optionally associated metadata."
14acc736e336cbd6026df781d4f411e908831815 06-Dec-2010 Andreas Huber <andih@google.com> API Support for both synchronous and queued commands, optionally associated metadata.

Change-Id: Idb90d64cb638942210c5822b3cba2f05b087d601
StreamSource.h
tagefright/foundation/AMessage.h
ea7b485595f8cec6a66668b5c54c8f297d843f77 05-Dec-2010 James Dong <jdong@google.com> Remove check if the target video resolution is not supported by CameraSource
and clean up Camera is CameraSource could not created.

bug - 3254411

Change-Id: I43497c450e7007de5ce027e2912b1421119e8887
tagefright/CameraSource.h
16afe2fb439cab6125bb46a07a8078d4ce1c1ea5 03-Dec-2010 James Dong <jdong@google.com> Prepare for publishing MediaMetadataRetriever as public API

step one:
o replaced captureFrame with getFrameAtTime
o removed getMode

bug - 2433195

Change-Id: I38a8cecef29014692f0b08b8818326e3ebb40a12
MediaMetadataRetriever.h
ediaMetadataRetrieverInterface.h
ediametadataretriever.h
e2b1028852120bcfded33b8f06f66b780437fe92 23-Nov-2010 Andreas Huber <andih@google.com> Support streaming data across binder boundaries.

Change-Id: Ifbac61406dcb81343765f99ccba08bd90f9274cc
MediaPlayerService.h
StreamSource.h
ediaPlayerInterface.h
f5ab57c2d5e02af7483c94eddb177e4f5c9e9892 22-Nov-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 0870f7bdd10a7cd36087d723d1957d8e1b967ca7
Author: Andreas Huber <andih@google.com>
Date: Mon Nov 22 12:57:04 2010 -0800

set_surface_crop doesn't seem to work right yet, stop using it in the SoftwareRenderer.

Change-Id: If0a24f78b7810a6cecaa82eb4f23d0f90c22cc42

commit 4767b52bee3a54ae117a8708d6832276a44e6a6a
Author: Andreas Huber <andih@google.com>
Date: Mon Nov 22 11:14:57 2010 -0800

info->mMediaBuffer may still be NULL at this point...

Change-Id: I25a71569015b1bb87f1ea7efff7588958774426f

commit 0cef79874e1f1ddb10b7402177a87d3cffc7de92
Author: Andreas Huber <andih@google.com>
Date: Mon Nov 22 10:55:12 2010 -0800

QCOM's YVU420 color format conversion has now been tested.

Change-Id: I7fef4b642a928af15d42f006f7cdc107d5ff1d67

commit 84fe05a6c969ede0ce8a85a530e110afca07c7a7
Author: Andreas Huber <andih@google.com>
Date: Mon Nov 22 09:59:50 2010 -0800

Removed remaining traces of suspend/resume. Proper reporting of video dimensions based on cropping rectangle.

Change-Id: Ib238b80cbc1f19e7d312f2422eb5e9ab6b06b1bc

commit 50970cdc837c5c498bcf0cb61b436196ca9e2ef7
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 16:11:06 2010 -0800

Revamped Software Renderer respects the crop rectangle.

Removed obsolete ADRENO support code.

Change-Id: I984cbc8a99c4d97e09e7d1b1292099c88b9ae535

commit 8abbc6a5608bff650f968540f24a2eab75f254ed
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 16:10:41 2010 -0800

The metadata retriever now respects the crop rectangle while capturing a video frame.

Change-Id: Id3377176060086d16717f62c77ce26fabe899050

commit 2d42e4466609d304e88bd2cdd6eb7b297340cc21
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 16:09:50 2010 -0800

Changed ColorConverter APIs to be more general.

Clients can now refer to crop rectangles in both source and destination.

Change-Id: Ief151d736818396d0389ec04e7df5650e3ad7c04

commit 273184303d54a54febd3e9c3dd4df30507ea78b5
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 15:04:06 2010 -0800

The stagefright commandline tool now writes the extracted video frame to /sdcard/out.jpg

Change-Id: Ieb2ab3fda7a7cd9294beccb8db0eed75096eeef4

commit 2d43390328cadf4ba94c1c3c02e4fb30baa29690
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 14:36:55 2010 -0800

The AVC software decoder now properly advertises the cropping rectangle.

Change-Id: Idb7a8a7e2fde5740f0fc34b7e8c92eca2577104b

commit 9a7ed23c2fac8ce19dce7a34a603acee945a89f6
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 13:40:39 2010 -0800

OMXCodec now signals a format change if the cropping rectangle changes.

...and puts the cropping info into its output format.

Change-Id: I3ffbd8e877ba286fe06a82c536ef20d92548d2e2

commit efe0323947029df1c502599ccc288c8d676dfd31
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 19 11:29:39 2010 -0800

Stagefright's MetaData object now supports rectangle items.

Change-Id: I5667bb5ee6622c76104b99fb57f60abb802a8504

Change-Id: I27cb78f2c5e0353f95fdfc5cb53991949ed75b70
tagefright/ColorConverter.h
tagefright/MetaData.h
5b12af0ea4b98ad60bc066bceb8504d16fcca41d 20-Nov-2010 James Dong <jdong@google.com> Merge "Removed uncessary FILE structure pointer for I/O"
f5aafb209d01ba2ab6cb55d1a12cfc653e2b4be0 18-Nov-2010 Eric Laurent <elaurent@google.com> Fix issue 3157123.

Use a Mutex wherever atomic operations were used in AudioTrack,
AudioRecord, AudioFlinger and AudioEffect classes.

Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
udioEffect.h
udioRecord.h
udioTrack.h
674ebd0b4e1143e38392a4e3bb38b4679a4577bc 19-Nov-2010 James Dong <jdong@google.com> Removed uncessary FILE structure pointer for I/O

o also move the fd owner from caller to callee in the Writers

Change-Id: I510ccfdd0fcc58f1777fea4ed1349fd251852c65
tagefright/AMRWriter.h
tagefright/FileSource.h
tagefright/MPEG4Writer.h
c7fc37a3dab9bd1f96713649f351b5990e6316ff 16-Nov-2010 James Dong <jdong@google.com> 64-bit file size/offset support for media framework

Change-Id: I3452bc2c0f1d990cc67285df2fce1f9f86ff8e10
tagefright/AMRWriter.h
tagefright/DataSource.h
tagefright/FileSource.h
tagefright/JPEGSource.h
tagefright/MPEG4Writer.h
14d32754d3a9c1ccf49188c489f224800cd747a7 18-Nov-2010 Gloria Wang <gwang@google.com> Merge "Add getUri() for streaming"
771b85d9245a24273497792a2515d88d31c99e1e 10-Nov-2010 Gloria Wang <gwang@google.com> Add getUri() for streaming

Change-Id: I56e15e67cc5f4d0f41c9e2985404a4d89d757e7e
tagefright/DataSource.h
38f63d7b118448c93dcdd10ec77a5e61c283928c 17-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Merge "Add new audio mode for audio communications other than telelphony."
0a5ca668c6f7d45706e9aec4a1dfec0aacc6d233 16-Nov-2010 Andreas Huber <andih@google.com> Remove all traces of legacy renderer support in stagefright.

Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
MediaPlayer.h
OMX.h
ediaPlayerInterface.h
tagefright/HardwareAPI.h
tagefright/VideoRenderer.h
f1fb01a7f00b8da90a36268aba8584a872e99175 15-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add new audio mode for audio communications other than telelphony.

The audio mode MODE_IN_CALL signals the system the device a phone
call is currently underway. There was no way for audio video
chat or VoIP applications to signal a call is underway, but not
using the telephony resources. This change introduces a new mode
to address this. Changes in other parts of the system (java
and native) are required to take this new mode into account.
The generic AudioPolicyManager is updated to not use its phone
state variable directly, but to use two new convenience methods,
isInCall() and isStateInCall(int) instead.

Change-Id: Id744cd26520ea1d1a4795eabe6a1f0c58789af76
udioSystem.h
ffectApi.h
30d713a1c18a5ff892a7f13b2524ba624b70890a 11-Nov-2010 James Dong <jdong@google.com> Remove legacy PV stuff

Change-Id: I60ffea7c65592df4b3a80c590c863f1f79b371fd
VMediaRecorder.h
VMetadataRetriever.h
VPlayer.h
2d71233de5450f1b128c8149fdbdf39b937f3cb8 13-Nov-2010 James Dong <jdong@google.com> Merge "Separate the key for audio sampling rate and video frame rate in MetaData.h"
56ecd20263d7f63476f756fc5d8b043b325c7bfb 09-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add support for audio recording source in generic audio policy mgr.

Update the platform-independent audio policy manager to pass the
nature of the audio recording source to the audio policy client
interface through the AudioPolicyClientInterface::setParameters()
method.

Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
udioSystem.h
393410a441b6d06daf286ed496470e9d6b2b6ca8 11-Nov-2010 James Dong <jdong@google.com> Separate the key for audio sampling rate and video frame rate in MetaData.h

Change-Id: Ia33befaa7e6df8762703002d01aa79c04f15f040
tagefright/MetaData.h
b50a8033f1c7c2b58913212825f9200f1a9e5652 11-Nov-2010 James Dong <jdong@google.com> Add color format query support to QueryCodecs()

Change-Id: Ic8589649cd09392a1b969a30082b4c9c4e6cc6a7
tagefright/OMXCodec.h
f23c4f92c3b0202435cf87db2642156fabc46f02 11-Nov-2010 James Dong <jdong@google.com> Fix memory leak when 0-memcpy quirk is used

o minor change to the original patch by Andreas:
call restorePatchedDataPointer() method only if kAvoidMemcopyInputRecordingFrames is turned on

Change-Id: Idf3710e6f759d37d28e866613f98d39215722cb9
tagefright/OMXCodec.h
c643d77a099b0e86ad12de9b498f6f780e03184e 09-Nov-2010 Jean-Michel Trivi <jmtrivi@google.com> Add recording source for voice communication

Add a recording source used to designate a recording stream for
voice communications such as VoIP.

Change-Id: I4091d67069b1a0170c1a5ca5e6acd51eb0aa08f9
ediarecorder.h
13f6284305e4b27395a23db7882d670bdb1bcae1 09-Nov-2010 James Dong <jdong@google.com> Rotation support

- We only support 0, 90, 180, and 270 degree clockwise rotation

- Some players are known to ignore composition matrix in the MP4 file,
although this is part of the MP4 file standard.
Both QT and YT are supporting the rotation

The original patch (65a73f4e8c79d05c0d9001b660325748d4ecf37b) was not merged.
The only change I made is to reuse the same kKeyRotation in MetaData.h;
and thus do not neeed to use kKeyRotationDegree.

Change-Id: Ib328716d4842201c4adf57e4ddfe1f1ac1ae4d8a
tagefright/MPEG4Writer.h
30db2709395c73fb3b4ee334119ceba68c95ab13 09-Nov-2010 James Dong <jdong@google.com> Fix a build break due to the missing kKeyRotation

Change-Id: I6bf030c946abe7a95f8f7bc464e6507fb02cf39c
tagefright/MetaData.h
3baff73198ce852fa60080bd32703028298b4d65 08-Nov-2010 Andreas Huber <andih@google.com> resolved conflicts for merge of 31dc911a to gingerbread-plus-aosp

Change-Id: I2f51b2120b3c552566d91a7dc498a5e8b130205f
4974d5eaf838d893c418b85bd47f6f114d9b5aaa 06-Nov-2010 James Dong <jdong@google.com> am 1653e261: Merge "Rotation support" into gingerbread

* commit '1653e261e84922facfe27d3d8acc455ed2b6b6da':
Rotation support
85d9b4225d024bb0d602b48bd6d5219cbebd7b8e 04-Nov-2010 Andreas Huber <andih@google.com> Support post-decode video rotation.

Change-Id: Ia371316e73a57e44610de86adce3eaa560afbf84
OMX.h
tagefright/HardwareAPI.h
tagefright/MetaData.h
aca1fe35480ae76dd6bae167ade40adc955e2d0d 17-Aug-2010 James Dong <jdong@google.com> Rotation support

- We only support 0, 90, 180, and 270 degree clockwise rotation

- Some players are known to ignore composition matrix in the MP4 file,
although this is part of the MP4 file standard.
Both QT and YT are supporting the rotation

Change-Id: I1b7f66a801e9d9c49d889c9b06dd6173fa7e76c4
tagefright/MPEG4Writer.h
tagefright/MetaData.h
412abda7a92b842378ecb5fd9bdb43a73d29f468 05-Nov-2010 James Dong <jdong@google.com> Merge "Use meta data in the media recording framework"
c2daea219b626a961d5ccef0b6b22c2496509748 05-Nov-2010 Gloria Wang <gwang@google.com> Merge "Add support for WV DRM"
b371426ce4cf2fa6d8c3d1903b61322feb165d35 01-Nov-2010 Gloria Wang <gwang@google.com> Add support for WV DRM

Change-Id: I0408c5e0a488f112a84337b21b0cd4613a4da461
tagefright/MediaDefs.h
8480835b4bc1350646376aa7f3ae33742a7adeb1 02-Nov-2010 James Dong <jdong@google.com> Use meta data in the media recording framework

o This patch allows us to do 720p video recording

Change-Id: I2ea37e80a59630145396b08ebcdc6ee71df53333
tagefright/OMXCodec.h
ed45fe0730a7e7fc9944741428f5a484350acc8a 02-Nov-2010 Jamie Gennis <jgennis@google.com> Fix a MediaBuffer leak in Stagefright.

Change-Id: I548e60b07cf1676476874b156cfbc4ffefdfa2b9
tagefright/OMXCodec.h
26490f71a5a50b2200d60de28ad0ea6b1d0a1847 03-Nov-2010 James Dong <jdong@google.com> am f3847e87: Merge "DO NOT MERGE" into gingerbread

* commit 'f3847e875eb1c58094a2d159a2a6f3f0b381d77a':
DO NOT MERGE
63a0a11e8b3292253b3d3bf3a7f7dc733cf6762f 03-Nov-2010 James Dong <jdong@google.com> DO NOT MERGE

Fix premature release of recording frames when physical address or metadata is stored in input video buffers

- bug 3158459

Change-Id: If297189d2a87fc3abfda68c29ac75b490b30a902
tagefright/OMXCodec.h
b235dee7be544a6c990ba4f8d89ab03e38c826f8 06-Oct-2010 Praveen Bharathi <pbharathi@motorola.com> Added support for dock headset observer

Change-Id: I06b2e65e3bfa10735e6c7fd3349afa9ae7d45292
Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
udioSystem.h
0821a824a718a28fa5144309bf09ea40411c8ae0 30-Oct-2010 Jamie Gennis <jgennis@google.com> Stop using OMX_COLOR_FormatAndroidPrivateStart.

This removes the use (and definition) of the Android-private range of
OMX color formats from Stagefright. Instead we will just be
interpreting the video color format of an OMX port as an Android pixel
format if the port is in native buffer mode.

Change-Id: I3ea50703336a88249e7563bc7022dfedbeac506e
tagefright/HardwareAPI.h
05ea6434ed399395e2dbe9f68abb44f04b274cb0 29-Oct-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 0d5694ba2d399dd0869532a4d6256448185a1be0
Author: Andreas Huber <andih@google.com>
Date: Fri Oct 29 11:59:23 2010 -0700

suspend() and resume() methods on VideoView are back but don't do anything.

They need to be back because they were public before.

Change-Id: Iddfd1021ffcf341f26e8d55ba761fd33701e2425

commit 16192891ed7d349ee97e47d1729d20a2d0d247b8
Author: Andreas Huber <andih@google.com>
Date: Fri Oct 29 11:47:05 2010 -0700

Revert "New API on VideoView widget to suspend/resume a session. Do not release the MediaPlayer client for video suspending/resuming."

This reverts commit 2e1818a4d16c3309660f27286c77d8d1eee95a25.

Conflicts:

api/current.xml

Change-Id: I68dd1d05871044faf3f832d0838aa40bc7f890e5

commit 8f934dc1a3ae4e60f0790fcf97671e063fa20fad
Author: Andreas Huber <andih@google.com>
Date: Fri Oct 29 11:44:16 2010 -0700

Revert "Release mediaplayer if the current state is not suspending. Fix for bug 2480093."

This reverts commit efb882cf75eef39ecaf9f8920ed302a019fa629f.

commit f2ed03550887986f39d36b5dabcd9e919949c7cf
Author: Andreas Huber <andih@google.com>
Date: Fri Oct 29 11:44:08 2010 -0700

Revert "Release MediaPlayer if suspend() returns false."

This reverts commit 047212fd4ea360675e94d3ce83c7f5544f65b268.

commit 441ecce678bd24e9660a72c8627b5bd94433ff8b
Author: Andreas Huber <andih@google.com>
Date: Fri Oct 29 11:40:46 2010 -0700

manually.

Change-Id: I4fdd43c9f7c8b3eedddb31a196da4984e1c58e87

Change-Id: I60d4b10e7a9e4ed8d9a796f1711618f557eb6e89
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
d332a72e8f71caea0d3dc898db6a9d7a929fad32 23-Oct-2010 James Dong <jdong@google.com> Add two creation flags to OMXCodec::Create()

o This allows to force to use software codecs or hardware codecs
o If request cannot be fullfilled, Create() returns NULL.

Change-Id: I02b56a9229abb56d49703fe80ac18571d33f3748
tagefright/OMXCodec.h
aceaaf303422bbe3a7b8d9cdb96495dbf8109c23 26-Oct-2010 Gloria Wang <gwang@google.com> resolved conflicts for merge of 965f960e to master

Change-Id: I63cec8ffb3593216da1de03428134d89e75b9338
a9741a9232c81eaf59179acef91f5be46c42264e 26-Oct-2010 Gloria Wang <gwang@google.com> resolved conflicts for merge of 9084631d to gingerbread-plus-aosp

Change-Id: Ie2b675d50bfca3f33aee80f1a67c9f03d1f97472
dcd25efb46c41c8d24a0a9cf61fb57f84149709e 22-Jun-2010 Gloria Wang <gwang@google.com> DRM framework support:
- add a sniffer for DRM files
- add DRMSource and DRMExtractor for es_based DRM
- add pread in FileSource.cpp for container_based DRM
- add native DRM framework API calls in the player for
DRM audio/video playback

Change-Id: I4b9ef19165c9b4f44ff40eeededb9a665e78a90f
tagefright/DataSource.h
tagefright/FileSource.h
tagefright/MediaErrors.h
tagefright/MediaExtractor.h
tagefright/MetaData.h
5b2146fc017b02bb5f096b1ac336efd3558a117c 22-Oct-2010 James Dong <jdong@google.com> Merge "OMX extension to support storing meta data in video input buffers during recording"
e870772a78ffe08b1c14a791e368f1499f1be0f3 21-Oct-2010 James Dong <jdong@google.com> OMX extension to support storing meta data in video input buffers during recording

bug - 3042125

Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
OMX.h
tagefright/HardwareAPI.h
cf5e77c0676f6af1685de30ad902fe94e476907f 21-Oct-2010 James Dong <jdong@google.com> am 8ad6335d: am fa7a87fb: Merge "File writer size estimation improvement" into gingerbread

Merge commit '8ad6335d2c22900de5b46460473495b5bcea9f99'

* commit '8ad6335d2c22900de5b46460473495b5bcea9f99':
File writer size estimation improvement
6a9da9fc558263548ebfbae2cbf177eb7454a41b 07-Oct-2010 Jamie Gennis <jgennis@google.com> Add decode-to-ANativeWindow support to Stagefright.

This change adds support to Stagefright for doing OMX video decoding directly
into buffers dequeued from an ANativeWindow. It does this by registering the
dequeued buffers with the OMX component using an Android-specific OMX
extension, and then exchanging buffers between the OMX component and the
ANativeWindow.

Change-Id: Ida66f836503255a68d378c6903d96dfe9747ce87
tagefright/MediaBuffer.h
tagefright/MetaData.h
tagefright/OMXCodec.h
5c9523154d106b555db6c41f85ab205a4f189b02 19-Oct-2010 James Dong <jdong@google.com> Make camera source ready for handling meta-data video buffers.

bug - 3042125

Change-Id: I877b265c6bf8e0593121c8d5a95ae5599cdc6fb9
tagefright/CameraSource.h
78a1a286f736888ae7af8860b2c424af0d978848 20-Oct-2010 James Dong <jdong@google.com> File writer size estimation improvement

o Do not count the reserved space for moov if the meta data size is small
o Do not count the extra 1KB disturbing small file estimation.
o Reduce the default minimum reserved space from 4 KB to 3 KB.
o Estimate the moov size based on both duration AND file size limit is set
and set it to the smaller estimated value.

low risk change

bug - 3111983

Change-Id: I6ac2adb979d8cc12d6b4f1813d000c989add0199
tagefright/MPEG4Writer.h
2ad46bea6b7ef92b24e9bd98b0b459beb71b96ab 19-Oct-2010 Andreas Huber <andih@google.com> am 9b2f18df: am bc96c284: Merge "For thumbnail extraction make sure we instantiate a decoder that allows access to the framebuffer. Implement the samsung workaround to support this by reconfiguring the decoder." into gingerbread

Merge commit '9b2f18df2436b6c2d9735e65119b92f320bb57e2'

* commit '9b2f18df2436b6c2d9735e65119b92f320bb57e2':
For thumbnail extraction make sure we instantiate a decoder that allows access to the framebuffer. Implement the samsung workaround to support this by reconfiguring the decoder.
f3712f026aad1fc46b1df18d1dba718281e39726 18-Oct-2010 Andreas Huber <andih@google.com> For thumbnail extraction make sure we instantiate a decoder that allows access to the framebuffer. Implement the samsung workaround to support this by reconfiguring the decoder.

related-to-bug: 3106534
Change-Id: Ie28d72af2f9e93818d1840ac83aa7bc11fa57b3b
tagefright/OMXCodec.h
3e00cc070090fa3eab16792da90aa33823cd6db1 18-Oct-2010 Andreas Huber <andih@google.com> am 746c6a1c: am ff7a7a45: Merge "Check-in of a copy of the Khronos OpenMAX headers formerly included from external/opencore." into gingerbread

Merge commit '746c6a1c6d70769ee4b08b9a7b87d0c5aa65c2e4'

* commit '746c6a1c6d70769ee4b08b9a7b87d0c5aa65c2e4':
Check-in of a copy of the Khronos OpenMAX headers formerly included from external/opencore.
b10d28f233bb881cc12260c320892e5feb198e9a 15-Oct-2010 Andreas Huber <andih@google.com> Check-in of a copy of the Khronos OpenMAX headers formerly included from external/opencore.

Change-Id: Ie2ecf9558d4ee80cb5a2bbe66ad49f2165a7b09c
related-to-bug: 3101573
tagefright/openmax/OMX_Audio.h
tagefright/openmax/OMX_Component.h
tagefright/openmax/OMX_ContentPipe.h
tagefright/openmax/OMX_Core.h
tagefright/openmax/OMX_IVCommon.h
tagefright/openmax/OMX_Image.h
tagefright/openmax/OMX_Index.h
tagefright/openmax/OMX_Other.h
tagefright/openmax/OMX_Types.h
tagefright/openmax/OMX_Video.h
f9f083e2853740c97588f4db82c24645ae5880e4 15-Oct-2010 Kenny Root <kroot@google.com> resolved conflicts for merge of a127c07c to master

Change-Id: Ifdfc6681cba00f36456eaf7a97f34a75b9d0c086
d6119356f45c9c57cac812357d969ecc3001087e 15-Oct-2010 Andreas Huber <andih@google.com> am 28b93967: am 165c6579: Merge "HTTP Live content that are tagged as complete are now seekable." into gingerbread

Merge commit '28b93967d0e702304c7edec854a29d5ab88bfce0'

* commit '28b93967d0e702304c7edec854a29d5ab88bfce0':
HTTP Live content that are tagged as complete are now seekable.
5cb77e080ced5362b5f047e107327b3cb6ece6c9 13-Oct-2010 Andreas Huber <andih@google.com> Merge "Support for writing to MPEG2 transport stream files." into gingerbread
59b7dc39ea8332d3418a599e51447d7edb612ac4 12-Oct-2010 Andreas Huber <andih@google.com> Support for writing to MPEG2 transport stream files.

Change-Id: If3b7a807bc224a4b1cb2236537c3ebdc5aee0d97
ediarecorder.h
tagefright/MPEG2TSWriter.h
bff07d0b22a5ee2d9f044f6cb5e4be1532017ab0 12-Oct-2010 Andreas Huber <andih@google.com> HTTP Live content that are tagged as complete are now seekable.

Change-Id: I9d0d2f009f883e5baf3e9de8c5c0aa05760e4bde
related-to-bug: 2368598
tagefright/DataSource.h
9086ce254ac8769dbe90afd5146fce509a86418f 11-Oct-2010 Andreas Huber <andih@google.com> am 2b4f1f4c: am f72dd019: Merge "Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality." into gingerbread

Merge commit '2b4f1f4cb814f7a7df8d2cb9fcb5210bfe7999c7'

* commit '2b4f1f4cb814f7a7df8d2cb9fcb5210bfe7999c7':
Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality.
2eeadf9ded4b5770a713496e9887d668889987bc 11-Oct-2010 Eric Laurent <elaurent@google.com> am 4f21e517: am b37fcbfd: Merge "Added getter for session Id to AudioSink" into gingerbread

Merge commit '4f21e517d09b9d793d20d64547df330fba705b3c'

* commit '4f21e517d09b9d793d20d64547df330fba705b3c':
Added getter for session Id to AudioSink
0e4d896cb9ab813131c45b3b1fcd4cc66d341468 10-Oct-2010 Andreas Huber <andih@google.com> am bb708373: am 949f7d90: Merge "Work to support switching transport streams mid-stream and signalling discontinuities to the decoder." into gingerbread

Merge commit 'bb70837397e3fb437b7b4443b37d7a83c11e6e43'

* commit 'bb70837397e3fb437b7b4443b37d7a83c11e6e43':
Work to support switching transport streams mid-stream and signalling discontinuities to the decoder.
79e0ac144ca9bb771e2c6b1954c882da12a4bea8 10-Oct-2010 Andreas Huber <andih@google.com> am 45bd1159: am 02654f01: Merge "On this particular device the hardware video decoder spits out buffers that don\'t actually contain our video data, so we cannot use them to restore the video frame after suspend/resume." into gingerbread

Merge commit '45bd1159fa34b51ba077e0cde760d171ca092552'

* commit '45bd1159fa34b51ba077e0cde760d171ca092552':
On this particular device the hardware video decoder spits out buffers that don't actually contain our video data, so we cannot use them to restore the video frame after suspend/resume.
2b37ced30f89437c804c3945b901019b86d210ae 09-Oct-2010 James Dong <jdong@google.com> 0-memcpy video recording framework

Part III: Move startRecording() call earlier, asking camera hal
to allocate video buffers before CameraSource.start() is called.

Change-Id: I3f1d7d5636ca2644fe52af61f297d48c6b1ce89d
tagefright/CameraSource.h
54ff19ac69ace7c05ea90d225e26dab3b133f487 08-Oct-2010 James Dong <jdong@google.com> Move Camera specific logic out from StagefrightRecorder to CameraSource

o updated comments and streamlined the logic in
checkVideoSize() and checkFrameRate() as suggested

Change-Id: I49d04ac7998d4a215997aa63555dfb6e814e38d3
tagefright/CameraSource.h
tagefright/CameraSourceTimeLapse.h
6f3cba53efdd985ab13734c7ad90eb373ae9b9f7 08-Oct-2010 Andreas Huber <andih@google.com> Merge "Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality." into gingerbread
70f521de2675ce6eedf4b22beed94ea1289b0f38 08-Oct-2010 Andreas Huber <andih@google.com> Disable 10secs forward/backward seeking for rtsp as seek is a very expensive operation there. Decouple the 10sec forward/backward button functionality from seekbar functionality.

Change-Id: I016e79b688774f8ee91ac53216197b5fb9cb41b2
related-to-bug: 3073955
etadata.h
tagefright/MediaExtractor.h
8c563ed9ca8a863a66965330b5d14bb4b4ab59d4 08-Oct-2010 Eric Laurent <elaurent@google.com> Added getter for session Id to AudioSink

Added a method to expose the audio session id at AudioSink interface
so that the AudioPlayer in stagefright can retrieve it.

Also:
- Fixed audio effect send level not being initialized in mediaplayer.
- Fixed compilation error when LOGV is enabled in mediaplayer JNI

Change-Id: I4bb55454fd63d646e0e677692d737c4843fb05fb
ediaPlayerInterface.h
2eb16c2250c57a8009ab58e9aeb1606ab62bbbbc 07-Oct-2010 Andreas Huber <andih@google.com> am 56ee1080: am 17bc4f65: Merge "Make sure to call AudioTrack::stop() instead of AudioTrack::pause() after submitting all samples to AudioTrack to make sure those remaining samples are actually played out." into gingerbread

Merge commit '56ee1080f004110bff622e5b60c243d9cabfe120'

* commit '56ee1080f004110bff622e5b60c243d9cabfe120':
Make sure to call AudioTrack::stop() instead of AudioTrack::pause() after submitting all samples to AudioTrack to make sure those remaining samples are actually played out.
2a4d22d79e927f2245537921e10fc5fda1c47a29 08-Sep-2010 Andreas Huber <andih@google.com> Work to support switching transport streams mid-stream and signalling discontinuities to the decoder.

Change-Id: I7150e5e7342e1117c524856b204aadcb763e06ed
related-to-bug: 2368598
tagefright/MediaErrors.h
tagefright/OMXCodec.h
2b82e9652ba049e754c2cc74e381282f231d5fbf 07-Oct-2010 Andreas Huber <andih@google.com> On this particular device the hardware video decoder spits out buffers that don't actually contain our video data, so we cannot use them to restore the video frame after suspend/resume.

Change-Id: I1b8fe68c1766299844fe84ebbff49cb8b3e4cc7c
related-to-bug: 3070094
tagefright/MetaData.h
tagefright/OMXCodec.h
eba2d0611923ad75c3b894ebe5ce3d5fc7f6a946 07-Oct-2010 James Dong <jdong@google.com> am a86a6c4e: am 6f1c7bda: Merge "Fixed an issue where the reserved free space in the file writer was larger than intended" into gingerbread

Merge commit 'a86a6c4e326bfdfc351dacca95b23bb78f78efbe'

* commit 'a86a6c4e326bfdfc351dacca95b23bb78f78efbe':
Fixed an issue where the reserved free space in the file writer was larger than intended
b2e3954c94717e43b3dc9b880564f166cfbbc0a2 05-Oct-2010 Andreas Huber <andih@google.com> Make sure to call AudioTrack::stop() instead of AudioTrack::pause() after submitting all samples to AudioTrack to make sure those remaining samples are actually played out.

Change-Id: Id574a0203efcb5e565f1b0fe77869fc33b9a9d56
tagefright/AudioPlayer.h
a007e8229fb2be4866c483f9cd6c4af238a2da5e 05-Oct-2010 James Dong <jdong@google.com> Fixed an issue where the reserved free space in the file writer was larger than intended

The problem was that even though user does not explicitly request the max file size
limit via MediaRecorder.setMaxFileSize(), the file writer sets an implicit file
size limit if 32-bit file offset is used on user's behalf. The reserved free space
is estimated based on the file size, if the file size limit is set by the user.

The fix is to add an extra bool to tell the difference between an
explit requested file size and an implicit file limit and use that
to set the estimated moov box size accordingly.

Change-Id: I731aca6c7833aa764ed7b905edb77721577471b3
tagefright/MPEG4Writer.h
fb9b87b6c22d940e5e7cb4b5e7cfae99015a0131 28-Sep-2010 Andreas Huber <andih@google.com> am d6c30e8c: am be045061: Merge "Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens." into gingerbread

Merge commit 'd6c30e8c1521bc584f33500b8ee897dafdfec023'

* commit 'd6c30e8c1521bc584f33500b8ee897dafdfec023':
Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens.
8267b65adcfd944c3f465425183ad7f38b0999e5 28-Sep-2010 Andreas Huber <andih@google.com> am c889bbfa: am 4769f579: Merge "Vorbis files may have more samples encoded that should be used, i.e. we have to trim samples at the end of the stream. This is crucial for proper looping of some audio files." into gingerbread

Merge commit 'c889bbfa965f4ba90636f561c5e1353289d4cb06'

* commit 'c889bbfa965f4ba90636f561c5e1353289d4cb06':
Vorbis files may have more samples encoded that should be used, i.e. we have to trim samples at the end of the stream. This is crucial for proper looping of some audio files.
b8b92e517c4168a96f4d29d35cba7a87f0913c87 28-Sep-2010 Andreas Huber <andih@google.com> am 9d591860: am 3a9cc8ce: Merge "Squashed commit of the following:" into gingerbread

Merge commit '9d59186068891834272c2e3ee6f9c4228af24656'

* commit '9d59186068891834272c2e3ee6f9c4228af24656':
Squashed commit of the following:
6fd2b44b156c4ef28e131183f0fe8f7dcecfcc6e 28-Sep-2010 Andreas Huber <andih@google.com> Merge "Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens." into gingerbread
ed54ad0f8619ae416b0968ade6248894cbfc4dba 28-Sep-2010 Andreas Huber <andih@google.com> Instead of constantly polling the AudioPlayer to see if it reached EOS or finished seeking, initiate the notification from the AudioPlayer when the event happens.

Change-Id: I43875b6adaf96d4e982ef3dfc3d6c8f7034ac51d
related-to-bug: 3036592
tagefright/AudioPlayer.h
8211da9eabe28037ebcc23bbfbbe20cb21cb0cdc 28-Sep-2010 Andreas Huber <andih@google.com> Merge "Vorbis files may have more samples encoded that should be used, i.e. we have to trim samples at the end of the stream. This is crucial for proper looping of some audio files." into gingerbread
db6222212528637d8f2afa7f49fc3c8c915bafbe 28-Sep-2010 Andreas Huber <andih@google.com> Vorbis files may have more samples encoded that should be used, i.e. we have to trim samples at the end of the stream. This is crucial for proper looping of some audio files.

related-to-bug: 3036592
Change-Id: Ib142b171c829ed74156c0281d9d4543fcc96c802
tagefright/MetaData.h
0da4dab0a45a2bc1d95cbc6ef6a4850ed2569584 27-Sep-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 29a4d3effb05a2e074cb0693316ab1977baeb0b6
Author: Andreas Huber <andih@google.com>
Date: Mon Sep 27 12:01:32 2010 -0700

Fully working implementation of MPEG2TSWriter (for AAC and AVC sources).

Change-Id: I8a32a47565b647bf6c078c520e39565e08ea0d84

commit f4dec4c3899f3be393508e180d6c07e249d3335e
Author: Andreas Huber <andih@google.com>
Date: Mon Sep 27 10:36:31 2010 -0700

More reliable identification of MPEG2 transport streams. Don't keep scanning forever in case the stream does not have both audio and video tracks.

Change-Id: Icc5b4e8be145b2805e8776559546a6818342aea7

commit 4fe3cc942f9b3d3cf54138b828c41214aa916dd2
Author: Andreas Huber <andih@google.com>
Date: Mon Sep 27 08:23:39 2010 -0700

test code

Change-Id: I16560a17661407d06497f99ff88230724bb898af

commit 64d988b24f49f179a90fa677be11c823959e734b
Author: Andreas Huber <andih@google.com>
Date: Thu Sep 23 14:42:52 2010 -0700

First shot at supporting writing to an MPEG2 transport stream.

Change-Id: Ie537939a99fa3ddc0c7661c47c18277584817c74

Change-Id: If78fd034af8f6e8ceac8dbeff96d5ecb3f6b96dc
tagefright/MPEG2TSWriter.h
3f94dacbd43b48bb629a79e45e738ead37c5debd 22-Sep-2010 Andreas Huber <andih@google.com> am af909581: am 67738486: Merge "Remove stagefright foundation\'s incompatible logging interface and update callsites." into gingerbread

Merge commit 'af90958184fc5cfa1a4190e28bcfc4fdd4a5bcd6'

* commit 'af90958184fc5cfa1a4190e28bcfc4fdd4a5bcd6':
Remove stagefright foundation's incompatible logging interface and update callsites.
6e4c5c499999c04c2477b987f9e64f3ff2bf1a06 21-Sep-2010 Andreas Huber <andih@google.com> Remove stagefright foundation's incompatible logging interface and update callsites.

Change-Id: I45fba7d60530ea0f233ac3695a97306b6dc1795c
tagefright/foundation/ADebug.h
467bdb0df9909b20492c103ff6839f39d346c670 17-Sep-2010 Nipun Kwatra <nkwatra@google.com> Merge "Adding default profiles for specific levels."
d5672bc7162fa49abf9bb5844195887e911aa7ce 17-Sep-2010 Nipun Kwatra <nkwatra@google.com> Adding default profiles for specific levels.

The low and high profiles should each match one of the
specific profiles. So we need to add the specific profiles
corresponding to the low/high profiles. This makes the
default profile compliant to documentation + cts.

Also fixed javadoc to account time lapse profiles.

Change-Id: I34e7307d00ce261c69dc10ead2900025c7f6d428
ediaProfiles.h
78eff720c86eb6d4e3d45a144df60b2ca464d2d4 16-Sep-2010 Nipun Kwatra <nkwatra@google.com> Implemented frequent read returns for quick stop in time lapse.

If the frame capture interval is large, read will block for a long time.
Due to the way the mediaRecorder framework works, a stop() call from
mediaRecorder waits until the read returns, causing a long wait for
stop() to return. To avoid this, we return a copy of the last read
frame with the same time stamp if a frame is not available quickly.
This keeps the read() call from blocking too long. This method is
triggered when startQuickReadReturns() is called on
CameraSourceTimeLapse.

In the still camera case, also using waitRelative on Condition
instaed of sleeping, so that we can wake it up.
Also for the idle check instead of sleeping, we now wait on a
condition variable, which is woken up when the last takePicture
callback gets called.

Change-Id: Ia74386e175536aee0f44ae2f8b114c353d3d72f5
tagefright/CameraSourceTimeLapse.h
c59ad085c9737e8d56328732be6864de302acae9 10-Sep-2010 Mike Lockwood <lockwood@android.com> Media scanner support for tracking files of arbitrary type.

The native media scanner no longer filters files based on file extension.
Audio, video, image and playlist files are handled as before, but non-media
files are now inserted into the "files" table, which was originally added
to support MTP.

Change-Id: I9053218fb6d2671a3bb181405c34442b94678afc
Signed-off-by: Mike Lockwood <lockwood@android.com>
ediascanner.h
9783ed8f85af3d7c72030098acfed7e1d6638349 11-Sep-2010 Nipun Kwatra <nkwatra@google.com> Exposing specific profile levels + hasProfile().

- Exposing the specific resolution profile levels
QUALITY_{QCIF,CIF,480P,720P,1080P} and the new time lapse profiles
QUALITY_TIME_LAPSE_{LOW,HIGH,QCIF,CIF,480P,720P,1080P}
- Unhiding the hasProfile() function used to test if a given profile exists.

Change-Id: I5d8b9e1ba61718f304235e76d85244e428e68643
ediaProfiles.h
1a02fabca518806222212bdc708b36a37a7c3925 11-Sep-2010 Nipun Kwatra <nkwatra@google.com> Merge "Adding hasProfile."
a0d472f114bb6a74005aaf61e91e3569ae061630 10-Sep-2010 Nipun Kwatra <nkwatra@google.com> Merge "Added specific resolution and time lapse profiles."
8bb5603cc735315c8691dc9b7a81b4ad4d6e253e 10-Sep-2010 Nipun Kwatra <nkwatra@google.com> Adding hasProfile.

- Added hasProfile to CamcorderProfile and JNI.
- Added hasCamcorderProfile to MediaProfiles.
- using android.hardware.Camera.CAMERA_ID_DEFAULT for default camera
in get().

Change-Id: Ib57bb49ae79492d7cbc0ec6c7b6efcbf74f80013
ediaProfiles.h
c0a84782589eececdfa7e723e8aa0e572d0d79f5 07-Sep-2010 Nipun Kwatra <nkwatra@google.com> Added specific resolution and time lapse profiles.

- Added enums QUALITY_{QCIF,480P,720P,1080P}
QUALITY_TIME_LAPSE_{LOW,HIGH,QCIF,480P,720P,1080P} in CamcorderProfile
and corresponding ones in MediaProfiles.
- Added functions createDefaultCamcorderTimeLapseLowProfile,
createDefaultCamcorderTimeLapseHighProfile to set default values.
- Moved javadoc for constants to the get() function.

Change-Id: Ib8b3f8d29395dff77a397d1e6b44cfaf8c481d4d
ediaProfiles.h
9b2cef27bbe953c0b5c37ada9bf18d706c396513 09-Sep-2010 James Dong <jdong@google.com> am 306cd58d: am d353c840: Merge "HW audio encoder expects timestamp via kKeyTime from each input buffer" into gingerbread

Merge commit '306cd58ddcc0cb8487bc6e015f8c692eea47a334'

* commit '306cd58ddcc0cb8487bc6e015f8c692eea47a334':
HW audio encoder expects timestamp via kKeyTime from each input buffer
fbf7162465ee5b9e928d5676d439a475c93b0725 09-Sep-2010 James Dong <jdong@google.com> Merge "HW audio encoder expects timestamp via kKeyTime from each input buffer" into gingerbread
3c3763d2ee1cd1fba7fe522fbaf0faca315d8c2a 09-Sep-2010 James Dong <jdong@google.com> HW audio encoder expects timestamp via kKeyTime from each input buffer

- This fixes media server crashes on droid

Change-Id: I7191cadc5275107425ec3ee3d437b2c5295858dc
tagefright/MetaData.h
87e607994fa1703e1b975af41b02e539e7b7411f 09-Sep-2010 Eric Laurent <elaurent@google.com> am e126119c: am 95d86480: Merge "Modify type of some environmental reverb parameters" into gingerbread

Merge commit 'e126119c3a406bc564f2549aeb1416aff112689d'

* commit 'e126119c3a406bc564f2549aeb1416aff112689d':
Modify type of some environmental reverb parameters
54c38fdcff502ab3502c55dd314a954dd60c0183 09-Sep-2010 Eric Laurent <elaurent@google.com> Modify type of some environmental reverb parameters

Changed type of decay time, reverb delay and reflections delay parameters
from signed to unsigned int to match OpenSL ES interface definition.

Also fixed some type casts in lvm reverb wrapper.

Change-Id: I5ca5e76a87c2590f01f031f3168355586ef22556
ffectEnvironmentalReverbApi.h
5d7d90a0dec80114e4e299aaca69e41df6ff296a 04-Sep-2010 Nipun Kwatra <nkwatra@google.com> Merge changes I71f5b0fc,I92c7accb

* changes:
Moving decision to use still camera to CameraSourceTimeLapse
pass auxiliary video parameters.
155e833a7a5fc3e193691324cf9326da1bc3289a 02-Sep-2010 Nipun Kwatra <nkwatra@google.com> Moving decision to use still camera to CameraSourceTimeLapse

CameraSourceTimeLapse now decides whether to use still or video
camera automatically. It checks if the passed in size is a valid
preview size and if it is, then uses the video camera else uses
the still camera.

Removed from StagefrightRecorder the support to set parameter
useStillCameraForTimeLapse.

Change-Id: I71f5b0fc7080ca524792381efe918d22e41a7f36
tagefright/CameraSourceTimeLapse.h
49ce029a6b62681c576a51f963d734eccd4eaccd 03-Sep-2010 Andreas Huber <andih@google.com> am 8e11c822: am 9fee0b2a: Ogg files can be tagged to be automatically looping, this setting always overrides the MediaPlayer\'s setLooping setting.

Merge commit '8e11c82247151085fa165c76bfbc157bc6091ca4'

* commit '8e11c82247151085fa165c76bfbc157bc6091ca4':
Ogg files can be tagged to be automatically looping, this setting always overrides the MediaPlayer's setLooping setting.
24beeac58c36b780ae61d1fb7a3421ffe5510a1e 03-Sep-2010 Jamie Gennis <jgennis@google.com> Merge "Add the new Stagefright ANativeWindow OMX codec API."
83750eaf5a3f38c243a9e7eb81d4b2421e3a0d88 31-Aug-2010 Jamie Gennis <jgennis@google.com> Add the new Stagefright ANativeWindow OMX codec API.

This change defines the two OMX_SetParameter calls that enable OMX codecs to
interact with ANativeWindows. It also adds the plumbing to the IOMX, OMX, and
OMXNodeInstance classes to use these new APIs.

This is try 2 for this change, after reverting the first one because it broke
the build.

Change-Id: I94249b72bdb5d5719360f03d7935fcca4ece5028
OMX.h
tagefright/HardwareAPI.h
8ae49d87b98d57d6758b0c51b95e28a6581a79f1 03-Sep-2010 Andreas Huber <andih@google.com> Ogg files can be tagged to be automatically looping, this setting always overrides the MediaPlayer's setLooping setting.

Change-Id: Ifb564c6cdf6137eac14869f9ca7d471f05a5556a
related-to-bug: 2974691
tagefright/MetaData.h
35b8b488e0822854d411976710ed55f3a1c72bf3 03-Sep-2010 James Dong <jdong@google.com> am bc1452a3: am 7755cdd6: Remove unused/debugging code from MP4 file writer

Merge commit 'bc1452a307ac61ca87bf78722701ac85100952af'

* commit 'bc1452a307ac61ca87bf78722701ac85100952af':
Remove unused/debugging code from MP4 file writer
b4d5320bda29cd9694461c9b61d0211f801ff0af 02-Sep-2010 James Dong <jdong@google.com> Remove unused/debugging code from MP4 file writer

o also makes nal length in the recorded file modifiable at runtime

Change-Id: I731b4dde7070d8d9628b36b523a5b2c011c7c2cf
tagefright/MPEG4Writer.h
tagefright/MetaData.h
92be4e1735b54e2528fed455b87c813cdd73d8c2 03-Sep-2010 James Dong <jdong@google.com> am 3c3fc97e: am 46e63b34: Merge "Better file size estimate" into gingerbread

Merge commit '3c3fc97e104bd17af608727d82e965fc28f2c89d'

* commit '3c3fc97e104bd17af608727d82e965fc28f2c89d':
Better file size estimate
1f90c4b3fda9dbd2824d67fd679f850572f114dc 02-Sep-2010 James Dong <jdong@google.com> Better file size estimate

When the recorded file becomes large, the metadata size can
no longer be ignored. This makes it possible to save the
recorded file when the storage becomes almost full at the
end of the recording session.

Change-Id: Ief038080f825c9946ce550949c03e914aec1e31a
tagefright/MPEG4Writer.h
fbc6db2e7af12b88703b4cbaa4c7b979bc9d028e 03-Sep-2010 James Dong <jdong@google.com> am bb64e554: am 7ed7668b: Merge "Calculate audio media drift time from AudioSource" into gingerbread

Merge commit 'bb64e554d9a28fcf8eebf579e91ff71b8ffef1e3'

* commit 'bb64e554d9a28fcf8eebf579e91ff71b8ffef1e3':
Calculate audio media drift time from AudioSource
d707fcb3e29707ca4a5935c294ef0b38eb5aba5f 02-Sep-2010 James Dong <jdong@google.com> Calculate audio media drift time from AudioSource

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
tagefright/AudioSource.h
tagefright/MPEG4Writer.h
tagefright/MetaData.h
9f2d258645826c999a93a4206df157fec2e3b0f2 01-Sep-2010 Jamie Gennis <jgennis@google.com> Revert "Merge "Add the new Stagefright ANativeWindow OMX codec API.""

This reverts commit 8a643b411e1802977f742709113ce01b06a18e12, reversing
changes made to 73ea9beaf8eb3d0027e78cbc0ac5e626c3f8deb4.
OMX.h
tagefright/HardwareAPI.h
9dd4931cca8e4a2fcbcabf4eb7078648e1c029cd 01-Sep-2010 Jamie Gennis <jgennis@google.com> Merge "Add the new Stagefright ANativeWindow OMX codec API."
559dc605bfe2deb73ad718e0d5c5dc55e27c45df 31-Aug-2010 Jamie Gennis <jgennis@google.com> Add the new Stagefright ANativeWindow OMX codec API.

This change defines the two OMX_SetParameter calls that enable OMX codecs to
interact with ANativeWindows. It also adds the plumbing to the IOMX, OMX, and
OMXNodeInstance classes to use these new APIs.

Change-Id: Ibfbf893dc3513db0b3d3221bec5708c77287cddc
OMX.h
tagefright/HardwareAPI.h
ad452ffadf0ced7449395585a55255c915734e17 30-Aug-2010 Nipun Kwatra <nkwatra@google.com> Added VideoSourceDownSampler

VideoSourceDownSampler takes in a real video source. The MediaSource
interface is then implemented by shortcircuiting calls to this real source,
except for the read() function. For read we first call read of the real
source, then downsample the frame to the desired size and return that.

Change-Id: I6e1b377e043e136a70a7b03792eb9165bbe26398
tagefright/VideoSourceDownSampler.h
5d6aca5d86e86af3f8f597be573d4563d69ceb85 27-Aug-2010 Nipun Kwatra <nkwatra@google.com> Added setAuxiliaryOutputFile to MediaRecorder and JNI

added setAuxiliaryOutputFile to allow setting of an auxiliary output file.
Also added the JNI support.

Change-Id: I8c3335192bd6f7fcbfdfc8552cfd0848f2ad2a5d
MediaRecorder.h
ediaRecorderBase.h
ediarecorder.h
c5c4286bebffa4c2a9539c8e09207c3130351531 30-Aug-2010 Andreas Huber <andih@google.com> am 6df6d606: am df992ac9: Merge "ALoopers can now be named (useful to distinguish threads)." into gingerbread

Merge commit '6df6d60681be9d524ce7fc07f2511008de424d27'

* commit '6df6d60681be9d524ce7fc07f2511008de424d27':
ALoopers can now be named (useful to distinguish threads).
c01ec02269e3bf1fd57620149085407bf6750447 30-Aug-2010 Andreas Huber <andih@google.com> Merge "ALoopers can now be named (useful to distinguish threads)." into gingerbread
cc567f511a159867dcde8da824cab7464e687535 28-Aug-2010 Nipun Kwatra <nkwatra@google.com> Merge "client_id->clientId, bugfix for signaling of read abort on stop."
4caa5782afbf07da01532f7b8744157f0e92d01e 27-Aug-2010 Nipun Kwatra <nkwatra@google.com> client_id->clientId, bugfix for signaling of read abort on stop.

- changed client_id->clientId, mClient_id->mClientId
- there was a bug in the condition for calling
signalReadComplete_lock() in stop. We should call it only when
!mLastReadCompleted and also if the current client has not already
completed its read (this second check was missing before).

Change-Id: I9a57cf6b5c6f3260883a6c74d0c7b22f675c422e
tagefright/MediaSourceSplitter.h
9bdccaca6a7a09457670138bf6cdd9b3ba5e7087 28-Aug-2010 James Dong <jdong@google.com> am a5fe77d0: am df8356ff: Merge "Workaround for a QCOM issue where the output buffer size advertised by the AVC encoder is occasionally too small." into gingerbread

Merge commit 'a5fe77d004091bd9521d087c2572f587191afbfc'

* commit 'a5fe77d004091bd9521d087c2572f587191afbfc':
Workaround for a QCOM issue where the output buffer size advertised by the AVC encoder
f00421ce0af03785a229552cb9738ac09b17a675 28-Aug-2010 James Dong <jdong@google.com> am 7d3ff384: am b86365ad: Merge "Suppress the video recording start signal - bug 2950297" into gingerbread

Merge commit '7d3ff3849c830f0136c692b6074f1ba5da288fe7'

* commit '7d3ff3849c830f0136c692b6074f1ba5da288fe7':
Suppress the video recording start signal
a814c1fdc2acf0ed2ee3b175110f6039be7c4873 28-Aug-2010 Andreas Huber <andih@google.com> ALoopers can now be named (useful to distinguish threads).

Change-Id: Ieabaddb2e3a9e3a7a5bc36e55cd0721b60dbd50e
tagefright/foundation/ALooper.h
824c9ff4a55e86faae4f8f158977329909cbfaf6 27-Aug-2010 James Dong <jdong@google.com> Workaround for a QCOM issue where the output buffer size advertised by the AVC encoder
is occasionally too small.

bug - 2882917

Change-Id: Id59d8529084c5689a26f272e0cd3b1e955fd8a30
tagefright/OMXCodec.h
d9a81d43fd23f10091afa4e78bd2f5db87f74e7f 27-Aug-2010 Nipun Kwatra <nkwatra@google.com> Merge "Added MediaSourceSplitter to split single source to multiple ones."
c7e5094ece8083bcaa8160564655df986126f4bd 27-Aug-2010 Nipun Kwatra <nkwatra@google.com> Added MediaSourceSplitter to split single source to multiple ones.

MediaSourceSplitter provides a way to split a single mediaSource
into multiple sources. It takes in the real mediaSource and multiple
clients can then be created which serve from the same real mediaSource.

Change-Id: I7254ead24b4c26c784b033e6bc7ff5a0d083a0c3
tagefright/MediaSourceSplitter.h
f1ae1963f5028a670573b50a9c1cfb504fc426b4 27-Aug-2010 James Dong <jdong@google.com> Suppress the video recording start signal
- bug 2950297

Change-Id: I0044d07178691feb904cf81e87c1b6d4b714dc1a
tagefright/AudioSource.h
53bfd693c45278bf71cb5e184ffd3e95d52e04d8 26-Aug-2010 Eric Laurent <elaurent@google.com> am 8ca5df27: am c14f9ca6: Merge "Added preset reverb." into gingerbread

Merge commit '8ca5df27df8a2b6435486f9b5a163bf222f8fed1'

* commit '8ca5df27df8a2b6435486f9b5a163bf222f8fed1':
Added preset reverb.
f0bfaa8f56ddcfbebc129ecb45335218c39506f0 26-Aug-2010 Eric Laurent <elaurent@google.com> Merge "Added preset reverb." into gingerbread
d31cdebccaa64e4ce0012254aa4986fbea93a2a1 25-Aug-2010 Andreas Huber <andih@google.com> am 96dc4559: am b8814dce: Merge "Allow sniffers to return a packet of opaque data that the corresponding extractor can take advantage of to not duplicate work already done sniffing. The mp3 extractor takes advantage of this now." into gingerbread

Merge commit '96dc45597e53742a2c8453f9ce03f7d501a75668'

* commit '96dc45597e53742a2c8453f9ce03f7d501a75668':
Allow sniffers to return a packet of opaque data that the corresponding extractor can take advantage of to not duplicate work already done sniffing. The mp3 extractor takes advantage of this now.
5a1c3529e4fa2f8a11054181294e0ce79fff8dd3 25-Aug-2010 Andreas Huber <andih@google.com> Allow sniffers to return a packet of opaque data that the corresponding extractor can take advantage of to not duplicate work already done sniffing. The mp3 extractor takes advantage of this now.

Change-Id: Icb77ae3ee95a69c7da25b4d3b8696c0a2d33028a
related-to-bug: 2948754
tagefright/DataSource.h
97344f1d8e8e95fd07d5deee2ae2492a7e4c24b0 24-Aug-2010 Eric Laurent <elaurent@google.com> Added preset reverb.

Modified lvm reverb wrapper code to expose a preset reverb interface.
Also removed debug log from bundle and reverb wrapper.

Change-Id: If9b95d91e25a6ff834decdfdda34b17df9b46967
ffectPresetReverbApi.h
a8c88e810ea1b8e90fd6c250d4c0a87eb628d4d8 24-Aug-2010 James Dong <jdong@google.com> am 28a92120: am 3f51fa78: Runtime dump support for MediaWriter

Merge commit '28a92120a702289533a9c9d004bd60f83b2fd98b'

* commit '28a92120a702289533a9c9d004bd60f83b2fd98b':
Runtime dump support for MediaWriter
ef6c8c0324be75dfac3d6a4025ec3b3a7ca23826 24-Aug-2010 Chia-chi Yeh <chiachi@android.com> am a102871c: am b80e610b: Merge "Visualizer: replace the FFT implementation with a faster one." into gingerbread

Merge commit 'a102871c7cbb74ebddc53231a871145de61351b0'

* commit 'a102871c7cbb74ebddc53231a871145de61351b0':
Visualizer: replace the FFT implementation with a faster one.
4b79168835965cf0fc41ebe2a367e22b4cb20d08 11-Aug-2010 Jamie Gennis <jgennis@google.com> Change the framework to use the new camera preview path.

This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.

Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
MediaRecorder.h
ediaRecorderBase.h
VMediaRecorder.h
f143cc1866737c2ac24f4b2d7e4b2e776be10d56 23-Aug-2010 Andreas Huber <andih@google.com> Merge "Squashed commit of the following:"
5daeb129a2c2ba3d14ccd94af283b5f561c783ea 16-Aug-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 35cc68814a9537c31fde146e171e7b0bbdfe211e
Author: Andreas Huber <andih@google.com>
Date: Mon Aug 16 08:48:42 2010 -0700

Only enable support for yuv to yuv conversion on passion, where it's available, use the slower yuv->rgb565 path everywhere else.

commit d8ac5a8814103e60d11d2acf61997fc31a1dc58d
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 13 13:56:44 2010 -0700

The software renderer takes over all rendering, converting from yuv to yuv if possible and rgb565 otherwise.

commit 684972074b74318bdcb826ed9b5b0864d2d2e273
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 13 09:34:35 2010 -0700

A first shot at supporting the new rendering APIs.

Change-Id: Iea9b32856da46950501f1a700f616b5feac710fd
MediaPlayer.h
ediaPlayerInterface.h
VPlayer.h
dedf414d3fe2e79ee0aad0f1c82ca16ebd886ff6 18-Aug-2010 James Dong <jdong@google.com> Runtime dump support for MediaWriter

Change-Id: I10b2c474de612ee4cef4b7c9eae2ee1dd8c2e895
tagefright/MPEG4Writer.h
tagefright/MediaWriter.h
482482401095d5fc98f89b4a3ce43d41c00fffd7 23-Aug-2010 Chia-chi Yeh <chiachi@android.com> Merge "Visualizer: replace the FFT implementation with a faster one." into gingerbread
263ebfd8a17266eedc84eb879edb6a6a3395f760 21-Aug-2010 James Dong <jdong@google.com> am c8d2fa70: am cbd038fe: Merge "Make MediaWriter stop and pause return errors if necessary" into gingerbread

Merge commit 'c8d2fa704abebdbf0bd8aac185216dc068950217'

* commit 'c8d2fa704abebdbf0bd8aac185216dc068950217':
Make MediaWriter stop and pause return errors if necessary
9b92412737095ab6a06f01a0c6daaebb79dffb55 21-Aug-2010 Andreas Huber <andih@google.com> am b29ebd39: am f0ad5484: Merge "In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data." into gingerbread

Merge commit 'b29ebd397e25a7176bcc1c81980f17b0190ebe7f'

* commit 'b29ebd397e25a7176bcc1c81980f17b0190ebe7f':
In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data.
a0ced19fa96f26a25de708588a34ebfd452f250e 20-Aug-2010 Nipun Kwatra <nkwatra@google.com> Merge "Added downsample()"
c0d936ddacc4f7d883f3bd1dd8099586836c820f 20-Aug-2010 Nipun Kwatra <nkwatra@google.com> Added downsample()

Added a downsample function which downsamples the source image
starting at an offset and skipping every few pixels. Currently
no low pass filtering is done, but it should be added later.

Change-Id: Iec34092c536bfc661a15521e6a1ef2ef3f815c61
tagefright/YUVCanvas.h
47c0e2355fb18f567471c1a76f1bbe2ebcb5a419 20-Aug-2010 Nipun Kwatra <nkwatra@google.com> Merge "const correctness, validPixel test."
4a6b74563ac0fe752fbdfd15f91772473f8a4711 20-Aug-2010 Nipun Kwatra <nkwatra@google.com> const correctness, validPixel test.

- made width(), height() const member functions.
- added validPixel() which returns true if pixel is in the allowed range.
- now testing validPixel in get/setPixelValue

Change-Id: I1dee5060bd4f8dcbdcd542ec4647ea328f0185c3
tagefright/YUVImage.h
e0b77ce97ef84c47ae408e92f2afb7509a5051b6 19-Aug-2010 James Dong <jdong@google.com> Merge "Make MediaWriter stop and pause return errors if necessary" into gingerbread
37187916a486504acaf83bea30147eb5fbf46ae5 19-Aug-2010 James Dong <jdong@google.com> Make MediaWriter stop and pause return errors if necessary

o Make the API consistent with SF framework, which the MediaSource
provides a return status for stop

o Also, helps to convey errors that occurred right when a
premature stop() is called, leading to a potentially
mal-formed output file.

Change-Id: I52a932345f38570fdf8ea04d67d73dd94ccd30ef
tagefright/AMRWriter.h
tagefright/MPEG4Writer.h
tagefright/MediaWriter.h
85f12e9b9062402d6110df3f7099707912040edb 19-Aug-2010 Andreas Huber <andih@google.com> In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data.

Change-Id: I98c4194593c7e6e24f6fc339c862245111800293
tagefright/foundation/ABitReader.h
dbd2b7e4ebfe7a586b1db4459cf6aa032a7f8719 19-Aug-2010 Chia-chi Yeh <chiachi@android.com> Visualizer: replace the FFT implementation with a faster one.

This implementation uses fixed points instead of floating points. It
is slightly inaccurate compared to the old one but still perfect for
visualization purpose. It runs 40% faster on passion, 5 times faster
on sholes, and of course 14 times faster on sapphire.

Change-Id: I1e868417bcffda091becf106a7b941d02813faec
isualizer.h
790f640ac3b573efd574d346d1bb338d9724ed48 17-Aug-2010 James Dong <jdong@google.com> am 4fc2c928: am b7208196: Use audio clock as the reference media clock

Merge commit '4fc2c9280c5262c835a4eb78961241de105313c1'

* commit '4fc2c9280c5262c835a4eb78961241de105313c1':
Use audio clock as the reference media clock
e259531ce59ab1f31de5a23124b22536f6a5a767 03-Aug-2010 James Dong <jdong@google.com> Use audio clock as the reference media clock

o Only do this for realtime applications
o Adjust other track clock based on audio clock
o Assume other track uses wall clock as the media clock
o Use some heuristics to reduce the size of stts box by 2/3.

- also
o Remove one unused key from MetaData.h

Change-Id: Ib9432842627b61795b533508158c25258a527332
tagefright/MPEG4Writer.h
tagefright/MetaData.h
ee6d226931477dc9c2c9e49aae5f2470f7181c61 12-Aug-2010 James Dong <jdong@google.com> am 8aa244ea: am 45cb3cfa: Merge "Handle large audio lost" into gingerbread

Merge commit '8aa244eab7ba834439cc919fd1f83d1e4ef49aff'

* commit '8aa244eab7ba834439cc919fd1f83d1e4ef49aff':
Handle large audio lost
47204e1806da9f849464d0cef936851d7e561607 11-Aug-2010 James Dong <jdong@google.com> Handle large audio lost

Change-Id: I2687ad855aac758946954d0b3fe7aff9f7b5ae7c
tagefright/AudioSource.h
0cde1a77ce02df9f0ab08d836b491bf8e809bf35 10-Aug-2010 Andreas Huber <andih@google.com> am e14923b0: am 4edf85ab: Merge "Support for extracting G.711 a-law and mu-law audio from WAV files and a corresponding software decoder." into gingerbread

Merge commit 'e14923b0c80b2e73e69b7917c1f170b356592d29'

* commit 'e14923b0c80b2e73e69b7917c1f170b356592d29':
Support for extracting G.711 a-law and mu-law audio from WAV files and a corresponding software decoder.
42d66f25af9cb8089a93c6796876a6bc16e36cea 09-Aug-2010 Andreas Huber <andih@google.com> Support for extracting G.711 a-law and mu-law audio from WAV files and a corresponding software decoder.

Change-Id: I92685d09456c220b8c09842defb721bd55b0b9f6
related-to-bug: 2900021
tagefright/MediaDefs.h
250a4cf8127a9ba572bae90de1e44437e0b78a94 06-Aug-2010 James Dong <jdong@google.com> am 9c09a605: am 1441bdfc: Merge "Use the target color format from the camera source if possible" into gingerbread

Merge commit '9c09a60513faf39901bb8e4681d39812204b3f73'

* commit '9c09a60513faf39901bb8e4681d39812204b3f73':
Use the target color format from the camera source if possible
299766cdbf93fba14634e364b177b7f4d5811453 04-Aug-2010 James Dong <jdong@google.com> Use the target color format from the camera source if possible

- If the target color format is unavailable, the default
platform-dependent color format will be used.

- Also add some logic to prevent looping forever if the
omx component is buggy supporting color format enumeration.

Change-Id: I119a78f0d6201b4c3621235cca2f523ec14e24e3
tagefright/OMXCodec.h
982a93173bc84f005172152d823cbb59dfcbeb12 05-Aug-2010 Andreas Huber <andih@google.com> am 1f513d88: am c17f35dd: Merge "Support for Gtalk video, includes AMR/H.263 assembler and packetization support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation." into gingerbread

Merge commit '1f513d8821670a33d6361ea521b6756163a3f9bf'

* commit '1f513d8821670a33d6361ea521b6756163a3f9bf':
Support for Gtalk video, includes AMR/H.263 assembler and packetization support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation.
39ddf8e0f18766f7ba1e3246b774aa6ebd93eea8 04-Aug-2010 Andreas Huber <andih@google.com> Support for Gtalk video, includes AMR/H.263 assembler and packetization support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation.

Change-Id: I95b8dd487061add9bade15749e563b01cd99d9a6
ediarecorder.h
tagefright/MetaData.h
216e5df78e958a3349ba4785fb79c688e1ad39a5 04-Aug-2010 James Dong <jdong@google.com> am 246aad12: am 3d84280c: Merge "File writer has a designated writer thread now" into gingerbread

Merge commit '246aad12cf2becda5111d03fd1dd8f39712686f2'

* commit '246aad12cf2becda5111d03fd1dd8f39712686f2':
File writer has a designated writer thread now
a7c61b8be205ce8db81ebbd15cd42abd649cbf4d 04-Aug-2010 James Dong <jdong@google.com> am 51a260d8: am 23796e3b: Merge "Add lost frame handling in AudioSource" into gingerbread

Merge commit '51a260d8c6e9a5c6b6c2cf808554ae013c1a7bef'

* commit '51a260d8c6e9a5c6b6c2cf808554ae013c1a7bef':
Add lost frame handling in AudioSource
26ab7ab7f543a03b65735a41de8496c54d3e490e 03-Aug-2010 James Dong <jdong@google.com> Merge "File writer has a designated writer thread now" into gingerbread
a5740924c0a71871f2697139effd43b137750597 03-Aug-2010 James Dong <jdong@google.com> Merge "Add lost frame handling in AudioSource" into gingerbread
1c9747a4653aec1395c2bd6896c9b87cb5447837 31-Jul-2010 James Dong <jdong@google.com> File writer has a designated writer thread now

+ This reduces the file I/O block time for audio/video track processing
- Since the file writer is buffering some output samples, the memory
usage would go up, depending on how many output samples are buffered.

Change-Id: I780cc5b26f4b53a5efbd643fcf9505dfc19cd4cd
tagefright/MPEG4Writer.h
40e2f3f9b41f44bdb59f7708a421b87f169a6ede 31-Jul-2010 Nipun Kwatra <nkwatra@google.com> Implementing getSupportedPictureSizes

Go through all the supported picture sizes and choose the smallest one with
both dimensions higher than the passed in video width and height.

Change-Id: I4e9fe7a6384a0feeb9e069239ec68c70fb5f3033
tagefright/CameraSourceTimeLapse.h
46292fb347d72a314d985e34e5e3743d846cb9b6 30-Jul-2010 James Dong <jdong@google.com> Add lost frame handling in AudioSource

- Also collect stats on lost audio frames instead of time spent on reading

Change-Id: I6380b143e4fbdcd894491aaae523331e90d0f04f
tagefright/AudioSource.h
9da2070b6d6d20550de7da61478c325f0928d020 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 27eecb70 to gingerbread

Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
bc286dce1af6670824fba4167e0750b631168d72 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> am 0c51c98f: am 4506c62a: fix inaccurate copyrights

Merge commit '0c51c98fd9edf0bdc8f2c567470fc332b5ae3adf'

* commit '0c51c98fd9edf0bdc8f2c567470fc332b5ae3adf':
fix inaccurate copyrights
0319aaecb03aa83924ab4e3d9c9bc657c2e8bc06 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> am 4506c62a: fix inaccurate copyrights

Merge commit '4506c62abd5767d6d42a97e8e87793a1b3bcb625' into gingerbread-plus-aosp

* commit '4506c62abd5767d6d42a97e8e87793a1b3bcb625':
fix inaccurate copyrights
efe6039f71e9bac2138003b3287e94a7ab7e5c55 30-Jul-2010 The Android Open Source Project <initial-contribution@android.com> Merge branch 'froyo' of git://android.git.kernel.org/platform/frameworks/base into HEAD
68335fdd6e9c1d622384612605d6952503cb7fd0 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> fix inaccurate copyrights

Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
MediaRecorder.h
VMediaRecorder.h
01cff464978aa0f749f42650180b45ea56cb17de 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> fix inaccurate copyrights

Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
MediaRecorder.h
VMediaRecorder.h
c4e47d1e81c4e4403663cb911e98dbf3ada9942c 28-Jul-2010 Nipun Kwatra <nkwatra@google.com> Support for video size to be different from captured picture size.

Adding support to allow video size to be different than the supported
picture sizes. A picture size larger than the demanded video size is
chosen. Captured pictures are then cropped to the size of the desired
video size. Cropping is done from the the center portion of the picture.

Change-Id: I6bcbe16f94b6ecbcf28b7f46826a81b4b6b8cbc3
tagefright/CameraSourceTimeLapse.h
db205a1d75c1e9a7d0dbd8fa011335249ad6f4ac 28-Jul-2010 Nipun Kwatra <nkwatra@google.com> Adding YUVImage and YUVCanvas.

YUVImage is a container class to hold YUV data and provide
various utilities, e.g. to set/get pixel values for different
YUV formats, fast copying routines, etc.
Currently supported YUV420 Planar and YUV420 Semi Planar.

YUVCanvas holds a reference to a YUVImage on which it can do various
drawing operations.

Change-Id: I052a57b7fbc834efe1626914f76c04c091996cac
tagefright/YUVCanvas.h
tagefright/YUVImage.h
3cc219dfc67b866e10828f0c17641668d47c1cd8 20-Jul-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 4abf16bb04dc9695fedf4007a84f903074312ccd
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 20 09:21:17 2010 -0700

Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we'll still play it back correctly.

Change-Id: Icc790122744745e9a88099788d4818ca1e265a82
related-to-bug: 2826841

commit 09c74da63e6ad5cb5dafb70f62696d75d2978967
Author: James Dong <jdong@google.com>
Date: Sun Jul 18 17:57:01 2010 -0700

Fix MPEG4Extractor to extract sampling frequency correctly when SBR is enabled.

Change-Id: I883c81dad3ea465e71cb5590e89d763671a90ff8

commit f672bf2a782dc7d5fb6325d611a7fe17045dfe9a
Author: James Dong <jdong@google.com>
Date: Thu Jul 8 20:56:13 2010 -0700

Enable the support for decoding audio with AAC+ and eAAC+ features

bug - 282684

Change-Id: I73c8377af3cc4edd3ee7cea86dc3b1c369fbd78b

Change-Id: I012f1179e933b6d1345d2368f357576c722485f7
tagefright/AudioPlayer.h
ed0de3c123aaa86147993721d4794648a65aab75 28-Jul-2010 Eric Laurent <elaurent@google.com> am 6fa88882: am 62d83a0c: Merge "Audio effects: modified command() parameter types." into gingerbread

Merge commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf'

* commit '6fa8888254deb4961dc64c6ac03dc103c9cd8bcf':
Audio effects: modified command() parameter types.
25f4395b932fa9859a6e91ba77c5d20d009da64a 28-Jul-2010 Eric Laurent <elaurent@google.com> Audio effects: modified command() parameter types.

The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command()
function have been modified from int to uint32_t. This is more consistent with their role.

Change-Id: I84d289fc262d6753747910f06f485597dfee6591
udioEffect.h
ffectApi.h
Effect.h
EffectClient.h
9e77e155b05e419a34e0fd116ee50f0fc092e67a 27-Jul-2010 Eric Laurent <elaurent@google.com> resolved conflicts for merge of d306cc81 to master

Change-Id: Ib593b7719a837de12605e8c75904634843298ba1
23e1de74359f4bb1763aef0adfebe073122b032c 23-Jul-2010 Eric Laurent <elaurent@google.com> Audio Effects: added methods to effects java classes to store and load current effect settings in
a single call.

Addional changes:
- Fixed simulator build
- Use effect interface UUIDs from OpenSL ES includes when available
- Added cleanspec rules to remove now obsolete test effect libraries
- Fixed bug in AudioEffect JNI setParameter function.

Change-Id: Ic25ddb135e2cec5a68c181d727321f5ac7a1ab6b
ffectBassBoostApi.h
ffectEnvironmentalReverbApi.h
ffectEqualizerApi.h
ffectPresetReverbApi.h
ffectVirtualizerApi.h
ffectVisualizerApi.h
e4e0a6994d39c4a7cba09c5fff442b2dca1df8f8 21-Jul-2010 Nipun Kwatra <nkwatra@google.com> Allowing setting of time lapse parameters through MediaRecorder.java

added setTimeLapseParameters() to MediaRecorder.java and SetParameter support
in StagefrightRecorder to allow enabling time lapse and setting the corresponding
parameters.

Change-Id: I509040aa71f8d3fc37337b0894a81d9c0fd7a40a
tagefright/CameraSourceTimeLapse.h
55cb2b8319e6b36e88658de121c534e95cd240b4 23-Jul-2010 James Dong <jdong@google.com> am 9bc4dc11: am 53d4e0d5: Allows the authoring engine to skip frame.

Merge commit '9bc4dc114fce58606a81d65d4cb31348cc7c1bae'

* commit '9bc4dc114fce58606a81d65d4cb31348cc7c1bae':
Allows the authoring engine to skip frame.
542db5d438988360d491a5add1040a2df9aa90c9 21-Jul-2010 James Dong <jdong@google.com> Allows the authoring engine to skip frame.

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
tagefright/MediaSource.h
tagefright/OMXCodec.h
f661058d77d1484e5911d1962f8e1e8466240687 22-Jul-2010 Andreas Huber <andih@google.com> am b72d3180: am 81046c8c: Merge "Various changes to improve rtsp networking, reduce packet loss and adapt to ALooper API changes." into gingerbread

Merge commit 'b72d3180dc8d41d6269664bea808b04410bbe40f'

* commit 'b72d3180dc8d41d6269664bea808b04410bbe40f':
Various changes to improve rtsp networking, reduce packet loss and adapt to ALooper API changes.
348a8eab84f4bba76c04ca83b2f5418467aa1a48 22-Jul-2010 Andreas Huber <andih@google.com> Various changes to improve rtsp networking, reduce packet loss and adapt to ALooper API changes.

Change-Id: I110e19d5ce33e597add3ffbd3e3ff3815862396d
tagefright/foundation/ALooper.h
d3bc2528fca033f3d34969a095beec0bc3f79ffd 21-Jul-2010 Andreas Huber <andih@google.com> am 8a9a931f: am 8138e841: Merge "Support finer seek control on MediaSources." into gingerbread

Merge commit '8a9a931fff2d184f7cf77fdd8a425f682f006cfd'

* commit '8a9a931fff2d184f7cf77fdd8a425f682f006cfd':
Support finer seek control on MediaSources.
ef3f986ebeee48af0e8cbfa651260974bbd1ed4d 21-Jul-2010 Andreas Huber <andih@google.com> Merge "Support finer seek control on MediaSources." into gingerbread
71ff94cb52874e42dede3c6bc4b86757b72cf0b1 21-Jul-2010 Eric Laurent <elaurent@google.com> am 34161132: am 7070b365: Added support for auxiliary audio effects to AudioTrack and MediaPlayer.

Merge commit '34161132030254bac7dd64c9713832e2f961a061'

* commit '34161132030254bac7dd64c9713832e2f961a061':
Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
abd1f4f870925d6776dbe4b930b759a1ab6595ca 21-Jul-2010 Andreas Huber <andih@google.com> Support finer seek control on MediaSources.

related-to-bug: 2858448

Change-Id: Ifb4b13b990fd5889113e47e2c62249ac43391fa1
tagefright/MediaSource.h
tagefright/MetaData.h
tagefright/OMXCodec.h
2beeb50b1bba9e92f6cacfeca37fe9fa9d36ead1 16-Jul-2010 Eric Laurent <elaurent@google.com> Added support for auxiliary audio effects to AudioTrack and MediaPlayer.

Added methods to AudioTrack and MediaPlayer java classes to enable use of
auxiliary audio effects. The effect can be attached and detached by specifying its
ID and the send level controlled.

Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
udioTrack.h
MediaPlayer.h
ediaplayer.h
932e0a11d74d5e236ccef9ee314442385c3d4e9d 21-Jul-2010 James Dong <jdong@google.com> am 9049fe60: am d7514ec6: Merge "Progress status notification" into gingerbread

Merge commit '9049fe60c20640bd606741c8f45f3f781a1684f5'

* commit '9049fe60c20640bd606741c8f45f3f781a1684f5':
Progress status notification
3108231d90e8aa324923fd8864ca2477948c5d25 20-Jul-2010 James Dong <jdong@google.com> Merge "Progress status notification" into gingerbread
d403f73c6db493a067d529e932d699ce461ae1d8 20-Jul-2010 Nipun Kwatra <nkwatra@google.com> Merge "Restart preview after each takePicture is done."
8184a5734690b30f4de0f6b6c16daf1e089f67df 20-Jul-2010 Eric Laurent <elaurent@google.com> resolved conflicts for merge of dd206093 to master

Change-Id: I21dd2321a4839d034d49092baccbf40986f17dae
0aacf105eea098a0b47761a4a9a5c4d820611f2d 19-Jul-2010 Nipun Kwatra <nkwatra@google.com> Restart preview after each takePicture is done.

Preview is called when CAMERA_MSG_COMPRESSED_IMAGE is recieved by
dataCallback(). It needs to be started as a new thread so that the
callback can return, and the camera can know that takePicture() is
done.

Change-Id: I4d0febbc993aac43b37f9f4a824e9c7b8785f19e
tagefright/CameraSourceTimeLapse.h
24ecd378305a3bf6fde74c8773bca09d0fd06c58 20-Jul-2010 Eric Laurent <elaurent@google.com> Merge "Audio policy manager changes for audio effects" into gingerbread
385695764189477e963a749a5f107f6eaeb9c5f2 20-Jul-2010 Nipun Kwatra <nkwatra@google.com> Merge "Adding support for timelapse capture using still camera's takepicture. Also moving entire implementation into a new class CameraSourceTimeLapse which inherits from CameraSource."
fbfe57ba4403ad759a0ebd895914ff506a01b699 20-Jul-2010 Andreas Huber <andih@google.com> am ff45709f: am cc14a839: Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we\'ll still play it back correctly.

Merge commit 'ff45709fbd1f24de1cf75ce9ce9ac8694ff1abbe'

* commit 'ff45709fbd1f24de1cf75ce9ce9ac8694ff1abbe':
Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we'll still play it back correctly.
de070137f11d346fba77605bd76a44c040a618fc 13-Jul-2010 Eric Laurent <elaurent@google.com> Audio policy manager changes for audio effects

Added methods for audio effects management by audio policy manager.
- control of total CPU load and memory used by effect engines
- selection of output stream for global effects
- added audio session id in parameter list for startOutput() and stopOutput().
this is not used in default audio policy manager implementation.

Modifications of audio effect framework in AudioFlinger to allow moving and reconfiguring
effect engines from one output mixer thread to another when audio tracks in the same session
are moved or when requested by audio policy manager.
Also fixed mutex deadlock problem with effect chains locks.

Change-Id: Ida43484b06e9b890d6b9e53c13958d042720ebdb
udioSystem.h
AudioFlinger.h
AudioPolicyService.h
3c3ddfa39635a2d39f4ee7c966fb9403fe1ec9d8 20-Jul-2010 Andreas Huber <andih@google.com> Support a single format change at the beginning of audio playback. This way the AAC+ decoder may change its output format from what is originally encoded in the audio stream and we'll still play it back correctly.

Change-Id: Icc790122744745e9a88099788d4818ca1e265a82
related-to-bug: 2826841
tagefright/AudioPlayer.h
faed5cd124a54b8db3429f4c26b3220bbec4c8bb 16-Jul-2010 James Dong <jdong@google.com> Progress status notification

- Keep track of per-track progress

Change-Id: Ibd36f0e8c78581928c8aa2f5e23c5e7e0615c2cc
tagefright/MPEG4Writer.h
65e7e6facda89927cb26594b3b65ae81b3235ebc 12-Jul-2010 Nipun Kwatra <nkwatra@google.com> Adding support for timelapse capture using still camera's takepicture.
Also moving entire implementation into a new class CameraSourceTimeLapse
which inherits from CameraSource.

For timelapse capture using still camera, we start a thread which runs a
loop in which it calls Camera::takePicture() and then sleeps until the next
frame should be captured.
The function dataCallback() handles the callback from the camera with the
raw image data. This function copies the data and creates an artificial
timestamp corresponding to one frame time ahead of the last encoded frame's
time stamp. It then calls dataCallbackTimestamp() of the base class which
will think that it recieved the frame from a video camera and proceed as usual.

For moving the implementation to the subclass CameraSourceTimeLapse, added a
few virtual functions to CameraSource, which do the current thing for the base
class, but specialized things for CameraSourceTimeLapse.
E.g. startCameraRecording() in the base class just calls mCamera->startRecording(),
while in CameraSourceTimeLapse it may start a thread for the still camera case.

Change-Id: Ib787f24bd2e1f41681513f0257e1c4ca10a2b4de
tagefright/CameraSource.h
tagefright/CameraSourceTimeLapse.h
521bcb0ff5054e5be40f5194026da3463504ae3b 16-Jul-2010 Eric Laurent <elaurent@google.com> am f16b3f10: am b0374a0e: Merge "Several improvements in audio effects volume control." into gingerbread

Merge commit 'f16b3f104f60738447db60bcf2c44c7610e17199'

* commit 'f16b3f104f60738447db60bcf2c44c7610e17199':
Several improvements in audio effects volume control.
ada2ac8e09b6d3f2b3c3155a852ba0fffae1b592 16-Jul-2010 Eric Laurent <elaurent@google.com> Merge "Several improvements in audio effects volume control." into gingerbread
cab112421da6e8eac19ffddbbe3d76067cffee78 15-Jul-2010 Eric Laurent <elaurent@google.com> Several improvements in audio effects volume control.

- Fixed crash when deleting an effect chained before an effect having volume control
- Changed EFFECT_FLAG_VOLUME_CTRL to implicitely include EFFECT_FLAG_VOLUME_IND
(not need to set both in effect descriptor).
- Volume control changes from one effect to another if needed according to effect enable state
- EFFECT_CMD_SET_VOLUME is only sent when their is an actual change in volume

Change-Id: Ieebaf09157e2627366023569d95516646e03e26c
ffectApi.h
cbcc684555a8774b21ba04c09b2f5cee8c88453a 15-Jul-2010 James Dong <jdong@google.com> am b068b47c: am d6a85a21: Merge "Support user-supplied timescales for authoring" into gingerbread

Merge commit 'b068b47c6d0214256116a0c661740bddf7acc18c'

* commit 'b068b47c6d0214256116a0c661740bddf7acc18c':
Support user-supplied timescales for authoring
8f5f2fcee5c12d08df71d17017410c50951fc2e3 02-Jul-2010 James Dong <jdong@google.com> Support user-supplied timescales for authoring

- also, change all the real time unit to microseconds in MPEG4Writer

Change-Id: I260f512f2eb670ade7b8858a56335a5d639de756
tagefright/MPEG4Writer.h
tagefright/MetaData.h
8972e1a30cd9b57a238a2ef617ed340d8043eb44 14-Jul-2010 Jean-Michel Trivi <jmtrivi@google.com> am 5473434f: am 97eb728a: Use the OpenSL ES definition of SL_IID_EQUALIZER for the EQ effect UUID instead of defining it locally.

Merge commit '5473434f060d8c036a30a1992b036a2f70da265d'

* commit '5473434f060d8c036a30a1992b036a2f70da265d':
Use the OpenSL ES definition of SL_IID_EQUALIZER for the EQ
98fe12aba55e8b8bb14b23c4c3cdba9a99a9753c 09-Jul-2010 Jean-Michel Trivi <jmtrivi@google.com> Use the OpenSL ES definition of SL_IID_EQUALIZER for the EQ
effect UUID instead of defining it locally.

Change-Id: Id6018fef20d286899cf7503fec3521dcd56db7e0
ffectEqualizerApi.h
f84b289306fc5b2399c62c62507dc80b159ae952 13-Jul-2010 Eric Laurent <elaurent@google.com> am 66fa2b44: am 8e886be4: Merge "Modifications in audio effect engine state management." into gingerbread

Merge commit '66fa2b44cadf8694cc1b7e2aae1f8abaff4fc547'

* commit '66fa2b44cadf8694cc1b7e2aae1f8abaff4fc547':
Modifications in audio effect engine state management.
e44b1efb293f878d4af8e824a6b3d070167bf2d6 09-Jul-2010 Eric Laurent <elaurent@google.com> Modifications in audio effect engine state management.

- Separate the updating of effect engine state from the process call in EffectModule so that the state
of all effects in the same effect chain is updated simultaneusly before all process functions are called.
- Added a mechanism for the effect engine to continue being called for processing after receiving the disable
commands untils it considers that the framework can stop calling the process function without causing
a glitch or loosing some effect tail.
- Updated test reverb and equalizer to support this new feature

Change-Id: Icb56ae2c84c076d4dbad6cf733b1a62f823febe7
ffectApi.h
004a77836d1963847acd20ea684e2ffe48aa3f19 09-Jul-2010 James Dong <jdong@google.com> am 4f440632: am 929642ee: Add runtime dumpsys support for media recorder client

Merge commit '4f4406322dafd6e128b437edbc541327f0b38d04'

* commit '4f4406322dafd6e128b437edbc541327f0b38d04':
Add runtime dumpsys support for media recorder client
b914122eb9cb54bbeae4ec03bfebb194aecdccbd 08-Jul-2010 James Dong <jdong@google.com> Add runtime dumpsys support for media recorder client

Change-Id: I4c8a81720f3be2db54678a7e84fe12849255046b
ediaRecorderBase.h
VMediaRecorder.h
723a540125f48aaf8a00b0cc5ed98fbbc01e5f14 09-Jul-2010 Eric Laurent <elaurent@google.com> am b4b0f67a: am fd84f97a: Added JAVA classes to control bass boost, equalizer, reverberation and virtualizer Effects.

Merge commit 'b4b0f67a4743503a024b1dce758acf53d9fb86f7'

* commit 'b4b0f67a4743503a024b1dce758acf53d9fb86f7':
Added JAVA classes to control bass boost, equalizer, reverberation and virtualizer Effects.
cb28102ad3976339ec445afbcb4130f2991b38d7 09-Jul-2010 Eric Laurent <elaurent@google.com> Added JAVA classes to control bass boost, equalizer, reverberation and virtualizer Effects.

Defined the following JAVA classes on top of AudioEffect class to facilitate control
off built-in audio effects with APIs aligned with interfaces defined in OpenSL ES
specification:
- BastBoot.java
- Equalizer.java
- PresetReverb.java
- EnvironmentalReverb.java
- Virtualizer.java

Split reverb API header file in two, one for preset reverb and one for environmental reverb.
Some changes in test reverb to support preset reverb.

Change-Id: Ie0a5ba06002e63dfd6da22cace5568c1e0b76ea1
ffectBassBoostApi.h
ffectEnvironmentalReverbApi.h
ffectPresetReverbApi.h
ffectReverbApi.h
ffectVirtualizerApi.h
6506bd2be256cdebc69324714c5b26c767981046 08-Jul-2010 Eric Laurent <elaurent@google.com> am b91881fd: am dacabf97: Merge "Added Visualizer effect." into gingerbread

Merge commit 'b91881fdd1608cc922f105ec552b5505da1fecb9'

* commit 'b91881fdd1608cc922f105ec552b5505da1fecb9':
Added Visualizer effect.
6c5c25fae5aa68a52c6fa75649dd559a9ca98932 08-Jul-2010 Eric Laurent <elaurent@google.com> Merge "Added Visualizer effect." into gingerbread
bf21177ccede8f01c0da0bd53392a289a5a84462 08-Jul-2010 James Dong <jdong@google.com> am b3598832: am c4243342: Merge "Allow application to set two more encoding paramters: video profile and level" into gingerbread

Merge commit 'b35988329ac1a574898db9226039e37e352c57a8'

* commit 'b35988329ac1a574898db9226039e37e352c57a8':
Allow application to set two more encoding paramters: video profile and level
145bfe5eb3e08c9689c28f6bf3287a979438b04b 02-Jul-2010 James Dong <jdong@google.com> Allow application to set two more encoding paramters: video profile and level

Change-Id: I673e681cefe184d5c556c612c54600a24a2143e5
tagefright/MetaData.h
tagefright/OMXCodec.h
da7581b7b61b84f15e8d671c86fd117c322b009e 02-Jul-2010 Eric Laurent <elaurent@google.com> Added Visualizer effect.

The visualizer enables application to retrieve part of the currently playing audio for visualization purpose.
It is not an audio recording interface and only returns partial and low quality audio content as a waveform or
a frequency representation (FFT).

Removed temporary hack made in MediaPlayer for animated wall papers based on audio visualization (snoop() method.

This commit also includes a change in AudioEffect class:
- the enable()/disable() methods have been replaced bya more standard setEnabled() method.
- some fixes in javadoc

Change-Id: Id092a1340e9e38dae68646ade7be054e3a36980e
udioEffect.h
ffectVisualizerApi.h
MediaPlayerService.h
isualizer.h
ediaplayer.h
f1ca5833464c0f6859f2a38b6af02cbe527c3335 07-Jul-2010 Andreas Huber <andih@google.com> am f5b4e342: am 2e6aff8e: Merge "ALooperRoster no longer holds strong references to handlers and loopers." into gingerbread

Merge commit 'f5b4e342b581a6e219b49141861b353fb139d00b'

* commit 'f5b4e342b581a6e219b49141861b353fb139d00b':
ALooperRoster no longer holds strong references to handlers and loopers.
11cc270ac5fd522c9e6491a7933516a96da4f62e 07-Jul-2010 Andreas Huber <andih@google.com> ALooperRoster no longer holds strong references to handlers and loopers.

Change-Id: I038d69b0a34eda1bfc5216d92c837a5ddf4fb802
tagefright/foundation/ALooperRoster.h
2bd69f0df09cc67abdeeea2786e826914ee5ead0 07-Jul-2010 Andreas Huber <andih@google.com> am 877045aa: am 9406f626: Merge "An AHandler can now find its associated ALooper." into gingerbread

Merge commit '877045aa853aaf6e58ca3ac7bfa2bde9165b55ae'

* commit '877045aa853aaf6e58ca3ac7bfa2bde9165b55ae':
An AHandler can now find its associated ALooper.
3ecb233c9c121af3e68ece11705043b1dbef505b 07-Jul-2010 Andreas Huber <andih@google.com> Merge "An AHandler can now find its associated ALooper." into gingerbread
e2b20987c2652a984d10520ef3542d50d91119c5 03-Jul-2010 Andreas Huber <andih@google.com> An AHandler can now find its associated ALooper.

Change-Id: Ic7087b8dcbc0d9abda272df0cb01b04b006f82ad
tagefright/foundation/AHandler.h
tagefright/foundation/ALooperRoster.h
a041596d1c4c85a2face27ead436721f8435e53a 02-Jul-2010 Andreas Huber <andih@google.com> am c4be155a: am 2cfd8198: Merge "Add an option to ALooper::start that allows it to call back into java or not." into gingerbread

Merge commit 'c4be155a540695c42bcd6589604f86d300f4548f'

* commit 'c4be155a540695c42bcd6589604f86d300f4548f':
Add an option to ALooper::start that allows it to call back into java or not.
34bbea84b8374f5d0ebe72b0be4418ace984fac0 02-Jul-2010 Andreas Huber <andih@google.com> Merge "Add an option to ALooper::start that allows it to call back into java or not." into gingerbread
1ef2a2b04c1e2488694c511bc954604da21b12d0 02-Jul-2010 Andreas Huber <andih@google.com> am 9f8c490e: am 5460d126: Merge "Added AMessage::debugString() for debugging purposes." into gingerbread

Merge commit '9f8c490e05f86cca1d60d6b6f383a1a98d7985fb'

* commit '9f8c490e05f86cca1d60d6b6f383a1a98d7985fb':
Added AMessage::debugString() for debugging purposes.
42d7f83904b8a91ce33e87a44de109572679ac1f 02-Jul-2010 Andreas Huber <andih@google.com> Add an option to ALooper::start that allows it to call back into java or not.

Change-Id: Iec172901a04a575d8d350bd162565f04677c3f26
tagefright/foundation/ALooper.h
cbb56d14dad2785baf7a723b43aa6f1da32dc51f 02-Jul-2010 Andreas Huber <andih@google.com> Merge "Added AMessage::debugString() for debugging purposes." into gingerbread
bbc2b8289458cfde931b133bad0c9d1026674ee7 01-Jul-2010 Andreas Huber <andih@google.com> Added AMessage::debugString() for debugging purposes.

Change-Id: Id43ffd2c56d659dc29f37e277f8c7b38f11c1591
tagefright/foundation/AMessage.h
fc20aab463f527ab3b0664986f0381a86b375884 01-Jul-2010 Nipun Kwatra <nkwatra@google.com> Adding timelapse capture from videocamera.

Current implementation looks at the timestamps of all incoming frames in
CameraSource::dataCallbackTimestamp().
It drops all frames until enough time has elapsed to get the next time lapse frame.
When enough time has passed to capture the next time lapse frame, the frame is no longer dropped
and the timestamp of this frame is modified to be one frame time (1/framerate) ahead of the
last encoded frame's time stamp.

Change-Id: I82b9d5e96113dffa6901aac3b8a8ef999ffc1d0b
tagefright/CameraSource.h
19c9a1e2bb6ead5e1e895aea8be573fe0f8cc7bb 01-Jul-2010 Andreas Huber <andih@google.com> Support for writing the extracted data to an .mp4 file in the stagefright commandline tool.

Change-Id: I972324a8fc9757e6e8116b0270ec0882106f8733
tagefright/MediaWriter.h
3eaa4e92dbebb5b27cb89f329f31fac6fb6fe1f0 22-Jun-2010 Chih-Chung Chang <chihchung@google.com> Add multiple camera support for in MediaProfiles.

Change-Id: Ie89568a0f5f5fd08ede77e33f9a559215d6bed9a
ediaProfiles.h
1c8ed2e906576fd8d7fa03f577bdec518cbe13d7 30-Jun-2010 Andreas Huber <andih@google.com> Support for vanilla YUV420sp => RGB565 color conversion.

Change-Id: I22e5b554909e169eaf153d1f25b636f6f04a1871
tagefright/ColorConverter.h
d329e21495eda9dbc531fdd0c26c77f1593ac3f4 30-Jun-2010 James Dong <jdong@google.com> 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
tagefright/OMXCodec.h
37047fceba836f341d0108beed0991b0f8dfc543 26-Jun-2010 James Dong <jdong@google.com> 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
MediaRecorder.h
MediaRecorderClient.h
ediaRecorderBase.h
VMediaRecorder.h
ediarecorder.h
tagefright/MediaWriter.h
93d6b102a13afa23bfa80d74c399d93d542e6ad6 25-Jun-2010 James Dong <jdong@google.com> 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
ediarecorder.h
tagefright/MPEG4Writer.h
tagefright/MetaData.h
658bd258af206ebc662301979482ba4bfd88481a 25-Jun-2010 Eric Laurent <elaurent@google.com> Merge "Various fixes and improvements in audio effects implementation" into gingerbread
ffe9c25ce85e1af55d58ec025adc6367d70db7e8 24-Jun-2010 Eric Laurent <elaurent@google.com> 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
udioCommon.h
udioEffect.h
udioSystem.h
ffectApi.h
ffectFactoryApi.h
ffectsFactoryApi.h
AudioFlinger.h
2dec2b5be2056c6d9428897dc672185872d30d17 20-Jun-2010 James Dong <jdong@google.com> 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
tagefright/AMRWriter.h
tagefright/MPEG4Writer.h
tagefright/MediaWriter.h
tagefright/MetaData.h
d3d4e5069e1af0437c4f5a7b4ba344bda5b937af 25-Jun-2010 James Dong <jdong@google.com> Track maximum amplitude and fix getMaxAmplitude()

- only start to track the max amplitude after the first call to getMaxAmplitude()

Change-Id: I64d3d9ca0542202a8535a211425e8bccceca50fc
tagefright/AudioSource.h
7bf4fab9e5590d345b93b559f35b2fb0f6b17ca8 24-Jun-2010 Andreas Huber <andih@google.com> Merge "Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright." into gingerbread
608d77b1cf4fb9f63dc861e4e1fa3e80a732f626 24-Jun-2010 Andreas Huber <andih@google.com> Remove most stagefright property overrides, remove VorbisPlayer and VorbisMetadataRetriever as this functionality is now provided by stagefright.

Change-Id: Ieafe75a4550c273ad59b4518d7cd4c0fce0f7cce
related-to-bug: 2370115
ediaPlayerInterface.h
1acfe8649f8169caf2ff098c2dc2de880d9a3760 23-Jun-2010 James Dong <jdong@google.com> 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
tagefright/MPEG4Writer.h
dadd0d1e7d5fbb88fd3420438c590a0bb4c18af5 23-Jun-2010 Eric Laurent <elaurent@google.com> Merge "Added support for audio sessions in MediaPlayer and AudioTrack." into gingerbread
41b2d090b23889c56bf0a889a8c9c2fb934015e8 23-Jun-2010 Chia-chi Yeh <chiachi@android.com> Merge "media: add AudioRecord::getMinFrameCount()." into gingerbread
a514bdb58b5de4986679f72b7204b4764f7a2778 21-Jun-2010 Eric Laurent <elaurent@google.com> 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
MediaPlayerService.h
ediaplayer.h
15304d601cbf83be6519ca53e1a26b97d50d0192 22-Jun-2010 Chia-chi Yeh <chiachi@android.com> media: add AudioRecord::getMinFrameCount().

Change-Id: I952071ab10aa49aa96b727d157b68470d69fff3d
udioRecord.h
58ae9c530247668f8af36e30d228c716c226b3d4 22-Jun-2010 James Dong <jdong@google.com> 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
tagefright/MPEG4Writer.h
0cd1e0bf7a0db4dcc111ee0732cbe2ec6e02b5af 22-Jun-2010 James Dong <jdong@google.com> Merge "Audio/video sync during recording (second part)" into gingerbread
f60cafe0e6aad8f9ce54660fa88b651ae4e749e6 19-Jun-2010 James Dong <jdong@google.com> Audio/video sync during recording (second part)

Change-Id: Iba0b35f57fdeac7ee1da16899406bf4b957a2c8c
tagefright/AudioSource.h
tagefright/CameraSource.h
tagefright/MPEG4Writer.h
33005a932c60a0780fe9b7307d5988df3d9f6c26 16-Jun-2010 Chia-chi Yeh <chiachi@android.com> media: add AudioTrack::getMinFrameCount().

Change-Id: If15162583d1d16d89f59be0793106afe77417f35
udioTrack.h
1616fa4a567bae928dfd28ebf1ec45cd701f27f1 14-Jun-2010 Eric Laurent <elaurent@google.com> Merge "Issue 2667802: [Audio Effect Framework] AudioEffect base class and JNI." into kraken
a7d1a2dd776bf356c228785a94ba8e0ff6a2ec7f 10-Jun-2010 James Dong <jdong@google.com> Initial checkin for pause and resume control

Change-Id: Ibdcf7bea5fb66baa81878704ba4091dfcfe382ee
tagefright/AMRWriter.h
tagefright/MPEG4Writer.h
tagefright/MediaWriter.h
801a1186eb1d2ce195b15222701865932e08f3dc 09-Jun-2010 Eric Laurent <elaurent@google.com> Issue 2667802: [Audio Effect Framework] AudioEffect base class and JNI.

Added AudioEffect C++ class. AudioEffect is the base class for effect specific implementations,
OpenSL ES effect interfaces and audio effect JNI.

Added the AudioEffect JNI and AudioEffect JAVA class. AudioEffect is the base class
to implement more specific JAVA classes to control audio effects from JAVA applications.

Change-Id: If300a1b708f2e6605891261e67bfb4f8330a4624
udioEffect.h
0a5baa9b411fe086013d2a5e9126ed63fbad046c 10-Jun-2010 Andreas Huber <andih@google.com> Switch stagefright's approach to prefetching to the new model. The java MediaPlayer is now notified about rebuffering start/end via info messages.

Change-Id: If8185ba329ce8b6663b1ad39a4efb0ad3be81df2
ediaplayer.h
tagefright/CachingDataSource.h
tagefright/HTTPDataSource.h
61ea6c1bc242841663cb6f3601f89fd929882d0b 11-Jun-2010 Andreas Huber <andih@google.com> Merge "Initial check-in of new caching/prefetching data source implementation." into kraken
d35bd5fb4e09c2cd8608497c279cbb2ef9c3a029 10-Jun-2010 Andreas Huber <andih@google.com> Support "pausing" of MediaSources with the effect that they no longer pull on their upstream source until a subsequent read-with-seek.

Change-Id: Ie4153a10ab36c1135f5fcfb572958129d886bcc3
tagefright/MediaSource.h
tagefright/OMXCodec.h
5994b4798b01f3dd340577c9ea9657f09093a770 10-Jun-2010 Andreas Huber <andih@google.com> Initial check-in of new caching/prefetching data source implementation.

Change-Id: I97a6e3f03c69c9b1219f1f06bd109c0102f2c504
tagefright/foundation/AHandlerReflector.h
ddcc4a66d848deef6fb4689e64e30cd9bd2684fe 08-Jun-2010 James Dong <jdong@google.com> Remove some hard-coded encoding parameters

Change-Id: I7a8ccd5d57891a6a585c8da2ee53acb094955913
tagefright/MetaData.h
tagefright/OMXCodec.h
365a963142093a1cd8efdcea76b5f65096a5b115 04-Jun-2010 James Dong <jdong@google.com> Initial check-in for collecting stats from authoring engine at runtime

Change-Id: I93a9d8bd260efc5e7fc135b726e3f1307c6df794
tagefright/AudioSource.h
tagefright/CameraSource.h
d07139e2e817a9b3ae9c87ba4e1e8d65d3e549da 07-Jun-2010 James Dong <jdong@google.com> Second part of speeding up video recording frame rate

1. Avoid copying the input recording frames to the encoder via OMX interface
for TI video encoder
This is a missing change for part one which help reduces the CPU load.

2. Release output buffers as early as possible. This is a little bit helpful, but not critical.

TODO:
We should save the underlying pointers allocated by the OMX component before we replace them
and restore them before we call OMX_FreeBuffer()!

Change-Id: Ib3a88978f4c3b1153808872eaa7ac4c265a811ff
tagefright/OMXCodec.h
cda17c606b0fe3ccda4dc68a6d43882410ea2462 07-Jun-2010 Andreas Huber <andih@google.com> Initial checkin of mpeg2 transport stream parser for stagefright.

Change-Id: I328ce77404daf7127933b48c9d58ed504fb8fc6f
tagefright/MediaDefs.h
c46e8b9fdce32bafb0b84cdb16affbdd35c2e3ba 07-Jun-2010 Andreas Huber <andih@google.com> Merge "Initial checkin of "foundation" library for future stagefright development." into kraken
72961230a5890071bcca436eb5630172ce84ec41 07-Jun-2010 Andreas Huber <andih@google.com> Initial checkin of "foundation" library for future stagefright development.

Change-Id: I11714dcaa647d0437a13e4c5b953b35e712da8f3
tagefright/foundation/AAtomizer.h
tagefright/foundation/ABase.h
tagefright/foundation/ABuffer.h
tagefright/foundation/ADebug.h
tagefright/foundation/AHandler.h
tagefright/foundation/ALooper.h
tagefright/foundation/ALooperRoster.h
tagefright/foundation/AMessage.h
tagefright/foundation/AString.h
tagefright/foundation/base64.h
tagefright/foundation/hexdump.h
c00d6f3ffc0eace26954e1863568820bd21794c0 07-Jun-2010 James Dong <jdong@google.com> Merge "Remove hard-coded pixel format for recording frames in CameraSource. Retrieve the pixel format from Camera HAL at runtime." into kraken
653252be963c07c99109d20f942d1f30c52a9360 03-Jun-2010 James Dong <jdong@google.com> Remove hard-coded pixel format for recording frames in CameraSource.
Retrieve the pixel format from Camera HAL at runtime.

Change-Id: I63f820f54c59c2019dfd195320b9928da3362536
tagefright/CameraSource.h
be916aa1267e2e6b1c148f51d11bcbbc79cb864c 02-Jun-2010 Eric Laurent <elaurent@google.com> Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack modifications.

First drop of audio framework modifications for audio effects support.

- AudioTrack/AudioRecord:
Added support for auxiliary effects in AudioTrack
Added support for audio sessions
Fixed left right channel inversion in setVolume()

- IAudioFlinger:
Added interface methods for effect enumeraiton and instantiation
Added support for audio sessions.

- IAudioTrack:
Added method to attach auxiliary effect.

- AudioFlinger
Created new classes to control effect engines in effect library and manage effect connections to tracks or
output mix:
EffectModule: wrapper object controlling the effect engine implementation in the effect library. There
is one EffectModule per instance of an effect in a given audio session
EffectChain: group of effects associated to one audio session. There is one EffectChain per audio session.
EffectChain for session 0 is for output mix effects, other chains are attached to audio tracks
with same session ID. Each chain contains a variable number of EffectModules
EffectHandle: implements the IEffect interface. There is one EffectHandle object for each application
controlling (or using) an effect module. THe EffectModule maintians a list of EffectHandles.

Added support for effect modules and effect chains creation in PlaybackThread.
modified mixer thread loop to allow track volume control by effect modules and call effect processing.

-AudioMixer
Each track now specifies its output buffer used by mixer for accumulation
Modified mixer process functions to process tracks by groups of tracks with same buffer
Modified track process functions to support accumulation to auxiliary channel

Change-Id: I26d5f7c9e070a89bdd383e1a659f8b7ca150379c
udioRecord.h
udioSystem.h
udioTrack.h
ffectApi.h
ffectFactoryApi.h
AudioFlinger.h
AudioTrack.h
7278cf32f1aa6a322f6dff1f8b7dacf7b6dddba6 28-May-2010 James Dong <jdong@google.com> Avoid copying for input recording frames in CameraSource

This is the part one.

- Let CameraSource be a MediaBufferObserver. It releases the recording frame when the ref count of a MediaBuffer containing
the recording frame drops to 0.

This reduces the CPU load from 90+% down to 50-60%.

Part two is related to the avoidance of copying the input video frames to the video encoder.
However, we are not able to use OMX_UseBuffer directly. Still work on the second part.

Change-Id: I906f1d054ae8bdcf82e1617f1fc120152f2eb2eb
tagefright/CameraSource.h
5b39604a55f1624ced347da7b790c4206d2d999f 27-May-2010 James Dong <jdong@google.com> Merge "Avoid repeatedly allocating and freeing memory in CameraSource" into kraken
cbe48a0678729eb863b259b4744e6ad12faf0475 20-May-2010 James Dong <jdong@google.com> Avoid repeatedly allocating and freeing memory in CameraSource

Change-Id: Ia3760820da0559e4e908dedae1f1df05f9a6a242
tagefright/CameraSource.h
d71a1be83ff31cdb6599c351f9832cefc8d447ba 21-May-2010 Eric Laurent <elaurent@google.com> Fix issue 2667797: [Audio Effect Framework] new base class and binder interfaces for effect control.

Added IEffect and IEffectClient binder interfaces to exchange effect module control
and status information between application and media server processes.

Change-Id: I10e8e894898e52ed9956a765d0ef7075eb2593af
Effect.h
EffectClient.h
9bca89d50d0c51d8e3f3e74d610b7d9a2dc98ed3 25-May-2010 Eric Laurent <elaurent@google.com> Merge "Fix issue 2667796: [Audio Effect Framework] Effect factory and libraries." into kraken
135ad07e33d30e5202deb21061a0e3ecf0ffad35 21-May-2010 Eric Laurent <elaurent@google.com> Fix issue 2667796: [Audio Effect Framework] Effect factory and libraries.

First effect factory and effect library API implementation.
Also added default effect libraries for reverb and equalizer effects.
These libraries are for functional test only and are not fine tuned with
regard to audio quality. They will probably be replaced by other implementations
before the release.

Change-Id: I6868f8612146ae282c64052765c61a52ec789ec8
udioCommon.h
udioSystem.h
ffectApi.h
ffectEqualizerApi.h
ffectFactoryApi.h
ffectReverbApi.h
093437c388e5dff6903a3d43f2ca9f8a1ba4744a 20-May-2010 Andreas Huber <andih@google.com> Support for media extraction from .mkv/.mka Matroska files in stagefright.

Change-Id: I4c26579828ad575523ccf58b0b5cb144046c04ca
related-to-bug: 2483739
tagefright/MediaDefs.h
956c553ab0ce72f8074ad0fda2ffd66a0305700c 15-May-2010 James Dong <jdong@google.com> Initial software encoder checkins

Change-Id: I27f387db23594e46384c4eb3a0093ce220bb6b60
tagefright/AudioSource.h
tagefright/OMXCodec.h
d1b449aad6c087a69f5ec66b7facb2845b73f1cb 14-May-2010 Eric Laurent <elaurent@google.com> Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock.

The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface.
When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns.
This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output.
The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240).

The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened
instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread.
To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks
by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack)
and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed.

AudioFlinger modifications:
- invalidate the tracks when setStreamOutput() is called
- make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process.
This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process.
Previously their were sent when the corresponding thread loop was executed.

AudioTrack modifications:
- move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created.
- detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack.

AudioTrackShared modifications
- group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space.

Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee
udioTrack.h
f0ce2fb0c7bf3a414279e5aba61105f3d9025c0e 14-May-2010 James Dong <jdong@google.com> Detect and handle premature termination of a recording session

Change-Id: Ifb83b19f3e68580345b23efed5d5956fb81baeb8
ediarecorder.h
3c0131f02b6f008321608044c53bccce2ac5f6dd 13-May-2010 James Dong <jdong@google.com> Audio/video initial recording time synchronization

Change-Id: Iac58b63d474fe09c1d36ba6ecde91dafbb7fef9a
tagefright/MPEG4Writer.h
d599cd4573b5a2d5914c5040e0565ef866749b77 11-May-2010 James Dong <jdong@google.com> Handle recording file size and/or duration limit

Change-Id: Ib9ed1f3ebd8fef550cc130a7ef11f2905fa9aedc
tagefright/AMRWriter.h
tagefright/MPEG4Writer.h
tagefright/MediaWriter.h
65ae665befd929efd1a7d1c9addac41c699f04b2 13-May-2010 James Dong <jdong@google.com> Remove dummy surface in CameraSource

bug - 2680919

Change-Id: Ia0308cf57fd67058b4dd0e042b3ce97f13df475f
tagefright/CameraSource.h
8229dabcc36a015a6cf11a9b0b2e948ac0476552 12-May-2010 Andreas Huber <andih@google.com> am b003ad17: am e0dc80f8: Merge "Support for customizable socket-read timeouts through the HTTP response." into froyo

Merge commit 'b003ad17bffeba7875b9708ffeef2300ef28c916' into kraken

* commit 'b003ad17bffeba7875b9708ffeef2300ef28c916':
Support for customizable socket-read timeouts through the HTTP response.
ba7c35717116e4dcb8242644f6ccf07c25c7b251 11-May-2010 Andreas Huber <andih@google.com> Support for customizable socket-read timeouts through the HTTP response.

Specify a response header of "X-SocketTimeout: 15" to override the default timeout
of 5 secs with a timeout of 15 seconds. Specify a negative value to disable the
timeout altogether.

Change-Id: I545adf3d8b3f7efe5f8d081a641c6404440a77db
related-to-bug: 2675721
tagefright/HTTPDataSource.h
7837c17063a4c50bc856ba59418516fdab731de7 07-May-2010 James Dong <jdong@google.com> Output streamable MP4 file during MP4 file recording

When the reserved moov box space is not big enough,
fall back to non-streamable MP4 file.

Change-Id: I93382d037d657a3f3fe2af31e4ea26e1898b4d95
tagefright/MPEG4Writer.h
b1ccb623d9db42c451aa9dd4e8cf0e76b164aa50 10-May-2010 Andreas Huber <andih@google.com> am 17078510: am d13efb20: Merge "A new OggExtractor/VorbisDecoder combo to support approximate seeking." into froyo

Merge commit '1707851090e6512a77247b0c260dd673ef687589' into kraken

* commit '1707851090e6512a77247b0c260dd673ef687589':
A new OggExtractor/VorbisDecoder combo to support approximate seeking.
ee7ff20e69498ebd53dd9717a0f984188341a75e 07-May-2010 Andreas Huber <andih@google.com> A new OggExtractor/VorbisDecoder combo to support approximate seeking.

Change-Id: Id5d0c1c8b1adc62896bb5ed951f7b5cfda811e95
related-to-bug: 2654400
tagefright/MediaDefs.h
tagefright/MetaData.h
tagefright/Utils.h
d8a30349da270715156d3f658b165481ce10cf71 06-May-2010 Andreas Huber <andih@google.com> am 71bd9fc8: am 100ef9be: Merge "Disable vorbis seek when streaming from localhost." into froyo

Merge commit '71bd9fc81e3154b9cad22ca7ff2d9c6ed6fdbe6c' into kraken

* commit '71bd9fc81e3154b9cad22ca7ff2d9c6ed6fdbe6c':
Disable vorbis seek when streaming from localhost.
acdd9d0f59c3d8bdc3de80664a609527ec3d21e2 06-May-2010 Andreas Huber <andih@google.com> Disable vorbis seek when streaming from localhost.

Change-Id: Icda523ae1c89e26482f1c1767fe3a8b9222bb30f
related-to-bug: 2654400
tagefright/DataSource.h
tagefright/HTTPDataSource.h
tagefright/MediaExtractor.h
13aec890216948b0c364f8f92792129d0335f506 22-Apr-2010 James Dong <jdong@google.com> Support audio and video track interleaving in the recorded mp4 file

Change-Id: Ifa27eb23ee265f84fe06773b29b0eb2b0b075b60
tagefright/CameraSource.h
tagefright/MPEG4Writer.h
3830a4f133893e6a77a967c84220d7baf9687f23 04-May-2010 Andreas Huber <andih@google.com> am 8ea45aad: am e083d0a2: Merge "Support for Ogg Vorbis decoding in stagefright." into froyo

Merge commit '8ea45aad100ee25067b2e83703454c71a968ba4f' into kraken

* commit '8ea45aad100ee25067b2e83703454c71a968ba4f':
Support for Ogg Vorbis decoding in stagefright.
3cf4e43cdd391502690c07e08e805aa8ff5db0c0 04-May-2010 Andreas Huber <andih@google.com> Support for Ogg Vorbis decoding in stagefright.

Set the magic property media.stagefright.enable-vorbis to true to use the new implementation instead of the standalon vorbis player for file-based playback. HTTP streaming of vorbis content will always go through stagefright.

Change-Id: Ie3843a99fadb22372f89540d0f8d65196e0c2af8
related-to-bug: 2654400
tagefright/MediaDefs.h
c32cd79d9ad4aba7d959b5b3be7361b4715e6f18 27-Apr-2010 James Dong <jdong@google.com> Use timestamp from camera driver for CameraSource

Change-Id: I09ddec69997c43b8f17fdd21304c76cb4c5ab8cf
tagefright/CameraSource.h
88b1b1c7331023828108daa57fcea858c7706566 13-Apr-2010 Andreas Huber <andih@google.com> am 248ea4a9: am 5baa5e19: Merge "Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don\'t have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks." into froyo

Merge commit '248ea4a9f773210a7b7dbd7892e6b865a0f7add3' into kraken

* commit '248ea4a9f773210a7b7dbd7892e6b865a0f7add3':
Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don't have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks.
81f82c32459029bf0744e28c73f95a7f18cab5ac 13-Apr-2010 Andreas Huber <andih@google.com> Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don't have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks.

Change-Id: Ic9a9198413431db4ea40bb63b9de91aa8a7183af
related-to-bug: 2587341
tagefright/MediaDefs.h
ebe87f32e442c9a8fb2931632311d6c5a126eddb 23-Mar-2010 Andreas Huber <andih@google.com> Remove unnecessary lock from AMRWriter.

Change-Id: Ia02966d936dd8cbb31e92051578a3fa816885710
tagefright/AMRWriter.h
1ab1e4ec459ab549f79a98693a67f241861450be 08-Apr-2010 Andreas Huber <andih@google.com> Refactor connection/redirection code, support redirects on reconnection.

Change-Id: Id2517568000e028b01553c06a4893813a6883168
related-to-bug: 2580785
tagefright/HTTPDataSource.h
d8c76856c6d52dcd11a90124dafef0af99956e15 08-Apr-2010 Andreas Huber <andih@google.com> Increase the size of the pages used in CachingDataSource (total amount of memory used remains the same) to compensate for reduced locality of audio/video data requests. Also fixes a mistaken trailing "\r\n" in the range header and better error handling on http connection.

Change-Id: Ic9a6ef204362bc9afdc61e081c76bc62e5ef92ad
related-to-bug: 2580785
tagefright/HTTPDataSource.h
7f498b90a4300ef9badf14d202b0a67c26e20931 02-Apr-2010 Andreas Huber <andih@google.com> Coalesce multiple encoded AAC frames into a single input buffer on this particular OMX codec to increase throughput significantly.

Change-Id: I90c7db6656a53339c5d454336548c4f00d0d9064
related-to-bug: 2548426
tagefright/OMXCodec.h
0b42f253d15a190e230df43a4b45a3c483e5869a 31-Mar-2010 James Dong <jdong@google.com> Public API changes for CameraProfile and CamcorderProfile classes

1. CamcorderProfile: “@see” links are broken; Remove m prefix from fields; remove “final”
2. CamcorderProfile.Quality: use an int rather than an enum
3. Add API on MediaRecorder to pass in a CamcorderProfile
4. CameraProfile.getImageEncodingQualityLevels @hide or make it consistent with CamcorderProfile
5. Remove a convenient method and instead let the (mms) app do that task

bug - 2553862

Change-Id: I759215c7892f772aeddf3651d17038489c6fbc50
ediaProfiles.h
0887d170c7dc57411855382e326dd471824c9c02 18-Mar-2010 Andreas Huber <andih@google.com> While streaming media data, upon a socket-read error, try reconnecting to the server and attempt to re-read for at most 3 times.

Change-Id: I7534905e07a6456d18b26d5d60fa8915f25ae99e
related-to-bug: 2492187
tagefright/HTTPDataSource.h
2a3847ee1cbdaa8a65eee397a0173bb02211c459 16-Mar-2010 Andreas Huber <andih@google.com> Properly handle errors during the codec configuration phase, attempt to revert to next available (likely software-) codec if configuration fails.

Change-Id: Id1c699711e30139c9cc29df972254b5ba026e6fb
related-to-bug: 2517098
tagefright/OMXCodec.h
93e1fb99a0c66784b49b105ce84a23baf054ee9c 13-Mar-2010 Andreas Huber <andih@google.com> Fix the media metadata retriever (tests). The native constants must match those published at the java layer.

Change-Id: Ic1efed709e4d93c61913b231a8cd3ef1074f8ca0
ediaMetadataRetrieverInterface.h
ediametadataretriever.h
e94bd14078d327ef2f800e69907efce641a13272 12-Mar-2010 Andreas Huber <andih@google.com> HTTPStream and HTTPDataSource now support cancellation of the connection process, AwesomePlayer takes advantage of this in cases where ::reset() or ::suspend() is called while in the preparation phase to bail out early. Also fixes in issue where the audio codec was not properly stopped if no audio player object ever took ownership.

Change-Id: I6d73defe6d276693853a469db267bb2668d07af5
related-to-bugs: 2475845,2414536
tagefright/HTTPDataSource.h
79b19b39acce9b1303f8cf1a11c6b7ef852dc5a8 11-Mar-2010 Andreas Huber <andih@google.com> Reduce buffer sizes related to HTTP media data transfer in order to reduce the probability of a connection timeout/reset due to long periods of time between socket activity.

Change-Id: I799ce1d58d56a31088a89603d8a18d24780f5b57
related-to-bug: 2492187
tagefright/HTTPDataSource.h
2e39c1ca101e01ff13b03129a87939e7982b25bf 10-Mar-2010 Andreas Huber <andih@google.com> Instead of instantiating StagefrightMetadataRetriever directly, instantiate a MediaMetadataRetriever which will do-the-right-thing(tm) even for .wma/.wmv/.asf files.

Change-Id: Ibda4b5268514934f14a3d49a564902bc670f4384
related-to-bug: 2074137
tagefright/StagefrightMediaScanner.h
e7e3b785a0e7819db4c895a4f60e9a4dd755880c 09-Mar-2010 Andreas Huber <andih@google.com> The audio track was accidentally not participating in the prefetch since it wasn't started at the time prepare() was called. Also, properly report the cached duration even near the end when the source has no more data to fetch.

Change-Id: I66a92fec24c9bfb25f1c186f1c877127bae2b4f9
related-to-bug: 2444425
tagefright/AudioPlayer.h
05bca2fde53bfe3063d2a0a877f2b6bfdd6052cf 26-Feb-2010 Eric Laurent <elaurent@google.com> Issue 2071329: audio track is shorter than video track for video capture on sholes

Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
udioRecord.h
udioSystem.h
AudioFlinger.h
dedec7365f6c4dfbfc69994a8756b4abb5031afa 26-Feb-2010 James Dong <jdong@google.com> Merge "Image encoding settings java API through xml configuration file"
f5a8385649204213dc19e1a64f4693931e048d85 24-Feb-2010 James Dong <jdong@google.com> Image encoding settings java API through xml configuration file

- I decided to completely remove jpeg decoding related stuff from this change
I think that setting is better off if it is specified by the system properties.
We don't have to include MediaProfiles.h header in skia files
ediaProfiles.h
5295c0c55d41a2906ea7f65a3f22e6278cb17d4b 23-Feb-2010 Andreas Huber <andih@google.com> Propagate errors all the way through the MediaSources and send either MEDIA_PLAYBACK_COMPLETE or MEDIA_ERROR depending on the final reason for running out of buffers to play back.

related-to-bug: 2463749
tagefright/AudioPlayer.h
tagefright/OMXCodec.h
86559de0275b46a9bdba06b749fbd549ad2022d1 22-Feb-2010 Andreas Huber <andih@google.com> This hardware video decoder lies about its required input buffer sizes allocating 2.7 MB of memory instead of the required 176 KB... Added another quirk.

related-to-bug: 2281327
tagefright/OMXCodec.h
4e92c7efc68b5d7635a32dbd283ab8558ad9bdd6 12-Feb-2010 Andreas Huber <andih@google.com> New API on java's MediaPlayer to suspend/resume a session.

related-to-bug: 2231576
MediaPlayer.h
ediaPlayerInterface.h
ediaplayer.h
328901bdc7c00ab361c5ef16d0d69c94a0458e95 11-Feb-2010 Marco Nelissen <marcone@google.com> Merge "Add support for "album artist" tag."
66ac4df65516ebfd0e500bfca75dc4b5ef8d674e 11-Feb-2010 Marco Nelissen <marcone@google.com> Add support for "album artist" tag.
ediametadataretriever.h
tagefright/MetaData.h
3cf613507f1e2f7bd932d921a6e222e426fd3be4 10-Feb-2010 Mathias Agopian <mathias@google.com> split libsurfaceflinger_client and libcamera_client out of libui
ediaPlayerInterface.h
ediaplayer.h
tagefright/HardwareAPI.h
7d5b8a70c28c0d5746a600467b2887822dbff88e 10-Feb-2010 Andreas Huber <andih@google.com> Implementation of stagefright-enabled MediaPlayerService::decode functionality

related-to-bug: 2359268
ediaPlayerInterface.h
tagefright/AudioPlayer.h
6c8a9a4132337a3419a72a735f0b40df0b82061f 08-Feb-2010 Marco Nelissen <marcone@google.com> Add support for the TPOS/TPA (disc number) id3 tag.
ediametadataretriever.h
tagefright/MetaData.h
13896b94336085d4e6ff555fa1a420312e8dea79 04-Feb-2010 James Dong <jdong@google.com> Camcorder profile Java API support
- Use Enum for Quality instead of int
- Use static values() method from Enum, rather than if-else

bug - 2417312
ediaProfiles.h
1862a33b246249630b654182afb5914da3480d4c 03-Feb-2010 Andreas Huber <andih@google.com> Fix a deadlock caused by the AudioPlayer notifying the observer that the stream had ended at the same time the observer was shutting down the AudioPlayer.

related-to-bug: 2414536
tagefright/AudioPlayer.h
de6bec4ec04e9b8e9f96bc44fc15e6d072f851a8 02-Feb-2010 Andreas Huber <andih@google.com> Don't use a HEAD request to determine redirects, instead do a regular GET (since that's always supported), also limit the number of redirects to avoid infinite redirects. Finally, properly handle the end of stream.

related-to-bug: 2403674
tagefright/HTTPDataSource.h
4cf04b1bf703522b37a60427ef02f2a18b218c19 02-Feb-2010 Andreas Huber <andih@google.com> Properly advertise the content length of the HTTP stream if available.

related-to-bug: 2312941
tagefright/CachingDataSource.h
tagefright/HTTPDataSource.h
a62aad3d3313f02a759ab2fcb92e160272badd5b 02-Feb-2010 James Dong <jdong@google.com> Merge "Initial check-in for xml-based encoder capabilities retrieval - Changed the Java API as suggested - Treat /etc/media_profiles.xml as the default xml configurtion file"
1d7491b19516505e0754c66a3c8cd61811c9b6a6 20-Jan-2010 James Dong <jdong@google.com> Initial check-in for xml-based encoder capabilities retrieval
- Changed the Java API as suggested
- Treat /etc/media_profiles.xml as the default xml configurtion file
ediaProfiles.h
78d529eb330ab6c04b5c694403f5a7e7de4b702f 01-Feb-2010 Andreas Huber <andih@google.com> The TI MP3 decoder lies about the number of channels it outputs, add a quirk for that.
tagefright/OMXCodec.h
88c030e0e0152791ff74f90249f55fce01371198 29-Jan-2010 Andreas Huber <andih@google.com> Properly forward errors returned by AudioTrack up to the player.

related-to-bug: 2300197
tagefright/AudioPlayer.h
5561ccf4a8db88a2e44eac1b3ed13b4ff53a7f20 28-Jan-2010 Andreas Huber <andih@google.com> Support the specification of additional HTTP headers in the creation of a DataSource.

related-to-bug: 2393577
tagefright/DataSource.h
tagefright/HTTPDataSource.h
tagefright/MediaExtractor.h
2db8455d8f4468a637109d31f319ce02d9d743ec 28-Jan-2010 Andreas Huber <andih@google.com> API Extension: Support for optionally specifying a map of extra request headers when specifying the uri of media data to be played.

related-to-bug: 2393577

Original change by Andrei Popescu <andreip@google.com>
MediaPlayerService.h
ediaPlayerInterface.h
VPlayer.h
ediaplayer.h
8566a635aa4bf6d2e908f0bc64d4fb8917025b58 28-Jan-2010 Andreas Huber <andih@google.com> Fix http streaming for shoutcast servers that do not support http ranges.

related-to-bug: 2295438
tagefright/HTTPDataSource.h
dd26833953e9e965df0421c854a3b86a1bb56715 27-Jan-2010 Eric Laurent <elaurent@google.com> Merge "Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync"
e9f8c544dbe0ac7ff88df18bfe9084c72e3ac1d5 27-Jan-2010 Andreas Huber <andih@google.com> Merge "Better support for HTTP streaming media content, fixes to the way HTTPDataSource streams the data, prefetcher implementation."
342e9cf388cceb807def720e40e8b0a217f4bcaa 20-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync

Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames
written by AudioFlinger to audio HAL and by DSP to DAC.

Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames
written by DSP to DAC.

Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player.

Removed excessive log in AudioHardwareGeneric.
udioSystem.h
AudioFlinger.h
ediaPlayerInterface.h
66b0a35c9a4136a84c3f73b1b25fcb5220138b95 27-Jan-2010 Andreas Huber <andih@google.com> Better support for HTTP streaming media content, fixes to the way HTTPDataSource streams the data, prefetcher implementation.

related-to-bug: 2295438
tagefright/CachingDataSource.h
tagefright/DataSource.h
tagefright/HTTPDataSource.h
2dce41ad26cb3e9e15c9e456a84bcf5309548ca0 26-Jan-2010 Andreas Huber <andih@google.com> Support for audio recording into AMR NB/WB files as well as audio tracks in MPEG4 files.

related-to-bug: 2295449
tagefright/AMRWriter.h
tagefright/MPEG4Writer.h
tagefright/MediaWriter.h
e7dc360f6fcb4d5348e72ba57e936254216ae399 26-Jan-2010 Eric Laurent <elaurent@google.com> Merge "Fix issue 2378022: AudioService should direct volume control to STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active."
e7c9cb48fec02697227bd847cd2e69432659adfd 25-Jan-2010 Andreas Huber <andih@google.com> Initial checkin of AudioSource and AMRWriter, a pair of classes supporting pure-audio recording in stagefright.

related-to-bug: 2295449
tagefright/AMRWriter.h
tagefright/AudioSource.h
b72a396826da8bd934b9531bbd40f86d7509e71c 25-Jan-2010 Eric Laurent <elaurent@google.com> Fix issue 2378022: AudioService should direct volume control to STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active.

Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream
type is playing.

Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
udioSystem.h
AudioFlinger.h
213addfaf4b359c69da4e9b4490c511d116845bb 25-Jan-2010 Andreas Huber <andih@google.com> The qcom OMX video decoders do not allocate output buffer memory at the time OMX_AllocateBuffer is called, wait until we received the first FILL_BUFFER_DONE notification until we rely on the buffer data ptr.
OMX.h
tagefright/OMXCodec.h
570a3cb7582daa030cb38eedc5eb6a06f86ecc7f 21-Jan-2010 Andreas Huber <andih@google.com> Fix no-copy-overhead OMXCodec implementation to actually work.
OMX.h
tagefright/OMXCodec.h
dcd7303ad62ae4be828edfa1b8d61b18b0fb1ec0 20-Jan-2010 Andreas Huber <andih@google.com> Merge "Support for 'iTunes-style' metadata in .mp4 and .3gp files."
0cdfa68cd07150b1f9f329ef0a76761b64ea1fdc 20-Jan-2010 Eric Laurent <elaurent@google.com> Merge "Create base class for audio policy manager."
72b8c5ae6a5f97a4fcfc6d23d33159d6ae50179c 20-Jan-2010 Andreas Huber <andih@google.com> Support for 'iTunes-style' metadata in .mp4 and .3gp files.

related-to-bug: 2368967
tagefright/MetaData.h
5cb4241cbeb409f2322bd527349c080a2cf454df 19-Jan-2010 Andreas Huber <andih@google.com> Merge "Avoid unnecessary buffer copying if at all possible, detect if running in the mediaserver process."
7eaa9c9385535b651064e02d05a8ffa4b2359281 16-Jan-2010 Andreas Huber <andih@google.com> Avoid unnecessary buffer copying if at all possible, detect if running in the mediaserver process.
OMX.h
tagefright/OMXCodec.h
dd172fce75b2a1c3cb3a5d3b3bbb5020b1ae8675 16-Jan-2010 James Dong <jdong@google.com> Media server death nodification
MediaDeathNotifier.h
ediaplayer.h
ediarecorder.h
7be6407f2ad7f2b0782d195d9f792072c084d6f5 13-Jan-2010 Andreas Huber <andih@google.com> Support for determining the mime type of media via metadata extraction.
ediametadataretriever.h
bd4bc59262df90dc85752684a1d4a92833a535a3 13-Jan-2010 Andreas Huber <andih@google.com> More metadata support.
tagefright/MetaData.h
492e666e47795326f4b12b87b150b550e6074bd8 10-Dec-2009 Eric Laurent <elaurent@google.com> Create base class for audio policy manager.

First implementations of audio policy manager in Eclair branch have shown that most code is common to all platforms.
Creating AudioPolicyManagerBase base class will improve code maintainability and readability.

Audio policy manager code for platforms using generic audio previously in AudioPolicyManagerGeneric is replaced by AudioPolicyManagerBase.
Audio policy manager test code previously in AudioPolicyManagerGeneric is moved to AudioPolicyManagerBase.

Also added a wake lock for delayed commands in AudioPolicyService.
udioSystem.h
fc9ba09e3bb368f823d473f5e2bb9aa32dba6289 12-Jan-2010 Andreas Huber <andih@google.com> Squashed commit of the following:

commit f81bb1dac5ef107bb0d7d5d756fb1ffa532ba2cc
Author: Andreas Huber <andih@google.com>
Date: Mon Jan 11 14:55:56 2010 -0800

Support for duration metadata, midi and ogg-vorbis files (in mediascanner)

commit 0b1385a0dc156ce27985a1ff757c4c142fd7ec39
Author: Andreas Huber <andih@google.com>
Date: Mon Jan 11 14:20:45 2010 -0800

Refactor meta data logic. Container specific metadata is now also returned by the MediaExtractor.

commit f9818dfac39c96e5fefe8c8295e60580692d5990
Author: Andreas Huber <andih@google.com>
Date: Fri Jan 8 14:26:09 2010 -0800

A first pass at supporting metadata through ID3 tags.

commit 476e9e253633336ab790f943e2d6c0cd8991d76a
Author: Andreas Huber <andih@google.com>
Date: Thu Jan 7 15:48:44 2010 -0800

Initial checkin of ID3 (V2.2 and V2.3) parser for use in stagefright.

related-to-bug: 2295456
tagefright/DataSource.h
tagefright/MediaExtractor.h
tagefright/MetaData.h
67e5a4f6f6879d512a859e5dba92e9beec7a2f91 08-Jan-2010 Andreas Huber <andih@google.com> Reorganize some of the stagefright implementation related to metadata.
tagefright/StagefrightMediaScanner.h
3e9549e47e2ccc0e37637854f673654750db289f 23-Dec-2009 Eric Laurent <elaurent@google.com> am f31f365a: am eb5ffc23: Merge change Id8e98194 into eclair

Merge commit 'f31f365a7708c931e955670bc6213fdc8f91a87a'

* commit 'f31f365a7708c931e955670bc6213fdc8f91a87a':
Fix issues 2333450 and 2333559:
368f5743636d24a6ff70a53b6c9073477cd60ede 23-Dec-2009 Eric Laurent <elaurent@google.com> am eb5ffc23: Merge change Id8e98194 into eclair

Merge commit 'eb5ffc239b6482b9c1e046f6f5872187043d852c' into eclair-plus-aosp

* commit 'eb5ffc239b6482b9c1e046f6f5872187043d852c':
Fix issues 2333450 and 2333559:
7ddd450f91dc508b26cc550f5b42fded8a731654 17-Dec-2009 Eric Laurent <elaurent@google.com> Fix issues 2333450 and 2333559:

Add new config values to AudioSystem::FOR_DOCK force usage to differenciate car and desk docks.
Use a receiver for the sticky Intent.ACTION_DOCK_EVENT in AudioService to detect the type
of dock and select force usage accordingly.
udioSystem.h
41760137878022ae1788d3893f8c1ce60ee54971 17-Dec-2009 Andreas Huber <andih@google.com> am 082e5171: Merge change I895fb7d7 into eclair-mr2

Merge commit '082e51712ab9c9ce94eaee88797bbdbc80b2004d' into eclair-mr2-plus-aosp

* commit '082e51712ab9c9ce94eaee88797bbdbc80b2004d':
Squashed commit of the following:
134ee6a324c35f39e3576172e4eae4c6de6eb9dc 16-Dec-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 144b1c40e9cf08a584c50e1bef7ba3f287e81a4f
Author: Andreas Huber <andih@google.com>
Date: Wed Dec 16 09:28:23 2009 -0800

This H264 file shows a certain problem even better.

commit 3245f1f3b7471975aeeb824a756c987abd610f55
Author: Andreas Huber <andih@google.com>
Date: Wed Dec 16 09:20:08 2009 -0800

Using only the QA testfiles now.

commit 074817eb3816c5dd70858a3594e3b92d799d873b
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 15 16:17:39 2009 -0800

Yay, roles are back again now that the API is in place.

commit 6d847e4932cc38301ae27cb7283b7f1553a95457
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 15 13:01:20 2009 -0800

Added commandline option for specifying the random seed for reproducable tests.

commit 62ab37b26336eaa67e49791c41c996acb6acee3f
Author: Andreas Huber <andih@google.com>
Date: Mon Dec 14 10:53:27 2009 -0800

When issuing a seek it is important that only the first MediaSource::read call has the seek option.

commit e77c46644b2fb6862bafa3569f7d304252074f1e
Author: Andreas Huber <andih@google.com>
Date: Mon Dec 7 16:39:07 2009 -0800

Make sure the tests are actually built, sp<OMXCodec> becomes sp<MediaSource>

commit 6df56915bd55a9445b3c6f953d3cc251d81579b8
Author: Andreas Huber <andih@google.com>
Date: Thu Dec 3 14:25:36 2009 -0800

Temporarily disable support for querying the roles of OMX components.

commit 31bb26930df9e3658dea684cedb4b0f1a06a4a88
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 1 13:36:52 2009 -0800

Disregard EOS events, slightly change the way the EOS flag on output buffers is handled.

commit 4c382fbc9aebee8197d5988d04378062809e7c48
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 1 09:37:24 2009 -0800

New random seek test for the codec tests. Fixed "sticky" end-of-output-buffers flag behaviour in OMXCodec.

commit c762eac3e44309592b61a168d66e091cf609fa03
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 3 14:13:43 2009 -0800

Fix a typo.

commit 50540a59b65c7d476b0193c7494cd75895e6ca6d
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 3 09:48:35 2009 -0800

Some more fine tuning of the unit tests, make MPEG4Extractor less verbose.

commit 1157a7e52a0636706caa235abe16d2ff8a0b8140
Author: Andreas Huber <andih@google.com>
Date: Wed Oct 28 12:01:01 2009 -0700

Changes to the IOMX::listNodes API, this now returns the component's roles as well, unit tests now test all components in all supported roles by default.

commit 30fbf2d8c6cb927689f7ba75eb550a81e9df488a
Author: Andreas Huber <andih@google.com>
Date: Mon Oct 26 09:45:26 2009 -0700

Initial check-in of unit tests for OMX components.
OMX.h
91da03b86ff9973af59ba4d64fee1fa89d9d0662 16-Dec-2009 Andreas Huber <andih@google.com> am d980e656: Merge change Ic7e91eee into eclair-mr2

Merge commit 'd980e656baa842592944c6fed371c9b37b2feea9' into eclair-mr2-plus-aosp

* commit 'd980e656baa842592944c6fed371c9b37b2feea9':
Add a new API to support determining the roles of an OMX component specified by name. Remove unneeded OMXSoftwareCodecsPlugin.
8ae1d0bdcef22f2bdd8d283e0e615f3ba6c3f4cd 16-Dec-2009 Andreas Huber <andih@google.com> Add a new API to support determining the roles of an OMX component specified by name. Remove unneeded OMXSoftwareCodecsPlugin.
tagefright/OMXPluginBase.h
4f26feda50cc4c51d90c93156afd03c380b9a42e 12-Dec-2009 Andreas Huber <andih@google.com> am 08945576: Merge change I9ac0777e into eclair-mr2

Merge commit '089455760c05289c1315268a6cb896577ceebc64' into eclair-mr2-plus-aosp

* commit '089455760c05289c1315268a6cb896577ceebc64':
Initial checkin of software AMR NB encoder based on PV source code.
b841f14f8e51f2365945281fbfa54ef6a1b1b5a6 12-Dec-2009 Andreas Huber <andih@google.com> Initial checkin of software AMR NB encoder based on PV source code.
tagefright/MetaData.h
5740d1a493af4409a8f6b51dd05037cc2f626976 11-Dec-2009 Jean-Michel Trivi <jmtrivi@google.com> am 6608bd0d: am 86ed86d2: Merge change I0f73439a into eclair

Merge commit '6608bd0d3af3f9c365b73f8b19d9ec0b7d5ee70b' into eclair-mr2-plus-aosp

* commit '6608bd0d3af3f9c365b73f8b19d9ec0b7d5ee70b':
Partially fix bug 2111240 Detect docking / undocking event by reporting
3869dcbacecc5575cdde7b337a39cbd14c1fd7cb 11-Dec-2009 Jean-Michel Trivi <jmtrivi@google.com> am 86ed86d2: Merge change I0f73439a into eclair

Merge commit '86ed86d2260932bdf2217b1d8431ac9e04d47534' into eclair-mr2

* commit '86ed86d2260932bdf2217b1d8431ac9e04d47534':
Partially fix bug 2111240 Detect docking / undocking event by reporting
3bf324bd45607c9e2c36cc95e2f9c01fd4af13df 09-Dec-2009 Jean-Michel Trivi <jmtrivi@google.com> am 86ed86d2: Merge change I0f73439a into eclair

Merge commit '86ed86d2260932bdf2217b1d8431ac9e04d47534' into eclair-plus-aosp

* commit '86ed86d2260932bdf2217b1d8431ac9e04d47534':
Partially fix bug 2111240 Detect docking / undocking event by reporting
48643f38c9e92dd0a3d4a31c293c954f3df4db1b 08-Dec-2009 Jean-Michel Trivi <jmtrivi@google.com> Partially fix bug 2111240 Detect docking / undocking event by reporting
to the AudioPolicyManager a new forced usage AudioSystem::FOR_DOCK
which can take the FORCE_NONE, FORCE_BT_DOCK or FORCE_WIRED_ACCESSORY
values. This CL is complemented by an update of the APM to take into
account the FOR_DOCK usage.
udioSystem.h
9ce05907d3a419ab70537892374306aa66bd1907 07-Dec-2009 Andreas Huber <andih@google.com> am 5921fb51: Merge change I91eb0354 into eclair-mr2

Merge commit '5921fb51e0219ddd7cad439a73495f320c57d50e' into eclair-mr2-plus-aosp

* commit '5921fb51e0219ddd7cad439a73495f320c57d50e':
Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway.
bf697e37550d9e8376089b0b5e498613bede798c 07-Dec-2009 Andreas Huber <andih@google.com> Change OMXCodec::Create to return an sp<MediaSource> instead of an sp<OMXCodec>, this is more general and does not sacrifice any functionality as the remaining OMXCodec APIs are not meant to be public anyway.
tagefright/OMXCodec.h
251949f53525e71659d4117446ba9fe72b3ea702 04-Dec-2009 Andreas Huber <andih@google.com> am 52f410e2: Merge change Ifef6435a into eclair-mr2

Merge commit '52f410e2ebba103220cffce05b895f0c38a56665' into eclair-mr2-plus-aosp

* commit '52f410e2ebba103220cffce05b895f0c38a56665':
Enable proper cleanup of OMX nodes managed through stagefright.
f0fb96c352f30b812a4903a1d783a715e1e817bd 04-Dec-2009 Andreas Huber <andih@google.com> Enable proper cleanup of OMX nodes managed through stagefright.
tagefright/OMXPluginBase.h
49096a039a16ea1cb2fc121c9de168be3f088e19 04-Dec-2009 Andreas Huber <andih@google.com> am 2d6d609c: Merge change I74bf38a0 into eclair-mr2

Merge commit '2d6d609c9ede7ed8924001df00af9c13effab8ad' into eclair-mr2-plus-aosp

* commit '2d6d609c9ede7ed8924001df00af9c13effab8ad':
Squashed commit of the following:
4e1e4bfb43d14d867345da7e0680c4636f40f63b 04-Dec-2009 Andreas Huber <andih@google.com> am bfb9fb14: Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore.

Merge commit 'bfb9fb143b67c2d0307af2bce9af3c08f362b29a' into eclair-mr2-plus-aosp

* commit 'bfb9fb143b67c2d0307af2bce9af3c08f362b29a':
Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore.
572e6a5cea656c1df50f69df9730f2dc351308de 03-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I74bf38a0 into eclair-mr2

* changes:
Squashed commit of the following:
413f523afe96aff02d2b0a7459127b8f67b2b43c 03-Dec-2009 Andreas Huber <andih@google.com> Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore.
ediascanner.h
e3ec3cec3a2e27033249ff82964d2cbd441d9873 03-Dec-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 543e192bf2ae13f573dc4c4e53b239ed4ea00e81
Author: Andreas Huber <andih@google.com>
Date: Thu Dec 3 11:33:57 2009 -0800

stagefright now acts as the OMX Master, vendors supply their own plugins through libstagefrighthw. In OpenCore-enabled builds we now sit on top of PVMaster...

commit 3cbfdbd9cecadbb77b63125c62883bf1065884fe
Author: Andreas Huber <andih@google.com>
Date: Wed Dec 2 12:39:07 2009 -0800

More OMX infrastructure, stagefright is now taking over the OMX Master, multiplexing all contributing OMX implementations under a common interface.
tagefright/HardwareAPI.h
tagefright/OMXPluginBase.h
baeb6dddd1b848320457b9af8c5eb415b43f181a 02-Dec-2009 Andreas Huber <andih@google.com> am 781ac162: Merge change I8768f2cc into eclair-mr2

Merge commit '781ac16283574ec07cd7b13d67b54b7b4c2c15cb' into eclair-mr2-plus-aosp

* commit '781ac16283574ec07cd7b13d67b54b7b4c2c15cb':
A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
c297fccffc4ab1cb3b9f5c6a5b0802be057f3e0f 02-Dec-2009 Andreas Huber <andih@google.com> A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
tagefright/OMXCodec.h
72b0e78480f38f24607e6ddb7a118cac6c4f1107 23-Nov-2009 Andreas Huber <andih@google.com> am bbd6cb46: Merge change Ib1b7bce4 into eclair-mr2

Merge commit 'bbd6cb463b405fc90912dee470fe6c7b8c6b1f54' into eclair-mr2-plus-aosp

* commit 'bbd6cb463b405fc90912dee470fe6c7b8c6b1f54':
Squashed commit of the following:
bfa6b2d7a1be1832ac40ed90aece1834f720b5c6 20-Nov-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 1efc38dc3c33fef57b759002db3965ed07a28cb0
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 19 14:36:14 2009 -0800

Sending the SEEK-COMPLETE notification temporarily broke seeking backwards in time behaviour. This is now fixed.

Also, get rid of the semi-random delay after posting buffers to surface flinger in favour of delaying the buffer release until the next frame is displayed.

commit 51973062eb5ee63fd64b845d72bac517cc3369cf
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 18 14:01:43 2009 -0800

Fix one more unit test, properly send seek-complete notification only after seek actually completed.

commit cb22250b34b1fcfe1bf459723a761fd003950229
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 18 12:31:36 2009 -0800

Fix seek-while-paused in AwesomePlayer, revert to using FileSource if MmapSource fails.

commit 25eb9241138ddf7bb27ce90657116c5f8a94d880
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 18 12:30:40 2009 -0800

Support seeking and duration in AMRExtractor, assuming all frames are the same size.

commit 44192f2ebb7ea3bbd3ba5910025692dbc6a08faa
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 18 10:21:44 2009 -0800

MediaPlayerImpl is dead, long live AwesomePlayer.

commit c5b52d3c0674f5dc94db506afbce52401cceddac
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 18 09:42:23 2009 -0800

New implementation of the stagefright mediaplayer.
ediaPlayerInterface.h
tagefright/AudioPlayer.h
tagefright/MediaPlayerImpl.h
tagefright/MmapSource.h
aadb854e0bc63547c0d4b4129330a49917a30f75 21-Nov-2009 Eric Laurent <elaurent@google.com> am 949c572a: am e7800946: Merge change I49f02be9 into eclair

Merge commit '949c572a16881aa40079a42bf7682637b23eb16a' into eclair-mr2-plus-aosp

* commit '949c572a16881aa40079a42bf7682637b23eb16a':
Issue 2265163: Audio still reported routed through earpiece on sholes
0478cd8b9468d54a32a6befd2654ebb9ae538b2d 21-Nov-2009 Eric Laurent <elaurent@google.com> am e7800946: Merge change I49f02be9 into eclair

Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-plus-aosp

* commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff':
Issue 2265163: Audio still reported routed through earpiece on sholes
bf89c099fc97717e3008a481aeddc76c1ac5e00d 21-Nov-2009 Eric Laurent <elaurent@google.com> am e7800946: Merge change I49f02be9 into eclair

Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-mr2

* commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff':
Issue 2265163: Audio still reported routed through earpiece on sholes
4ddf30b2b118068d82bb37858186d668eddbbe6d 21-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I49f02be9 into eclair

* changes:
Issue 2265163: Audio still reported routed through earpiece on sholes
6100d2d60517ff33ed8eb35d0b7ea63cde0831c9 19-Nov-2009 Eric Laurent <elaurent@google.com> Issue 2265163: Audio still reported routed through earpiece on sholes

This is a second attempt to fix the audio routed to earpiece syndrom.
The root cause identified this time is the crash of an application having an active AudioTrack playing on the VOICE_CALL stream type.
When this happens, the AudioTrack destructor is not called and the audio policy manager is not notified of the track stop.
Results a situation where the VOICE_CALL stream is considered as always in use by audio policy manager which makes that audio is routed to earpiece.

The fix consists in moving the track start/stop/close notification to audio policiy manager from AudioTrack to AudioFlinger Track objet.
The net result is that in the case of a client application crash, the AudioFlinger TrackHandle object (which implements the remote side of the IAudioTrack binder interface) destructor is called which in turn destroys the Track object and we can notify the audio policy manager of the track stop and removal.

The same modification is made for AudioRecord although no bug related to record has been reported yet.
Also fixed a potential problem if record stop is called while the record thread is exiting.
udioRecord.h
9da546f16810e8041046405ea4924f42ea5c1242 20-Nov-2009 Andreas Huber <andih@google.com> am f854e077: Merge change I8134d6ed into eclair

Merge commit 'f854e0770207e93ef9d1bf6d50ed18537a107ca4' into eclair-plus-aosp

* commit 'f854e0770207e93ef9d1bf6d50ed18537a107ca4':
DO NOT MERGE: Instead of inserting semi-random delays after submission to surface flinger, delay releasing buffers to the next display time to avoid flickering.
2f5925e123afdaba79c7ca8ef6647e4b86cd5488 19-Nov-2009 Andreas Huber <andih@google.com> DO NOT MERGE: Instead of inserting semi-random delays after submission to surface flinger, delay releasing buffers to the next display time to avoid flickering.
tagefright/MediaPlayerImpl.h
aae2af5870a165e121b3aeced2135061177c8550 17-Nov-2009 Andreas Huber <andih@google.com> am 2c766498: Merge change Iea6a38c6 into eclair-mr2

Merge commit '2c7664989f7388c0c6cf0ec7d80ffa2704c8c2be' into eclair-mr2-plus-aosp

* commit '2c7664989f7388c0c6cf0ec7d80ffa2704c8c2be':
Squashed commit of the following:
f78933fdfc5bc71881b3011f921b643d90387664 17-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Iea6a38c6 into eclair-mr2

* changes:
Squashed commit of the following:
8b8e0e6d5cc2a39eed0236ad6beba551e7052913 17-Nov-2009 Andreas Huber <andih@google.com> am 744043fc: Update FileSource to also accept a file descriptor and a range.

Merge commit '744043fcbf48c32c2051f222eca552fa2df5dfcb' into eclair-mr2-plus-aosp

* commit '744043fcbf48c32c2051f222eca552fa2df5dfcb':
Update FileSource to also accept a file descriptor and a range.
03475f5af25e4aa32d46d41dd2ec756853d8dd9d 17-Nov-2009 Andreas Huber <andih@google.com> Update FileSource to also accept a file descriptor and a range.
tagefright/FileSource.h
30ab66297501757d745b9ae10da61adcd891f497 17-Nov-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 333057b355f8c260c549553b9a0634755c838b6a
Author: Andreas Huber <andih@google.com>
Date: Fri Nov 13 15:35:48 2009 -0800

Some more tweaks to AVC encoding on sholes.

commit 9981d0ee52ec5b8b0182aae733d1571e3ebb8390
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 12 16:36:57 2009 -0800

Support for avc encoding, including sholes specific tweaks to pick the right colorspace for the camera to not require transcoding.

commit 5ba0ebbbd4efca51f3ae1f60e2ca31e7d2cf136d
Author: Andreas Huber <andih@google.com>
Date: Wed Nov 11 09:50:03 2009 -0800

Enable actual (camera) video-only recording using h.263 or mpeg4 encoding.

commit 3fd59c3526a37fe7c696f4a978925d1831c09313
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 10 14:57:48 2009 -0800

Allow switching between the PV recorder implementation and one supported by stagefright.

This is controlled through the property "media.stagefright.enable-record".
ediaRecorderBase.h
VMediaRecorder.h
tagefright/CameraSource.h
tagefright/MPEG4Writer.h
tagefright/MetaData.h
tagefright/OMXCodec.h
8574c3ca0460badebf0ba816920c071609a7d92f 13-Nov-2009 Eric Laurent <elaurent@google.com> am 609acfd2: am 1aa9f3ca: Merge change I923d7d72 into eclair

Merge commit '609acfd2a1067f49e51925776484b070a24d8301' into eclair-mr2-plus-aosp

* commit '609acfd2a1067f49e51925776484b070a24d8301':
Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
86b48a89a6cde62fc1db9140593386450bc0a9a1 13-Nov-2009 Eric Laurent <elaurent@google.com> am 1aa9f3ca: Merge change I923d7d72 into eclair

Merge commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54' into eclair-mr2

* commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54':
Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
baca60ad4131d31323401087f64df56dbd82d223 13-Nov-2009 Eric Laurent <elaurent@google.com> am 1aa9f3ca: Merge change I923d7d72 into eclair

Merge commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54' into eclair-plus-aosp

* commit '1aa9f3cac31a7c2b50fcb3c9259cead8d638ae54':
Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
1aaa563c2cb0df3f414aa0cfc13f9ae7b457dc49 13-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I923d7d72 into eclair

* changes:
Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
0f2d1e2dd7601e06fdf834f3f942eeb5c8b33a15 12-Nov-2009 Eric Laurent <elaurent@google.com> Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.

The headset state indicated by HeadsetObserver in the broadcast intent ACTION_HEADSET_PLUG was not 0 or 1 as specified in the java doc but contained a bit field indicating the type of headset connected.

Modified HeadsetObserver to broacast a state conforming to java doc.
Added an extra to intent ACTION_HEADSET_PLUG to indicate if headset has a microphone or not.
Removed handling of non standard headset indications from HeadsetObserver.
Removed platform specific devices from output devices defined in AudioSystem.
Modified AudioService to use new ACTION_HEADSET_PLUG intent extra instead of bitfield in state.
udioSystem.h
0ede5ad4737d952c177992bd7cbef80a06823c81 12-Nov-2009 Andreas Huber <andih@google.com> am d0f3228d: resolved conflicts for merge of c66d53f9 to eclair-mr2

Merge commit 'd0f3228daa9ea26ec959cb79451e6f150648bce8' into eclair-mr2-plus-aosp

* commit 'd0f3228daa9ea26ec959cb79451e6f150648bce8':
Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor.
53f45f0367d9563278f427db106736dcd1a433d1 12-Nov-2009 Andreas Huber <andih@google.com> resolved conflicts for merge of c66d53f9 to eclair-mr2
0f23df6c7f9a403a74d4654c84962e01ae8a24bd 12-Nov-2009 Andreas Huber <andih@google.com> am c66d53f9: Merge change I880541a8 into eclair

Merge commit 'c66d53f97b1fe635f576642d5720dcd441e34cce' into eclair-plus-aosp

* commit 'c66d53f97b1fe635f576642d5720dcd441e34cce':
Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor.
1dfc99f22fb9d8c798065938c24eeb4eb9691747 12-Nov-2009 Andreas Huber <andih@google.com> Delegate the platform dependent hardware renderer implementation to a shared library provided by the vendor.
tagefright/HardwareAPI.h
tagefright/QComHardwareRenderer.h
tagefright/TIHardwareRenderer.h
78819585beae56054d75a4c583e4b97129817001 05-Nov-2009 Andreas Huber <andih@google.com> am 05eca1d4: Merge change Ie80e2381 into eclair

Merge commit '05eca1d46a45723a57899dabad698537b7faef82' into eclair-plus-aosp

* commit '05eca1d46a45723a57899dabad698537b7faef82':
DO NOT MERGE: Squashed commit of the following:
5b65c7043dada0c89d3a941742666ac40ea35746 05-Nov-2009 Andreas Huber <andih@google.com> DO NOT MERGE: Squashed commit of the following:

commit 08259dd3dc9026887f9bbfedaf45866eb56ea9bc
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 12:02:31 2009 -0800

DO NOT MERGE: Use PV for metadata extraction even if stagefright is used for playback.

commit 991832fe4dc012e51d3d9ed8d647c7f09991858f
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:24:11 2009 -0800

DO NOT MERGE: Do not assert if we encounter OMX_StateInvalid. All bets are off though.

commit cec45cf302d9218fe79956cbe8a462d7ca3a10bb
Author: Andreas Huber <andih@google.com>
Date: Mon Oct 26 16:11:54 2009 -0700

DO NOT MERGE: When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.

commit 34a1e885ef9113d68acbc26d36fcc47fdebbed84
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:10:49 2009 -0800

DO NOT MERGE: Fix heap corruptin in OMXNodeInstance.

commit 5a47f7439a1298b330541a7e4e647a8b44487388
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:08:19 2009 -0800

DO NOT MERGE: Fix seek-on-initial-read behaviour of OMXCodec.

commit 45bed64722501b9f411a2940aff5aff4cc4d2e98
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:02:23 2009 -0800

DO NOT MERGE: Renaming string.h to stagefright_string.h to avoid conflicts.

commit 6738e306a50196f31a73d4fc7b7c45faff639903
Author: Andreas Huber <andih@google.com>
Date: Thu Oct 15 13:46:54 2009 -0700

DO NOT MERGE: Reimplement the OMX backend for stagefright.

Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.

Changed APIs to conform to the rest of the system.
MediaPlayerService.h
OMX.h
tagefright/HTTPStream.h
tagefright/stagefright_string.h
tagefright/string.h
0be134336190a7f1afb2101e2b2e445e50bba184 05-Nov-2009 Eric Laurent <elaurent@google.com> am fcae6c71: am 67b69292: Merge change I93f500a5 into eclair

Merge commit 'fcae6c71794696a074cabf20beeb02fd87853e30' into eclair-mr2-plus-aosp

* commit 'fcae6c71794696a074cabf20beeb02fd87853e30':
Fix issue 2203561: Sholes: audio playing out of earpiece.
3aea319ca5c6a3c1ab0fcdf6db8d9096c8f5287a 05-Nov-2009 Eric Laurent <elaurent@google.com> am 67b69292: Merge change I93f500a5 into eclair

Merge commit '67b692920c18f99b096dce285adc6f7439fa866c' into eclair-plus-aosp

* commit '67b692920c18f99b096dce285adc6f7439fa866c':
Fix issue 2203561: Sholes: audio playing out of earpiece.
1c02bfb63ea6e1d1630a09229044d64be200a9ef 05-Nov-2009 Eric Laurent <elaurent@google.com> am 67b69292: Merge change I93f500a5 into eclair

Merge commit '67b692920c18f99b096dce285adc6f7439fa866c' into eclair-mr2

* commit '67b692920c18f99b096dce285adc6f7439fa866c':
Fix issue 2203561: Sholes: audio playing out of earpiece.
dee7f8349ad8e93c5b16c24bed49fa9192790e0f 05-Nov-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I93f500a5 into eclair

* changes:
Fix issue 2203561: Sholes: audio playing out of earpiece.
34f1d8ecd23169a5f299937e3aaf1bd7937578a0 04-Nov-2009 Eric Laurent <elaurent@google.com> Fix issue 2203561: Sholes: audio playing out of earpiece.

Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error.
Do the same if start fails due to the same error after time out in obtainBuffer().
Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails.
This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash.

Same modifications for AudioRecord.

Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
udioRecord.h
udioTrack.h
oneGenerator.h
41020e23f0d4177889784afbada8adb036ba53d3 04-Nov-2009 Jean-Michel Trivi <jmtrivi@google.com> am 3d2d155a: am 7ed0ceeb: Merge change I6869df3a into eclair

Merge commit '3d2d155a87cdd3038a2e6df8741181431cb250e1' into eclair-mr2-plus-aosp

* commit '3d2d155a87cdd3038a2e6df8741181431cb250e1':
Add new audio sources to support the A1026 recording configurations.
3c3bfda1ddecf4c6e34a4b604f84940c7190f5d7 04-Nov-2009 Jean-Michel Trivi <jmtrivi@google.com> am 7ed0ceeb: Merge change I6869df3a into eclair

Merge commit '7ed0ceeba54712f76e9a4f2dd4c9197d76813488' into eclair-plus-aosp

* commit '7ed0ceeba54712f76e9a4f2dd4c9197d76813488':
Add new audio sources to support the A1026 recording configurations.
308d4aea9ccb62d3d9e3010a73b16435e554d5f2 04-Nov-2009 Jean-Michel Trivi <jmtrivi@google.com> am 7ed0ceeb: Merge change I6869df3a into eclair

Merge commit '7ed0ceeba54712f76e9a4f2dd4c9197d76813488' into eclair-mr2

* commit '7ed0ceeba54712f76e9a4f2dd4c9197d76813488':
Add new audio sources to support the A1026 recording configurations.
587e067a970fc23c707c448f508cc32e052a8380 04-Nov-2009 Andreas Huber <andih@google.com> am ad278f22: Merge change I6bce6d87 into eclair-mr2

Merge commit 'ad278f2276de23197571e486ad387dacc7f346ee' into eclair-mr2-plus-aosp

* commit 'ad278f2276de23197571e486ad387dacc7f346ee':
Adds a WAVExtractor for 16-bit signed PCM audio wave files.
d763b9513e520c7f0113077b4a2c62cee16e4266 04-Nov-2009 Jean-Michel Trivi <jmtrivi@google.com> Add new audio sources to support the A1026 recording configurations.
ediarecorder.h
0dba73763a04d39faf999dcc5ef12af3c99535a7 04-Nov-2009 Andreas Huber <andih@google.com> Adds a WAVExtractor for 16-bit signed PCM audio wave files.
tagefright/MediaDefs.h
e5688471975a132c9a6ba1414adf3e1d320c5200 02-Nov-2009 Eric Laurent <elaurent@google.com> am c69e7516: am ee98c240: Merge change I73680cd9 into eclair

Merge commit 'c69e7516482aae626eb550f5dd99f0f2f7a45909' into eclair-mr2-plus-aosp

* commit 'c69e7516482aae626eb550f5dd99f0f2f7a45909':
Fix 2194140: [Passion] Support Audience chip.
5dce5d8609857f803cb0eec7e2b1b55c158ce525 02-Nov-2009 Eric Laurent <elaurent@google.com> am ee98c240: Merge change I73680cd9 into eclair

Merge commit 'ee98c24020c1634b02cde6d333968f04a0de941f' into eclair-mr2

* commit 'ee98c24020c1634b02cde6d333968f04a0de941f':
Fix 2194140: [Passion] Support Audience chip.
9ff884b58a3947ee418619aaad8c62f4303c435a 02-Nov-2009 Eric Laurent <elaurent@google.com> am ee98c240: Merge change I73680cd9 into eclair

Merge commit 'ee98c24020c1634b02cde6d333968f04a0de941f' into eclair-plus-aosp

* commit 'ee98c24020c1634b02cde6d333968f04a0de941f':
Fix 2194140: [Passion] Support Audience chip.
90b75fbd19571784c8ceee4841a28b8333a8198e 02-Nov-2009 Eric Laurent <elaurent@google.com> Fix 2194140: [Passion] Support Audience chip.

Added new input device DEVICE_IN_BACK_MIC.
Added new audio source AUDIO_SOURCE_CAMCORDER.
udioSystem.h
ediarecorder.h
84d6db3b79893ce3c6bd30256702cf2d81a926ab 29-Oct-2009 Andreas Huber <andih@google.com> am 9dba1f92: Merge change Ib482ce88 into eclair-mr2

Merge commit '9dba1f928021450f101013e03deacc9a0506772e' into eclair-mr2-plus-aosp

* commit '9dba1f928021450f101013e03deacc9a0506772e':
Revive support for video encoding in OMXCodec.
888f72a4628eed3c136ff2e346a15d129da0d520 29-Oct-2009 Andreas Huber <andih@google.com> Revive support for video encoding in OMXCodec.
tagefright/OMXCodec.h
b1e3bc7933e29b668bcf5caf59bc46e848d6c875 28-Oct-2009 Andreas Huber <andih@google.com> am 76a54294: Merge change I155e2ad0 into eclair-mr2

Merge commit '76a5429407e821c22508eca92e7475b6433cd668' into eclair-mr2-plus-aosp

* commit '76a5429407e821c22508eca92e7475b6433cd668':
Re-enable CameraSource.
636df899721d7da23fc792f20df29937e628ab2f 28-Oct-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change I155e2ad0 into eclair-mr2

* changes:
Re-enable CameraSource.
be5c74f5da6a93b0d23f96e11848acfcc3b4d1d9 14-Oct-2009 Andreas Huber <andih@google.com> Re-enable CameraSource.
tagefright/CameraSource.h
dc97c041fbaf575806cb6758bb7aa506d5a2781d 24-Oct-2009 Eric Laurent <elaurent@google.com> am 7ed70c95: am bf96aaad: Merge change Icf10db28 into eclair

Merge commit '7ed70c9515fe3df6eb1796717d73f23e7286b3e6' into eclair-mr2-plus-aosp

* commit '7ed70c9515fe3df6eb1796717d73f23e7286b3e6':
Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
fe44b7a8b2b8da50a7a78f4b7e034b6d01785e44 24-Oct-2009 Eric Laurent <elaurent@google.com> am bf96aaad: Merge change Icf10db28 into eclair

Merge commit 'bf96aaadd46fb5b0884070177faa16ec4f22e2ba' into eclair-mr2

* commit 'bf96aaadd46fb5b0884070177faa16ec4f22e2ba':
Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
305893fbc10da99c3a98285ca5528ac34669f302 24-Oct-2009 Eric Laurent <elaurent@google.com> am bf96aaad: Merge change Icf10db28 into eclair

Merge commit 'bf96aaadd46fb5b0884070177faa16ec4f22e2ba' into eclair-plus-aosp

* commit 'bf96aaadd46fb5b0884070177faa16ec4f22e2ba':
Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
ae0d688c9631f8f9480aeeaa699518ab462f31cc 23-Oct-2009 Andreas Huber <andih@google.com> am d9f3d60d: Merge change I3b1b7873 into eclair-mr2

Merge commit 'd9f3d60df9317f15a7f26bc050f51b53b46898ff' into eclair-mr2-plus-aosp

* commit 'd9f3d60df9317f15a7f26bc050f51b53b46898ff':
New API to instantiate a MediaExtractor given a URI and optional MIME type.
34769bc913e9f6bb138e666d94a9d685bf3da217 23-Oct-2009 Andreas Huber <andih@google.com> New API to instantiate a MediaExtractor given a URI and optional MIME type.

Also DataSources now must provide a method initCheck()
and DataSource::reat_at has been renamed to readAt to conform to
standard API naming guidelines.
tagefright/CachingDataSource.h
tagefright/DataSource.h
tagefright/FileSource.h
tagefright/HTTPDataSource.h
tagefright/MediaExtractor.h
tagefright/MmapSource.h
tagefright/ShoutcastSource.h
0b8748b0efa667d9dc9aee15bfbbd42f3c386690 23-Oct-2009 Andreas Huber <andih@google.com> am 9069aa31: Merge change I57515f33 into eclair-mr2

Merge commit '9069aa31accee9c23a4cf228ca27fe8fa8506a56' into eclair-mr2-plus-aosp

* commit '9069aa31accee9c23a4cf228ca27fe8fa8506a56':
Moving the individual extractor headers files to the private include directory.
66326a5ee0869f1ee4d136a477e6effba428b3cb 23-Oct-2009 Andreas Huber <andih@google.com> Moving the individual extractor headers files to the private include directory.
tagefright/AMRExtractor.h
tagefright/MP3Extractor.h
tagefright/MPEG4Extractor.h
6f62eb2944cabeef61f9f791862d0117bb0e4910 23-Oct-2009 Andreas Huber <andih@google.com> am e8472900: Merge change Ie13526ad into eclair-mr2

Merge commit 'e84729002102622b40bd6efddffb76909615c12a' into eclair-mr2-plus-aosp

* commit 'e84729002102622b40bd6efddffb76909615c12a':
Prefer software decoders over hardware for thumbnail extraction.
ba229b3faa98b3bb6567cf95040062be2d9c2b3f 22-Oct-2009 Andreas Huber <andih@google.com> Prefer software decoders over hardware for thumbnail extraction.

While our hardware decoders clearly outperform the software decoders in terms
of raw throughput, their startup latency makes them less suitable for thumbnail
extraction.
tagefright/OMXCodec.h
12392bf8e1ed1b8f37d93ab58173d57e1d0a47b9 22-Oct-2009 Andreas Huber <andih@google.com> am e981c334: Extract video thumbnails from the largest sync sample among the first 20.

Merge commit 'e981c33446a98d5ccc0d73c1a840696d77cf0732' into eclair-mr2-plus-aosp

* commit 'e981c33446a98d5ccc0d73c1a840696d77cf0732':
Extract video thumbnails from the largest sync sample among the first 20.
7e04dcf8d6784dd56f53aa90bf34431ab4f0710c 22-Oct-2009 Andreas Huber <andih@google.com> Extract video thumbnails from the largest sync sample among the first 20.

Also fixes OMXCodec seek behaviour on the very first call to OMXCodec::read()
tagefright/AMRExtractor.h
tagefright/MP3Extractor.h
tagefright/MPEG4Extractor.h
tagefright/MediaExtractor.h
tagefright/MetaData.h
bd231fca95829b0ba0bbc463a48810794a408f35 22-Oct-2009 Andreas Huber <andih@google.com> am bfd5b386: Merge change If68c168d into eclair-mr2

Merge commit 'bfd5b38673212c47f0e386c0a8370d4ff47bd2fe' into eclair-mr2-plus-aosp

* commit 'bfd5b38673212c47f0e386c0a8370d4ff47bd2fe':
Some cleanup of OMXCodec code, make sure to ignore 0-length output buffers in the metadata retriever.
c6323f9d72e0f08dd1e813550a56c8d2f0fd76a2 21-Oct-2009 Andreas Huber <andih@google.com> Some cleanup of OMXCodec code, make sure to ignore 0-length output buffers in the metadata retriever.
tagefright/OMXCodec.h
f0ee6f4055e26fb35d9c526a596668a4dc9da5ba 21-Oct-2009 Eric Laurent <elaurent@google.com> Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.

Added setVoiceVolume() method to AudioSystem, AudioFlinger, IAudioFlinger, AudioPolicyService.
Removed call to AudioHardwareInterface::setVoiceVolume() from AudioFlinger::setStreamVolume().
udioSystem.h
AudioFlinger.h
7746714681832c648a863f77405be76933b49d3f 20-Oct-2009 Andreas Huber <andih@google.com> am ca404dfb: Merge change Ie3ffb526 into eclair

Merge commit 'ca404dfb920ab009cef4db5e74715b796f79b3f9' into eclair-plus-aosp

* commit 'ca404dfb920ab009cef4db5e74715b796f79b3f9':
do not merge: The qcom video decoders always output yuv data after adjusting dimensions to be a multiple of 16.
66d1e82ce5d5e189442285b6225977137b65c608 20-Oct-2009 Andreas Huber <andih@google.com> do not merge: The qcom video decoders always output yuv data after adjusting dimensions to be a multiple of 16.

Add a quirk mode to OMXCodec that makes it aware of this fact for proper display. Also integrate back a change from eclair-mr2 that delays releasing an output buffer briefly after posting it to surface flinger, as we don't know how long it'll take it to actually display the buffer's content.
tagefright/OMXCodec.h
2dd3d79885e9688d4d43e7b57133c83c3052cf04 16-Oct-2009 Andreas Huber <andih@google.com> am d96f6e85: Merge change I8176f35e into eclair-mr2

Merge commit 'd96f6e85931e3d4ac4a6dacbedc561e56c293b8d' into eclair-mr2-plus-aosp

* commit 'd96f6e85931e3d4ac4a6dacbedc561e56c293b8d':
Reimplement the OMX backend for stagefright.
318ad9c1d9d6515026dfc2c021359d27decaa7a1 15-Oct-2009 Andreas Huber <andih@google.com> Reimplement the OMX backend for stagefright.

Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.

Changed APIs to conform to the rest of the system.
MediaPlayerService.h
OMX.h
6442caf0e53566cf80308c4b938925145365e963 13-Oct-2009 Andreas Huber <andih@google.com> am c642199d: Merge change Ibd7b43bb into eclair-mr2

Merge commit 'c642199d1d60176980e2781bb78f42dce93e1c84' into eclair-mr2-plus-aosp

* commit 'c642199d1d60176980e2781bb78f42dce93e1c84':
Separated private from public header files.
07eb7ba44a1400df1f2917694478f53f4e919a70 13-Oct-2009 Andreas Huber <andih@google.com> am fe324a61: Merge change I8d87cd98 into eclair-mr2

Merge commit 'fe324a61c39d5db59f09fdae81c808d7851841e6' into eclair-mr2-plus-aosp

* commit 'fe324a61c39d5db59f09fdae81c808d7851841e6':
Fix various compiler warnings accumulated over time.
89e69da4d86348409994c9dafbbb2634ccd7c196 13-Oct-2009 Andreas Huber <andih@google.com> Separated private from public header files.
tagefright/ESDS.h
tagefright/HTTPDataSource.h
tagefright/HTTPStream.h
tagefright/QComHardwareRenderer.h
tagefright/SampleTable.h
tagefright/SoftwareRenderer.h
tagefright/TIHardwareRenderer.h
tagefright/TimedEventQueue.h
tagefright/string.h
549aa3741725ea2fd75c5fb717ff5a9316a5a55d 13-Oct-2009 Andreas Huber <andih@google.com> Fix various compiler warnings accumulated over time.
tagefright/SampleTable.h
3fc0367dc25e676c1609dd673426e9dd58596570 13-Oct-2009 Andreas Huber <andih@google.com> am cfd55579: OMXCodec now notifies the reader of changes in the output format by returning a special result/error code.

Merge commit 'cfd55579c2e20514b181809dfaf30bd6f7e04c7e' into eclair-mr2-plus-aosp

* commit 'cfd55579c2e20514b181809dfaf30bd6f7e04c7e':
OMXCodec now notifies the reader of changes in the output format by returning a special result/error code.
7f281f87670c63775ea1ae8b24af31822d5ad416 09-Oct-2009 Andreas Huber <andih@google.com> OMXCodec now notifies the reader of changes in the output format by returning a special result/error code.
tagefright/MediaErrors.h
tagefright/MediaSource.h
tagefright/OMXCodec.h
8308837da73e081471eb077326cdbe5342377ba2 13-Oct-2009 Andreas Huber <andih@google.com> am ef703f60: Merge change I98276091 into eclair-mr2

Merge commit 'ef703f60d5c00527048fdaf1c24984762f6fd434' into eclair-mr2-plus-aosp

* commit 'ef703f60d5c00527048fdaf1c24984762f6fd434':
Change to a int64_t usecs representation for timestamps and duration throughout stagefright.
48c948b1137e7bbdb161b51908657ab72ac5e2da 08-Oct-2009 Andreas Huber <andih@google.com> Change to a int64_t usecs representation for timestamps and duration throughout stagefright.
tagefright/MetaData.h
d3242febb70aca55c5df866300aa7ea03c39e82c 09-Oct-2009 Andreas Huber <andih@google.com> am 9b8f9477: Fixing the build.

Merge commit '9b8f947790aa1dabf9eb0621d0ac8f9d189116a2' into eclair-mr2-plus-aosp

* commit '9b8f947790aa1dabf9eb0621d0ac8f9d189116a2':
Fixing the build.
d3eaeefb1bac68bc1fee91b794be2c2c3bea6d94 09-Oct-2009 Andreas Huber <andih@google.com> Fixing the build.
tagefright/ColorConverter.h
d5b86bc5c3be14ad152f6d815282571f94f4635c 09-Oct-2009 Andreas Huber <andih@google.com> am 936fff36: Merge change Ib64cab41 into eclair-mr2

Merge commit '936fff36882764ec031ae4fb8338273cc2abccd5' into eclair-mr2-plus-aosp

* commit '936fff36882764ec031ae4fb8338273cc2abccd5':
Split the ColorConverter off SoftwareRenderer, metadata support in stagefright.
2a4a7d5af053a17586a262a1267ba993e31790f1 07-Oct-2009 Andreas Huber <andih@google.com> Split the ColorConverter off SoftwareRenderer, metadata support in stagefright.
tagefright/ColorConverter.h
tagefright/SoftwareRenderer.h
ce87db03ebff7d3bb18e4a25cf51bdc5f0b93677 08-Oct-2009 Andreas Huber <andih@google.com> am 2d295a96: Merge change Iedebfe8d into eclair-mr2

Merge commit '2d295a9601315a2610a2cb759ed9a4f787e7d4b5' into eclair-mr2-plus-aosp

* commit '2d295a9601315a2610a2cb759ed9a4f787e7d4b5':
Some decoders will return an error on OMX_EmptyThisBuffer to indicate that they don't support the media format, deal with this.
36efa039efaae4526791336cb688032d22b34bec 08-Oct-2009 Andreas Huber <andih@google.com> Some decoders will return an error on OMX_EmptyThisBuffer to indicate that they don't support the media format, deal with this.
OMX.h
f16d4c3e8b454f970515530b9bf87edc318bdaf0 08-Oct-2009 Andreas Huber <andih@google.com> am cd74c0d5: The vendor is about to check in a fix for this issue, the workaround is no longer needed

Merge commit 'cd74c0d56c0756ceb5cfa5f06d76e17aa2ed6fb9' into eclair-mr2-plus-aosp

* commit 'cd74c0d56c0756ceb5cfa5f06d76e17aa2ed6fb9':
The vendor is about to check in a fix for this issue, the workaround is no longer needed
9749025189acc6c737be22007e90ed8bbbcdbc21 08-Oct-2009 Andreas Huber <andih@google.com> The vendor is about to check in a fix for this issue, the workaround is no longer needed
tagefright/OMXCodec.h
34a76cd613ef30f70ab7e2f88cf98c630694a611 07-Oct-2009 Andreas Huber <andih@google.com> am f894d111: Merge change I6c32aa75 into eclair-mr2

Merge commit 'f894d111c8c1ad9038c2d434e1cd78616a6bda0a' into eclair-mr2-plus-aosp

* commit 'f894d111c8c1ad9038c2d434e1cd78616a6bda0a':
Workaround for avc decoder misreporting output buffer size requirements if the content is not a multiple-16 width/height.
ec430b158df17b2c766f7750a96c35d3902f5f49 07-Oct-2009 Andreas Huber <andih@google.com> Workaround for avc decoder misreporting output buffer size requirements if the content is not a multiple-16 width/height.
tagefright/OMXCodec.h
0df42e8b1cb99f3d73d8dd3d045125ef3fea2439 07-Oct-2009 Eric Laurent <elaurent@google.com> am 62443f5f: Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).

Merge commit '62443f5f4517ba17d911975e695f1ab75bfdbf77' into eclair-plus-aosp

* commit '62443f5f4517ba17d911975e695f1ab75bfdbf77':
Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).
a849526f3d2e99d49751bbed060185158a8ba7ea 07-Oct-2009 Marco Nelissen <marcone@google.com> am c39d2e3c: Music visualizer support hack. This currently assumes 44k stereo (won\'t crash on other formats, but won\'t give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.

Merge commit 'c39d2e3c012fb96999991e30659a474f9f30f789' into eclair-plus-aosp

* commit 'c39d2e3c012fb96999991e30659a474f9f30f789':
Music visualizer support hack.
eab618d39407454aefc267343a46faaf8c32d5ef 07-Oct-2009 Eric Laurent <elaurent@google.com> am 4e362817: am 62443f5f: Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).

Merge commit '4e362817ab49da3325531e1213e70ec6bbe32084' into eclair-mr2-plus-aosp

* commit '4e362817ab49da3325531e1213e70ec6bbe32084':
Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).
e33e00e931d1381d402484aa5cde67e540e3c82c 06-Oct-2009 Eric Laurent <elaurent@google.com> Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).

This change is a complement to the main fix in kernel driver for the same issue (partner change #1250).
It removes clicks sometimes heard after the end of the tones while audio flinger is sending 0s to the audio output stream.
The problem was that the sleep time between two writes was more than the duration of one audio output stream buffer which could cause some underrun.

Also fixed a recent regression in ToneGenerator that made that the end of previous tone was repeated at the beginning of current one under certain timing circumstances when the maximum tone duration was specified.
oneGenerator.h
9563e4284869dfb2d4c8d33bae313fcf7f755afb 06-Oct-2009 Marco Nelissen <marcone@google.com> am a97402e1: am c39d2e3c: Music visualizer support hack. This currently assumes 44k stereo (won\'t crash on other formats, but won\'t give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.

Merge commit 'a97402e1cbadbdc874afa9ffdbd23f1c62fb8177' into eclair-mr2-plus-aosp

* commit 'a97402e1cbadbdc874afa9ffdbd23f1c62fb8177':
Music visualizer support hack.
10dbb8e97e7a81ca4867663b5517f048820b3094 20-Sep-2009 Marco Nelissen <marcone@google.com> Music visualizer support hack.
This currently assumes 44k stereo (won't crash on other formats, but won't give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.
MediaPlayerService.h
ediaplayer.h
d931eef4e585a2f296c26e735be573889e9bc2ee 25-Sep-2009 Eric Laurent <elaurent@google.com> am e9bd4788: Merge change 26881 into eclair

Merge commit 'e9bd4788d4370714374d833aed1339d17c5ded09' into eclair-plus-aosp

* commit 'e9bd4788d4370714374d833aed1339d17c5ded09':
Fix issue 2142613: ToneGenerator: short tones sometimes don't play on sholes or over A2DP.
824b6a4a67166c3937400702944f659bd0d5d386 24-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2142613: ToneGenerator: short tones sometimes don't play on sholes or over A2DP.

When the AudioTrack callback notification size is relatively high (Which is the case on Sholes and over A2DP), it is likely that the end of tone is reached during the first callback. In this case, the AudioTrack is stopped before exiting the callback which causes 2 problems:
- 1: If the AudioFlinger thread is scheduled before we exit the ToneGenerator callback, the track can be stopped and reset before the data is actually marked as present in the buffer by the AudioTrack callback => no audio will be processed by AudioFlinger.
- 2: In this case, the data write index in the AudioTrack buffer is incremented after the track was reset by the AudioFlinger which leaves unplayed data in the buffer. This data will be played the next time the AudioTrack is started if not flushed in between.

The fix consists in adding an intermediate state to ToneGenerator state machine so that we exit the callback function when the stop condition is reached and stop the AudioTrack the next time we execute the callback.
oneGenerator.h
ee678acd88cbec07c08cd5a36bb98bb99a56371f 17-Sep-2009 Jean-Baptiste Queru <jbq@google.com> merge from open-source master
387eac4b282b9b403af772f92bcad469ae69177f 22-Jun-2009 Ravi K Yenduri <yenduri@pv.com> Update comment in mediaplayer.h.

When sending a MEDIA_INFO message, the second integer is supposed
to be an "info" code instead of an "error" code.
ediaplayer.h
4265a834394bfe14a008a2ac58fbbe388566ad07 16-Sep-2009 Andreas Huber <andih@google.com> Another software color conversion implementation, this time OMX_QCOM_COLOR_FormatYVU420SemiPlanar => rgb565.
tagefright/SoftwareRenderer.h
430209e4d4d767e96d1e59a705d1b8b6624cb1e8 15-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 25128 into eclair

* changes:
Support CbYCrY -> RGB565 color conversion in IOMXRenderer.
10f75b8c71beb7f327e50bbac8e528af4e40fa24 15-Sep-2009 Andreas Huber <andih@google.com> Support CbYCrY -> RGB565 color conversion in IOMXRenderer.
tagefright/SoftwareRenderer.h
1b84df1a0823fbcb9cec754311f53eaccfe85ae3 15-Sep-2009 Andreas Huber <andih@google.com> Added an API IOMX::createRendererFromJavaSurface.

This api allows to instantiate a renderer by specifying the hosting java Surface object. This hides the implementation details of (java-)Surface, (native-)Surface and friends.
OMX.h
777893a928680f09e306b4b9efc1d5cf4479a9da 11-Sep-2009 Andreas Huber <andih@google.com> Move JPEGSource.{cpp,h} into libstagefright.
tagefright/JPEGSource.h
18291bc20e55e8f3fd5feb786771a8ed32c19c59 10-Sep-2009 Andreas Huber <andih@google.com> Media MIME types now have corresponding constants in MediaDefs.h, new codec enumeration API.
tagefright/MediaDefs.h
tagefright/OMXCodec.h
25b130939339d57789a86fac837a2a8cedbcb7d8 10-Sep-2009 Andreas Huber <andih@google.com> Minor API change in MPEG4Writer, support for amr output into MPEG4 containers.
tagefright/MPEG4Writer.h
f75978f63a25e79c683e96611f95cb5cd49efd3d 09-Sep-2009 Andreas Huber <andih@google.com> Added a .amr file extractor (for AMR-NB and AMR-WB content).
tagefright/AMRExtractor.h
tagefright/MP3Extractor.h
03480f8ae9df41902b6523493fe19a2a513b8d98 09-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 24179 into eclair

* changes:
Support encoding amr-wb content in stagefright.
85fa14d35468acca07ce0085d67b909f673fae07 07-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 1992233: DTMF tones on Sholes is really long.

Add a parameter to ToneGenerator.startTone() allowing the caller to specify the tone duration. This is used by the phone application to have a precise control on the DTMF tone duration which was not possible with the use of delayed messaged.
Also modified AudioFlinger output threads so that 0s are written to the audio output stream when no more tracks are ready to mix instead of just sleeping. This avoids an issue where the end of a previous DTMF tone could stay in audio hardware buffers and be played just before the beginning of the next DTMF tone.
oneGenerator.h
456db75516efc889e1ee4e5e16021e77c03b0941 08-Sep-2009 Andreas Huber <andih@google.com> Support encoding amr-wb content in stagefright.
tagefright/OMXCodec.h
148c1a2a96774517407717b61e5bc9cb08be8806 06-Sep-2009 James Dong <jdong@google.com> Add basic metadata retrieval support for midi, ogg, etc.
Bug 2050320
ediaMetadataRetrieverInterface.h
ediametadataretriever.h
365928e6e1bec6637d10652cce65733557c3be29 03-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 23835 into eclair

* changes:
When encountering a .nomedia file, notify the MediaScannerClient, so that it can erase the data column for entries that are in the folder containing the .nomedia file. This prevents us from deleting (via a delete trigger) files when somebody adds a .nomedia file after the fact.
f482a41c86cf1c28acdd8e0f127b4a628b36535e 03-Sep-2009 Marco Nelissen <marcone@google.com> When encountering a .nomedia file, notify the MediaScannerClient,
so that it can erase the data column for entries that are in the
folder containing the .nomedia file. This prevents us from
deleting (via a delete trigger) files when somebody adds a
.nomedia file after the fact.
ediascanner.h
7a6b9e2eca7d20457ace3538c689640e5bfda4f3 03-Sep-2009 Andreas Huber <andih@google.com> Setting the component role appears to be mandatory now for all mime types.

Also using CODEC_LOGV instead of vanilla LOGV to include the component name the message related to.
tagefright/OMXCodec.h
e5adbeee3401915ff8e1a983396ce3554436b11c 02-Sep-2009 Andreas Huber <andih@google.com> Some work to make audio encoding work.
tagefright/MetaData.h
tagefright/OMXCodec.h
37940eefcba982836b579fe1ffec6cada72b0974 02-Sep-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit c45bfbb97ccd05982008df47181f9c73abaf0497
Author: Andreas Huber <andih@google.com>
Date: Tue Sep 1 15:58:12 2009 -0700

This quirk should not be enabled by default in order to make the bug reproducible by the vendor.

commit 21d72e80e795fcae53d9c3bcc8ba6312b081e420
Author: Andreas Huber <andih@google.com>
Date: Tue Sep 1 15:55:45 2009 -0700

Undoing the hack to temporarily give up the lock to facilitate reading from the buffer source.

This simply causes too many issues, there need to be independent threads providing input buffers and dequeuing output buffers.

commit 84d507def8999c146ce124cc8edfe106c9ca70c2
Author: Andreas Huber <andih@google.com>
Date: Tue Sep 1 15:16:23 2009 -0700

The AAC components appear to output stereo data even if the input data is mono...
tagefright/OMXCodec.h
e0f0b08aa692d15f3bfa19e10abfc84803c099b4 27-Aug-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 3fa5f3ce910f34da0cedb8bcce1bd593db7eb740
Author: Andreas Huber <andih@google.com>
Date: Thu Aug 27 14:48:54 2009 -0700

Getting rid of more code now obsolete with the departure of OMXDecoder.

commit e0d923ec0c7bb60bec8eb97739036a4c70c0feef
Author: Andreas Huber <andih@google.com>
Date: Thu Aug 27 14:33:06 2009 -0700

Remove obsoleted OMXDecoder class. OMXDecoder is dead, long live OMXCodec.
OMX.h
tagefright/OMXClient.h
tagefright/OMXDecoder.h
63d88ff95d9c1d5be1850f732c4dd05088abaeee 27-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 22897 into eclair

* changes:
Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
284f513a4ce2c5aa0e250c07c873731aedb0be26 27-Aug-2009 Andreas Huber <andih@google.com> An attempt to fix a deadlock between OMXCodec::start and upstream ::read
tagefright/OMXCodec.h
a9c322e398a1f5fdcace3b8b73967f010b1c31ca 27-Aug-2009 Eric Laurent <elaurent@google.com> Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.

Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
udioSystem.h
8297cedd12f689167d74de5ddacb514e9f6896ea 27-Aug-2009 Andreas Huber <andih@google.com> Another quirk, some OMX components fail to properly flush before shutdown and we must do it for them...
tagefright/OMXCodec.h
0c89199745bc1bf05b997fc7c342017807676b6f 26-Aug-2009 Andreas Huber <andih@google.com> assert => CHECK in stagefright.
tagefright/MediaDebug.h
ea7d15629752256f6ea1d5c6ea796e59aefd030f 26-Aug-2009 Andreas Huber <andih@google.com> Keep up with latest changes to overlay handling on that unnamable platform.
tagefright/OMXCodec.h
tagefright/TIHardwareRenderer.h
1beb760d920561679862ded945a04e370368c7f7 25-Aug-2009 Andreas Huber <andih@google.com> Make sure not to ask for more buffers when we know that there won't be any, added a quirk for the aac decoder.
tagefright/OMXCodec.h
ff5fffd65cb639db5bb7c62a4313c6d3dd777a72 21-Aug-2009 Android Code Review <code-review@android.com> Merge change 10274

* changes:
Ignore pause and seek for live streaming.
7530e9c708275c273c134c36c68179f511c1940e 20-Aug-2009 Andreas Huber <andih@google.com> Dynamically allocate a pair of MemoryHeaps according buffer count/sizes required by the OMX component, respect JPEG compressed size.
tagefright/MetaData.h
tagefright/OMXCodec.h
dbc03445db2bbf83b64f0c0a5dc62e61408864d7 19-Aug-2009 Andreas Huber <andih@google.com> The PV AVC software decoder expects each fragment of a NAL unit to be handed to the decoder unframed.
tagefright/MetaData.h
tagefright/OMXCodec.h
tagefright/OMXDecoder.h
2d7d46fb2d7f5f80afbf060f25ed049079fb0fc9 18-Aug-2009 Andreas Huber <andih@google.com> Refactored "stagefright" commandline app, split off JPEGSource.
tagefright/MediaBufferGroup.h
693d271e62a3726689ff68f4505ba49228eb94b2 14-Aug-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 5bb012f0065f7ffaaeb4f569d71f0e3a8d6b19c3
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 14 10:40:08 2009 -0700

An attempt at fixing export using the qcom encoders. More quirks.

commit 0690e76bfa48118a68287ccf1bbfa82febaa620c
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 14 09:08:28 2009 -0700

Callbacks are now dispatched from a separate thread in OMX.

commit c6571a039526df29b6343f9a1971dbc019088c61
Author: Andreas Huber <andih@google.com>
Date: Thu Aug 13 15:42:25 2009 -0700

Massive API changes throughout stagefright, smart pointers everywhere.

commit 900612af6a0555664d9ba195112cd859491265f4
Author: Andreas Huber <andih@google.com>
Date: Thu Aug 13 13:33:12 2009 -0700

OMXCodecs now properly shutdown.

commit 96732f05e1b0603dcd1b11f16a23512592eeb4f5
Author: Andreas Huber <andih@google.com>
Date: Thu Aug 13 12:04:04 2009 -0700

More work on JPEG decoding using the hardware OMX component.

commit 63839a073ac393e3a130434ba467969053b694ad
Author: Andreas Huber <andih@google.com>
Date: Wed Aug 12 13:13:31 2009 -0700

An attempt to drive the JPEG decoder OMX node.

commit 3ac2fe5ab2926eda81b2123610b2434c645294ff
Author: Andreas Huber <andih@google.com>
Date: Tue Aug 11 16:38:21 2009 -0700

Renamed StateMachine to OMXCodec and put it in its proper place.

commit 247da75a96bf8881956413023dd49a84d5b4f5b2
Author: Andreas Huber <andih@google.com>
Date: Tue Aug 11 16:06:19 2009 -0700

Statemachine is now a full-fledged MediaSource.

commit 045244f6771fa0b9b329495c953afda900a84b71
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 7 09:16:54 2009 -0700

Properly setup the input format when exporting to AMR audio.

commit 271b984cb32c5cd9e46e3f90ae121f334e4b8da9
Author: Andreas Huber <andih@google.com>
Date: Thu Aug 6 09:59:38 2009 -0700

Added some code to test audio encoding to the OMX harness.

commit 79af4748e4af33bd66d3fbac606e332a69741cf4
Author: Andreas Huber <andih@google.com>
Date: Wed Aug 5 14:36:22 2009 -0700

Merge the old OMXDecoder and the new, shiny, StateMachine code.

commit 91cf5dd77a8762bc10a0b2ffce35e3bbeb262231
Author: Andreas Huber <andih@google.com>
Date: Tue Aug 4 17:41:43 2009 -0700

A new harness to test OMX node compliance (and quirks).
OMX.h
tagefright/AudioPlayer.h
tagefright/CachingDataSource.h
tagefright/DataSource.h
tagefright/MP3Extractor.h
tagefright/MPEG4Extractor.h
tagefright/MPEG4Writer.h
tagefright/MediaBuffer.h
tagefright/MediaDebug.h
tagefright/MediaExtractor.h
tagefright/MediaPlayerImpl.h
tagefright/MediaSource.h
tagefright/OMXCodec.h
tagefright/OMXDecoder.h
tagefright/SampleTable.h
59ecb64c9629ab02329f8240c85b820ee0c98a2e 14-Aug-2009 Sahil Sachdeva <sahils@google.com> DO NOT MERGE, ALready merged to master.
1440173 [NJ-1331] MetaData utility parse the wrong m4a meta data. Changes to Java, application side.
ediametadataretriever.h
f4148b55c5d6f68b22462e3880015fefa91ae7c6 07-Aug-2009 Andreas Huber <andih@google.com> Expose a variation of the createRenderer API that works on a plain Surface.
OMX.h
408b8e1073385d0d09bb96b9952f84731a0b4aeb 07-Aug-2009 Andreas Huber <andih@google.com> Deprecate/remove now unused socketpair ipc communication in favour of exclusive binder use.
OMX.h
tagefright/OMXClient.h
fa2877b9ea48baed934b866d2ab3658b69c4c869 28-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not use pointers as handles to inputs and outputs.

Use integers instead of void* as input/output handles at IAudioFlinger and IAudioPolicyService interfaces.
AudioFlinger maintains an always increasing count of opened inputs or outputs as unique ID.
udioSystem.h
AudioFlinger.h
AudioFlingerClient.h
bf37f3364804f521cc61845b1f1ce16fe133814b 04-Aug-2009 Andreas Huber <andih@google.com> Recording/Export to .mp4/h.263 somewhat works on TI hardware.
tagefright/OMXDecoder.h
8b938cdab5bd3d074d9b41bc2915fcfc11e47f27 31-Jul-2009 Andreas Huber <andih@google.com> The IOMX interface now instantiates IOMXRenderers to hide the details of hardware accelerated blitting.
OMX.h
tagefright/MediaPlayerImpl.h
tagefright/MetaData.h
tagefright/SurfaceRenderer.h
81573ec97eaf631cc63eedceb928e123dafd593c 30-Jul-2009 James Dong <jdong@google.com> Remove hardcoded maximum frame rate limit from the framework
bug 1993400
ediarecorder.h
cfb3bc79a0e4d60ee2512c4ddbb85c424cc96c19 28-Jul-2009 Andreas Huber <andih@google.com> While other OMX nodes appear to now have switched to using microseconds to timestamp buffers, at least the TI AAC and MP3 decoders still use milliseconds.
tagefright/OMXDecoder.h
0024245e134467d120b40099da16c467dc365e76 28-Jul-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 374ea382ee3a9e3ce17e4c6357fc40d02e362810
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 28 09:54:13 2009 -0700

PV's OMX implementation now uses (spec-compliant) microseconds instead of milliseconds in buffer timestamps.

commit 8d02f8ab5d7b022ad4ad34db2a9bdeea6ce2acfe
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 27 14:24:26 2009 -0700

Support for using an overlay for video playback on TI hardware.

Appears to be currently constrained to CbYCrY 16-bit colorspace.

commit d17f321cb4b15c1fea378f33a7ef5998f23dd0fc
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 27 09:45:38 2009 -0700

Added '--audio-only' commandline option to stagefright tool.

commit d8beef6be5c668c46451446d87e622933371cd75
Author: Andreas Huber <andih@google.com>
Date: Fri Jul 24 13:35:00 2009 -0700

Generalize the various workarounds for OMX nodes with their own unique interpretation of the spec.

commit c7dfd53eeadf8ed5a39bf2b19b014dcd62f3324d
Author: Andreas Huber <andih@google.com>
Date: Thu Jul 23 16:06:36 2009 -0700

Fixed erroneous TI AAC decoder behaviour wrt shutdown.

The AAC decoder appears to not return out buffers on an Executing->Idle transition, implemented a workaround that does a flush on all ports followed by the Executing->Idle. Oh, and flush with OMX_ALL doesn't properly work either. Fun.

commit d6377282e75060881336578f166f9c7feacf3f8f
Author: Andreas Huber <andih@google.com>
Date: Thu Jul 23 14:06:50 2009 -0700

Apparently the "channels" parameter in AudioTrack's constructor no longer counts channels but is a bitmask of enabled destinations, update the code accordingly.

commit ff698c79e851a2e57d362e9c3a09828af4048087
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 22 16:54:44 2009 -0700

Fix MPEG4 decoding using TI's hardware decoder that I broke earlier...

commit 2ef78bb87cd856eb7f0b3d7dd68782a8650c12bf
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 22 15:43:18 2009 -0700

Now that the qcom decoder properly advertises its own custom colorspace, update dependent code to reflect this fact.

commit bbaec96910727080fd7c8a6907c04facb9f5220f
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 22 14:32:03 2009 -0700

Finishing up previous, incomplete change.

commit 76f14a1ae816b6f434771f8d12bdad81196f351e
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 22 14:25:17 2009 -0700

The TI video decoder now properly decoder AVC/H.264 content.

commit e106130d8c100d5c94603e43864a7a93cca10252
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 22 08:56:04 2009 -0700

Experimental support for the TI H.264 decoder, various modifications to OMXDecoder, non-functional still.

commit 241c3062dec3447db1a1ee74558cb4b9098fc404
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 21 12:13:09 2009 -0700

Enable TI hardware OMX decoders (except for AVC/H.264 which still has issues).

This particular set of OMX nodes does not appear to properly return our buffers when sending the "disable" command on a port. Rather it reqires manually flushing that port and _then_ disabling it instead.

commit 1c34506a46e32ce25f2a86f3b4250dcfc037356a
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 21 08:51:35 2009 -0700

Make it simpler to switch between the stagefright player and PVPlayer.

commit 249c6de05671d403f8dd51f095d49bf190430c9c
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 20 14:38:15 2009 -0700

Prepare to use soon-to-be-available hardware decoders in the OMX decoder.
tagefright/OMXDecoder.h
tagefright/TIHardwareRenderer.h
9a92037bd6477533062d635b676a6c9833aab96e 27-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 2001517: AudioTrack compatibility issue.

Modified enum values in AudioFormat.java and AudioSystem.h.
Added code for backward compatibility in AudioTrack.java and AudioRecord.java.
udioSystem.h
c2f1f07084818942352c6bbfb36af9b6b330eb4e 17-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1795088 Improve audio routing code

Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
udioRecord.h
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioFlingerClient.h
AudioPolicyService.h
a64c8c79af1a15911c55306d83a797fa50969f77 21-Jul-2009 niko <niko@google.com> Added native metadata support.

Metadata.java:
Fixed typo 8k != 8092. The comment was correct though.

In Metadata.h, the new Metadata class is declared in the ns android::media
to limit the chances of conflict with other packages.

The MetadataType in MediaPlayerInterface is gone and moved to Metadata as
an inner typedef.

Similarly the SortedVector<MetadataType> instance have been replace by a
new type Metadata::Filter.

All the keys declared in the java counterpart are also in Metadata.h.

Metadata.cpp:
Contains the implementation of the native metadata packing.

There an associated change in the opencore package that should go in
at the same time as this one.
ediaPlayerInterface.h
etadata.h
VPlayer.h
6d9d4ac96142880c35d6bee520347a9db74f92ed 21-Jul-2009 Jean-Baptiste Queru <jbq@google.com> donut snapshot
udioRecord.h
udioTrack.h
AudioFlinger.h
MediaPlayerService.h
ediaPlayerInterface.h
oneGenerator.h
ediaplayer.h
ediarecorder.h
d608a813a9d2cbc6e2a5ea81d78d4a9044090c4c 17-Jul-2009 niko <niko@google.com> Added method to get metadata out of the player.

The method passes a list of metadata ids to be retrieved and
a parcel where the metadata records should be appended.

If the list of ids is empty, all the metadata should be returned.
ediaPlayerInterface.h
VPlayer.h
361f482fd229c4d0b683d04c93b9da4ab01660b7 17-Jul-2009 Marco Nelissen <marcone@google.com> Fixes to make libstagefright build for the simulator.
tagefright/TimeSource.h
14d2747c7e54037e267bcff78b29e65b2181f0fa 13-Jul-2009 Nicolas Catania <niko@google.com> New test player stub to load mock native players.

Added a new class TestPlayerStub that takes a magic url in the setDataSource call.
Based on the value of the url, the stub is going to load a DL and create the concrete
player used during the test.
After these initialization steps TestPlayerStub is just a wrapper.

Added a new functional test MediaPlayerInvokeTest to demonstrate how a new
mock player to test the invoke method can be loaded.

Added a new mock player for the invoke test: invoke_mock_media_player.cpp.
ediaPlayerInterface.h
20111aa043c5f404472bc63b90bc5aad906b1101 15-Jul-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 8d179995654c19d9094e51989dc84ed0deba6e04
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 14 16:30:40 2009 -0700

Protect stagefright code with BUILD_WITH_STAGEFRIGHT build-define.

commit 99b41acb58c34e8f024c30c833a09fd7b31c4e1f
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 14 14:06:00 2009 -0700

OMX::list_nodes API, stagefright --list now lists all available OMX components.

commit 94a74c5b24aae6d7e446fff83d62ae3a57dc351b
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 13 16:04:29 2009 -0700

Reenabled "record" commandline application to test encoding, support for h263 codec specific data when writing to .mp4.

commit d363dd74f611577567c66d25900d6264c306468c
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 13 10:59:58 2009 -0700

Make non-socket communication in IOMX the default.

commit e89fc82c4fd138c88339887baf72f1d0e67f8660
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 13 10:32:33 2009 -0700

The OMX interface now optionally supports communication through the binder only (no sockets involved)

commit 28611de11223fba65299787cdd33f7fdbd6a60a3
Author: Andreas Huber <andih@google.com>
Date: Fri Jul 10 15:09:13 2009 -0700

Split off the logic to render to a Surface (not ISurface!) into SurfaceRender.{cpp,h}

commit c0cfa885faaeb17d3fc5436f6447b61708bd6fe1
Author: Andreas Huber <andih@google.com>
Date: Fri Jul 10 12:21:46 2009 -0700

Fix display dimensions vs. decoded dimensions display issues, unfortunately breaks software rendering a bit...

commit ae209a2b5d09caed5dd383c910f238926aaa8fc6
Author: Andreas Huber <andih@google.com>
Date: Fri Jul 10 09:33:29 2009 -0700

Simple video decoder performance test in "stagefright" commandline tool.

commit 59fe7840111d6f46dd3c48f4950146aed962dbd2
Author: Andreas Huber <andih@google.com>
Date: Thu Jul 9 16:05:12 2009 -0700

StagefrightPlayer: Properly publish video dimensions by notifying the listener.

commit 51b6598f0e47be5e12d77f1d14e111e71c593638
Author: Andreas Huber <andih@google.com>
Date: Thu Jul 9 11:38:15 2009 -0700

MediaPlayerInterface::AudioSink now supports the specification of a callback for pull-based audio.

commit 31ce53375d748da3e7d30e993ce89dae97fd65ea
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 8 17:23:37 2009 -0700

Proper support for pushing audio to a specified AudioSink interface. Still not bulletproof: video falls behind frequently.

commit a23e312b10631a5d47f5c9831205beac6b84ab36
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 8 15:10:13 2009 -0700

IGenesisPlayer and friends are no more, java interface now uses local playback instead
of playing inside the media server process.

commit 42ee5c06ab5ba1c16f50472b0b26a0526635c73c
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 8 13:17:03 2009 -0700

MP3 extractor now supports seeking (only fixed bitrate files currently supported)

commit 96a790405763bfa738d1c6845c99a9fdf579b66f
Author: Andreas Huber <andih@google.com>
Date: Tue Jul 7 10:53:54 2009 -0700

Keeping up-to-date with new master-gl changes, removing CameraSource for now, removing unnecessary commandline utilities from the build.

commit 6c9dcb7c628c0347154dd7f37913a3a5f04deb99
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 6 16:40:02 2009 -0700

Finally take advantage of the fact that the Qcom OMX decoders already place the output buffers into memory accessible by the hardware yuv converter and avoid extra allocations and memcpys in that case. Split of the render logic into subclasses of VideoRenderer.

commit e8d46e81cffc15ffb0bdf03f511e4a4497ca7621
Author: Andreas Huber <andih@google.com>
Date: Mon Jul 6 12:18:29 2009 -0700

Added a few more cases of valid MPEG4 files to the sniffer, fixed end of stream notifications in MPEG4 files.

commit 88bffc5ed4033a607080f8777a1c0ec9e3e079de
Author: Andreas Huber <andih@google.com>
Date: Thu Jul 2 12:25:03 2009 -0700

MediaPlayerImpl now properly pauses/resumes instead of tearing down the decoder chains and starting back up from the beginning.

commit 732aa0a87c7e8d8a10776b275712649954962414
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 1 14:58:56 2009 -0700

Remove pthread_mutex_* and pthread_cond_* in favour of Mutex and Condition.

commit 669e5944b2fe0542a3b8dba0c441a94503e99fb0
Author: Andreas Huber <andih@google.com>
Date: Wed Jul 1 14:43:02 2009 -0700

Proper support for end-of-stream signalling of MediaSources.

commit afb038f2dc594c742e554b2d42b86ffc7434e3fc
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 30 16:48:03 2009 -0700

Support for the "sniffing" of datasources to determine their probable mime type (along with confidence). Slightly refactored the MP3Extractor to share common code with the sniffer.

commit ed3644b8bd56807e1db4b32433a93a2467f1f3c5
Author: Andreas Huber <andih@google.com>
Date: Fri Jun 26 13:27:52 2009 -0700

I don't think prepare should automatically start the player.

commit 11eb9b49dc4a0819d366682817cba68613f4fe12
Author: Andreas Huber <andih@google.com>
Date: Fri Jun 26 11:09:22 2009 -0700

Somewhat better timing information implemented in the MP3Extractor.

commit cab023a1751735c0ed26c8493498a91d8644c6c9
Author: Andreas Huber <andih@google.com>
Date: Thu Jun 25 15:41:56 2009 -0700

Initial checkin for support of mp3 content, extraction and playback. Media extractors now abstracted in MediaExtractor baseclass.

commit 40f4146bb3c647e56690dd9b0fa3ffdea60030dc
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 24 10:41:12 2009 -0700

Make sure we only allocate surface buffers if there is video to be played.

commit 7f85e7d92fe81740e102e09905b19354f4ac178e
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 24 10:19:32 2009 -0700

Clean up a failed merge and implement stub for new API in MediaPlayerBase.

commit f0e9d494a4c03402ea7b54891848ca5a50c421b2
Author: Andreas Huber <andih@google.com>
Date: Fri Jun 12 15:38:03 2009 -0700

Support yuv420->rgb565 conversion if hardware color conversion is unavailable.

commit 87223248b3099cd5261b94169f84cfd1eba56a8f
Author: Andreas Huber <andih@google.com>
Date: Fri Jun 12 09:35:56 2009 -0700

Remove unimplemented and currently unnecessary blocking option from MediaSource::ReadOptions.

commit e07e651f0325892b797f3eb64dbeca0f317afdfd
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 10 16:26:42 2009 -0700

Enable assertions in HTTPDataSource.

commit 0dc97adebea1721156880f4b3d5c70f8d50c53b2
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 10 12:34:39 2009 -0700

delete foo.

commit 7f05845dda496e7defee284d32509d127e785784
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 10 12:34:08 2009 -0700

added foo.

commit e432970c51eeec4e5d549bdb3e2d3e48ffb4f0e7
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 10 11:44:31 2009 -0700

Make sure to initialize all fields in _all_ constructors... Use a Mutex instead of the raw pthread_mutex_t.

commit d6286a6bbca639952491448fa3e609b775a8a814
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 9 17:11:49 2009 -0700

send_command is now implemented twice... ugly hack to get both shutdown working correctly and startup as well... playback now "works" on the emulator, too.

commit 8d657e004677a7c5dae4479e8519bcaa94c18aad
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 9 11:58:55 2009 -0700

Instead of erasing codec specific data once it's been output to the omx node, retain the data and just rewind after a stop.

commit 279fede6ba35cbc37c35616c53406bf2c9720202
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 9 10:58:11 2009 -0700

Various fixes related to play/pause. Decoder now properly frees OMXMediaBuffers, made MemoryDealer destructor protected instead of public to prevent accidental stack-allocation of MemoryDealer objects.

commit 0f717f15a6328efd3f34082929cd8ad2351095a9
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 9 08:44:12 2009 -0700

Make sure to rewind codec specific data on OMXDecoder::stop and reset AudioPlayer's notion of time mapping.

commit 0cfb63e33270daf9b215214608ab383f93a31823
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 8 14:25:48 2009 -0700

Massive rename.

commit 30ed8f476c4431a5275538958b3e281bd17d5eab
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 8 13:52:41 2009 -0700

send_command and fill/empty buffer commands must be executed in sequence, send_command is now dispatched over the socket instead of through the binder interface to ensure this.

commit b832d04011b2dd8a9632eb7e575bfe1addd1270d
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 8 10:21:17 2009 -0700

MediaBuffers can now be "clone()", they sit on top of the same data but have their own range and metadata. Once a clone's refcount drops to 0 it decrements the refcount on the original buffer.

commit 4e944672808bdf1ed40a69f3f602f93ebf7b4049
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 8 10:01:01 2009 -0700

Split MediaBuffer.h into MediaBufferGroup.h and MediaBuffer.h, same with their respective source files.

commit ddb7529b4de4828db51432bd405fddd76cfa3b6a
Author: Andreas Huber <andih@google.com>
Date: Fri Jun 5 16:30:25 2009 -0700

More fudging with A/V sync...

commit 1e5a4d8df08237b58c06c6527a33152ae931addf
Author: Andreas Huber <andih@google.com>
Date: Fri Jun 5 11:54:20 2009 -0700

API cleanup of MediaSource. Got rid of MediaRing as it really doesn't serve a purpose if OMX decoders are used.

commit 0953c65232aa9753d17d2e25c5f5526eb810cf13
Author: Andreas Huber <andih@google.com>
Date: Thu Jun 4 16:59:19 2009 -0700

Experimental TimedEventQueue and an attempt at a cleaner player implementation using it, OMXDecoder is now a little less verbose.

commit 2085b8ea9484a21fa11f94194a27405d413aeecc
Author: Andreas Huber <andih@google.com>
Date: Thu Jun 4 10:17:01 2009 -0700

Properly bail out of the AV sync loop if the MediaPlayerImpl is stopped.

commit 471f143458a8a0d93cb1bf9568c63c3967279dc6
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 3 17:32:27 2009 -0700

Now this is much better AV sync, defer seeking the audio source until we know where the video source synced to.

commit 4010d371dbe62ce4971e13437776cba32cb0bb3d
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 3 16:01:07 2009 -0700

Tweaked some of the heuristics in AV sync, OMXDecoder is now a little less verbose, seek to a sync sample at or _after_ the requested position.

commit f3d4af1d5a4ac31fa02271b000f6c7ec593f0da9
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 3 15:33:58 2009 -0700

Change the TimeSource interface's APIs, prefer microseconds over milliseconds now, changed the way MediaPlayerImpl does AV sync.

commit 08bb46fa61d12e852a424698ddb0c90700328f6e
Author: Andreas Huber <andih@google.com>
Date: Wed Jun 3 11:57:24 2009 -0700

Using framework's Mutex and Condition classes instead of pthread functions, much saner locking in OMXDecoder.

commit 4d77b4e09e59bbf8c1af009ae7dc62b10af52fd6
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 2 17:12:03 2009 -0700

MediaSources now publish their format.

commit 7e429a26c57bf936e1a08035d2d11839f9f00310
Author: Andreas Huber <andih@google.com>
Date: Tue Jun 2 16:38:29 2009 -0700

MetaData is now implemented in terms of KeyedVector, MetaData is now reference counted.

commit 0fa957aa5c9bcb6ec122ed7b5b97430039be6797
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 1 14:39:55 2009 -0700

Sync sample seek support.

commit 78a5f090d02e7e6e1a146b29bdb7771eecaa2f86
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 1 13:51:11 2009 -0700

Distinguish shutdown from port-flush since one requires buffers to be freed and the other one doesn't. Fixes a problem with seek.

commit e57781d3b2c985a74cd8b60e7c8f2d576459d038
Author: Andreas Huber <andih@google.com>
Date: Mon Jun 1 10:52:20 2009 -0700

First shot at support for seeking a MediaSource. Sync frames are not properly handled yet.

commit 0551cd78fda78bf66877fb26c5a55e5ae23d8367
Author: Andreas Huber <andih@google.com>
Date: Thu May 28 16:23:38 2009 -0700

Preliminary support for camera input.

commit f8ebafa65d10d5a06944de6b2e2992a33121b857
Author: Andreas Huber <andih@google.com>
Date: Thu May 28 12:13:47 2009 -0700

Allow NativeMediaPlayer access to Surface's getISurface() method.

commit b1a9fb36eeccd9f49d28c1c64b31fccbd6506eeb
Author: Andreas Huber <andih@google.com>
Date: Thu May 28 11:38:25 2009 -0700

Header files are now in their own genesis2 hierarchy below frameworks/base/include.

commit f49b8b234b8f6ce83148787eef540dd920f04aa6
Author: Andreas Huber <andih@google.com>
Date: Thu May 28 11:22:03 2009 -0700

moved MPEG4Writer into libgenesis2.

commit 5224254919dac4728677335ea60429fa16f518b4
Author: Andreas Huber <andih@google.com>
Date: Thu May 28 11:13:38 2009 -0700

Everything now lives in the android namespace, integrated errors with android errors, renamed MediaPlayer to MediaPlayerImpl.

commit f9a9d84f7e0465ef5d1938a068655ba39527cf99
Author: Andreas Huber <andih@google.com>
Date: Wed May 27 16:43:11 2009 -0700

Support for getPosition() and getDuration().

commit 3206cc5140bcbc88be039f8d94b954af63e69752
Author: Andreas Huber <andih@google.com>
Date: Wed May 27 15:37:45 2009 -0700

Support for {MediaPlayer, GenesisPlayer, Genesis2Player}::isPlaying()

commit 9f41b248e0dfce71bbc50f883750cec52ebfd1fe
Author: Andreas Huber <andih@google.com>
Date: Wed May 27 13:49:50 2009 -0700

Proper disconnection from the OMX service.

commit cdcf47a2c31599109ee42277c7fa14af3c600091
Author: Andreas Huber <andih@google.com>
Date: Tue May 26 17:27:06 2009 -0700

New player type for the genesis player in libmediaplayerservice. Playing video through an ISurface now.

commit 0586af20ac9ae0403dd190bafd290b0f90549723
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 15:53:19 2009 -0700

Fix a buffer overflow error by adding padding in case we need to de-frame AVC data.

commit eac62fff6ad2ffb7b75c0d4a1b9620d33e93fb9b
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 13:35:30 2009 -0700

Support for http URIs in MediaPlayer, compensate for AudioTrack latency.

commit a7db456e3173d94d6b5e457547e2a6a5f7a8e1cc
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 11:33:25 2009 -0700

Support for URIs in MediaPlayer class, support for shoutcast streams in MediaPlayer, force shutdown of OMX nodes if they don't shutdown cleanly within a second.

commit 1f0268f4f14ad5215668f34e06a420850174d665
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 08:33:16 2009 -0700

and foo.txt is gone again.

commit 0feca4e0919f345704d78ec78894bac5027bd5ed
Author: Andreas Huber <andih@dhcp-172-19-27-148.mtv.corp.google.com>
Date: Fri May 22 08:28:49 2009 -0700

added foo.txt

commit 9c7d04b35cdc895a2de3602dc46522f608bd205f
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 08:28:04 2009 -0700

delete foo again

commit fec3ca1720992cce51b9a92b86b945da88a6b16c
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 08:27:45 2009 -0700

weird

commit 30a6571302333146e537e537a3a8986245cca87c
Author: Andreas Huber <andih@dhcp-172-19-27-148.mtv.corp.google.com>
Date: Fri May 22 08:18:55 2009 -0700

reverse test

commit dea3d99dd0fe9386e8a3c51954d9d0fe2be09d38
Author: Andreas Huber <andih@google.com>
Date: Fri May 22 08:18:22 2009 -0700

test

commit a9eeafec6e46072cac41e54ebdbd153cb7ae7518
Author: Andreas Huber <andih@google.com>
Date: Thu May 21 16:37:50 2009 -0700

Use the video ring again for now.

commit e05ff3d3c1c4f89ef499a2b172138a775fd694e3
Author: Andreas Huber <andih@google.com>
Date: Thu May 21 15:42:19 2009 -0700

Export to .mp4 now works for MPEG4 video content. Fixed a bug in the sample table wrt co64 chunks.

commit 5c44c540374a4e50c4e8aaab2b7a34aed6e1391e
Author: Andreas Huber <andih@google.com>
Date: Thu May 21 09:56:11 2009 -0700

Fix the build, all binder-related headers have moved and there's a new library libbinde
r to link against now.

commit 23e0a24404d16c898c2c6b3c7495ad303844bc71
Author: Andreas Huber <andih@google.com>
Date: Thu May 21 08:42:04 2009 -0700

Initial checkin of MPEG4Writer, a class to export media sources into an mpeg4 file. MPEG4/AVC metadata (efss & friends) not currently working.

commit 9cd77adb1ac194197364ffad00a0d7215f458e1a
Author: Andreas Huber <andih@google.com>
Date: Wed May 20 12:31:45 2009 -0700

New shell command to test recording/encoding. Various changes to OMXDecoder to support encoding properly. Now each OMXDecoder needs a dedicated thread on the client side since onEvent responses could block which would cause deadlocks if a node depends on the output of another node for example.

commit 5c510fb55ffed7ec25305999ed9b6c1eec48d503
Author: Andreas Huber <andih@google.com>
Date: Mon May 18 15:40:06 2009 -0700

Make media decoding the default in the genesis2 commandline app instead of shoutcast playback.

commit f6c7a2040b8eb43326621f12c3a936e09b3a70e3
Author: Andreas Huber <andih@google.com>
Date: Mon May 18 11:03:04 2009 -0700

The king is dead, long live the kind... Replaced old OMX binder interface with new OMX binder interface/socket hybrid.

commit 0d4955eb5df9bfafb576d22f2ed572644d6d69ac
Author: Andreas Huber <andih@google.com>
Date: Thu May 14 12:39:34 2009 -0700

dynamic negotiation of NAL framing with the MPEG4Source, removed stale code from genesis2 commandline tool. Enable support form PV H264 software decoder.

commit 380369f54a8027cbc9349305184d6bf527a24efe
Author: Andreas Huber <andih@google.com>
Date: Wed May 13 17:32:00 2009 -0700

Explore the option of running everything inside the mediaserver process by encapsulating the player in an IGenesisPlayer binder interface.

commit b5cada56b9089a23e0c461352a97dc71e08b424d
Author: Andreas Huber <andih@google.com>
Date: Wed May 13 12:11:06 2009 -0700

Introduction of TimeSource class, clean shutdown of OMX Nodes.

commit 89f6e582e605dcb2149eb67f73fe9345d4b9be2e
Author: Andreas Huber <andih@google.com>
Date: Tue May 12 17:11:56 2009 -0700

Helper classes MediaRing and MediaPlayer.

commit 9aaed8739b4bb941473da367fb88f63224d2f1b7
Author: Andreas Huber <andih@google.com>
Date: Tue May 12 14:19:18 2009 -0700

Using mmap to map a file instead of going through FILE* improves performance, who knew?

commit ad097a78bbd002c59193ffdc39b64935928426c7
Author: Andreas Huber <andih@google.com>
Date: Mon May 11 16:42:42 2009 -0700

Added a performance test, refactored AudioDecoder a little.

commit bdd1b80ab3f3ba43e04f1f996e7fa84ed2e2728a
Author: Andreas Huber <andih@google.com>
Date: Fri May 8 16:19:29 2009 -0700

No more copying the output buffers coming out of the decoder, NAL separation also done in the extractor to avoid copying the data.

commit 858955b42c29b8033841a8caaa56c2a449810ef3
Author: Andreas Huber <andih@google.com>
Date: Fri May 8 14:02:38 2009 -0700

Change from a model in which the caller specifies the destination buffer to one where the MediaSource returns a buffer.

commit 95098b6d4f8bdc37dfb6a109ca58db4d9e414e2d
Author: Andreas Huber <andih@google.com>
Date: Fri May 8 13:21:45 2009 -0700

Changes to support multiple pieces of codec specific data to the decoder, de-frame nal units from the h.264 stream and insert start codes

commit 3941fcf87a48dda81683df727dfb1381f62d9184
Author: Andreas Huber <andih@google.com>
Date: Thu May 7 16:37:45 2009 -0700

some refactoring. Most streams play now.

commit d3152862840d4dd39068e5197bec8674f3d55dd5
Author: Andreas Huber <andih@google.com>
Date: Thu May 7 15:37:32 2009 -0700

Misc. changes to support H264 decoding using the qcom hardware decoder

commit d4ecdfe7af36e7468270d1c2cbbdc540efe0351e
Author: Andreas Huber <andih@google.com>
Date: Thu May 7 09:28:18 2009 -0700

Timestamps are now stored as a fraction, i.e. units and scale, also, PV appears to violate OMX specs by assuming timestamps are in milliseconds instead of microseconds.

commit fe6a50943f885e065d4061aa727a54417e9f36db
Author: Andreas Huber <andih@google.com>
Date: Wed May 6 14:18:27 2009 -0700

Refactored commandline app instantiation of the decoder.

commit da1ff2724d0e78e8b360d9a2c34c55dd0e2c0492
Author: Andreas Huber <andih@google.com>
Date: Wed May 6 10:41:14 2009 -0700

Proper audio/video synchronization.

commit 569ee3a23f600f4b6b87c6178c0223b06e97f201
Author: Andreas Huber <andih@google.com>
Date: Wed May 6 09:17:20 2009 -0700

Preliminary support for timestamps.

commit e4e302a89207550d8a7170d8c0afbd9c15047c84
Author: Andreas Huber <andih@google.com>
Date: Tue May 5 15:13:12 2009 -0700

Another quick hack job to make CachingDataSource thread-safe as well.

commit dfb376a58bd7c09aa04e89558186fcfe13fe696c
Author: Andreas Huber <andih@google.com>
Date: Tue May 5 15:08:14 2009 -0700

Quick rushjob to make FileSource and SampleTable thread safe.

commit 02b29e7ebdab1f8b959b6c177ceb3b89d998f375
Author: Andreas Huber <andih@google.com>
Date: Mon May 4 17:22:04 2009 -0700

Made video decoding work for mpeg4/h263 and mostly(?) with AVC content.

commit 3a57b8ff15e48f5a0af03bf0a99c32e240dbb7ef
Author: Andreas Huber <andih@google.com>
Date: Mon May 4 09:26:42 2009 -0700

Getting rid of old sample code to drive the OMXNode binder interface.

commit 5b046aed0cf524a57ea711bc1e43ea80e57b2cb3
Author: Andreas Huber <andih@google.com>
Date: Fri May 1 16:21:11 2009 -0700

Moved files from the commandline utility into the framework, renamed MP3Decoder to AudioDecoder

commit 7f3fbba21512a078b732cc52c7bd5ba5acb9a317
Author: Andreas Huber <andih@google.com>
Date: Fri May 1 15:56:19 2009 -0700

Fixed buffer ordering and an off-by-1 error in the SampleTable code. Plays all AACs now :)

commit 024d06baab8f2c540dde16f7e7a4b6dd57f638c7
Author: Andreas Huber <andih@google.com>
Date: Fri May 1 11:52:48 2009 -0700

Some AAC content in .3gp or .mp4 files plays correctly now, other does not. Implemented ESFS parser.

commit 1470427866b0d3e0ce6848b4edc01c13a09be289
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 30 15:19:31 2009 -0700

Another checkpoint, amr decoding now functional.

commit e612d044439f56331b6a2bc4a88622e04d4d42e7
Author: Andreas Huber <andih@google.com>
Date: Wed Apr 29 12:11:29 2009 -0700

string wrapper around String8, various fixes, shoutcast now works again.

commit 2ea52dfb1a39bf3a223ffc87855e54919e2daff7
Author: Andreas Huber <andih@google.com>
Date: Wed Apr 29 11:08:18 2009 -0700

Initial check-in of OMXNode binder interface.

commit 7880d2957f74c0d7fba7679431ff5adb3780543b
Author: Andreas Huber <andih@google.com>
Date: Wed Apr 29 10:05:01 2009 -0700

Initial check-in of both libgenesis2 and the genesis2 commandline tool.
MediaPlayerService.h
OMX.h
ediaPlayerInterface.h
tagefright/AudioPlayer.h
tagefright/AudioSource.h
tagefright/CachingDataSource.h
tagefright/CameraSource.h
tagefright/DataSource.h
tagefright/ESDS.h
tagefright/FileSource.h
tagefright/HTTPDataSource.h
tagefright/HTTPStream.h
tagefright/MP3Extractor.h
tagefright/MPEG4Extractor.h
tagefright/MPEG4Writer.h
tagefright/MediaBuffer.h
tagefright/MediaBufferGroup.h
tagefright/MediaErrors.h
tagefright/MediaExtractor.h
tagefright/MediaPlayerImpl.h
tagefright/MediaSource.h
tagefright/MetaData.h
tagefright/MmapSource.h
tagefright/OMXClient.h
tagefright/OMXDecoder.h
tagefright/QComHardwareRenderer.h
tagefright/SampleTable.h
tagefright/ShoutcastSource.h
tagefright/SoftwareRenderer.h
tagefright/SurfaceRenderer.h
tagefright/TimeSource.h
tagefright/TimedEventQueue.h
tagefright/Utils.h
tagefright/VideoRenderer.h
tagefright/string.h
7b115569a3816783bfa7f980e2208a6f9d96daa1 04-Jun-2009 Ravi K Yenduri <yenduri@pv.com> Ignore pause and seek for live streaming.
VPlayer.h
8e1b6cce24574b9ecd5b0300155776bd0b4ef756 09-Jul-2009 Nicolas Catania <niko@google.com> Basic plumbing to retrieve metadata from the native player.

IMediaPlayer.h
Added a getMetadata method that mirrors the on in MediaPlayer.java.

MediaPlayer.java
Added a native method to get the metadata from the native player.
Parse the parcel into a Metadata object.

Metadata.java
Added a stub to parse the Parcel returned by the native player into
a set of metadata.

android_media_MediaPlayer.cpp
JNI call to forward the getMetadata call.

MediaPlayerService.cpp
MediaPlayerService::Client implements the new getMetadata method added in IMediaPlayer.h
MediaPlayer.h
ediaplayer.h
a7e0e8b4c429fc68eb1bd5b5a30f5b91352288f9 08-Jul-2009 Nicolas Catania <niko@google.com> Implemented the metadata changed notification filters.

IMediaPlayer:
new setMetadataFilter method so set a filter (2 lists of allowed and blocked metadata type)
serialized in a Parcel.

MediaPlayer.java/android_media_MediaPlayer.cpp/mediaplayer.cpp
new setMetadataFilter that passes the filter down to the MediaPlayerService's binder interface.

MediaPlayerService.cpp
The Client inner class holds the allowed and blocked metadata types.
These are in 2 vectors that get populated in the setMetadataFilter.

A new shourldDropMetadata method returns true if a type of metadata should be dropped according
to the filters.

The notify method in run the metadata update notifications thru the filter and possibly drop them.
MediaPlayer.h
ediaplayer.h
349dba337e07e129f6ba49a132999f0b73fedbe3 07-Jul-2009 Eric Laurent <elaurent@google.com> am 88e209dc: Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR

Merge commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c'

* commit '88e209dcf8c2ebddda5c272f46d1bd5478bc639c':
Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
573266210fb2b2e7d86fbd46d0dfe16763611d91 07-Jul-2009 Eric Laurent <elaurent@google.com> Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR

Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t.
Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate().
AudioTrack::setSampleRate() no returns a status.
udioRecord.h
udioTrack.h
1d187f1a86855f5f0694d7ec30efc9833bf7c589 13-May-2009 Nicolas Catania <niko@google.com> Direct api to the native media player.

MediaPlayer.java has 3 new methods:
* newRequest creates a Parcel that can be used to send data to the
native player using invoke.
* invoke issues synchronous calls to the native player using opaque
parcels for the request and reply.

IMediaPlayer.h has 1 new abstract method:
* invoke

The Midi and Vorbis players have a stub for these. So far only PV
makes use of that new feature.

To avoid any copy overhead, the JNI interface uses Parcel as a java
object (no serialization/copy happens at the JNI layer).

The remote interface token is inserted when the Parcel is constructed
in java. That way the parcel is already routable when it reaches
IMediaPlayer.cpp (proxy). No extra copy is needed there.
MediaPlayer.h
MediaPlayerService.h
ediaPlayerInterface.h
VPlayer.h
ediaplayer.h
3d59a4b99937a7d0dc07eec2574cc8a98cc99fdd 23-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 1bee98af: Merge change 5100 into donut

Merge commit '1bee98af6532eba3c6cda636eee890530c95a2a7'

* commit '1bee98af6532eba3c6cda636eee890530c95a2a7':
Fill in CDMA gaps and clean up ToneGenerator code
5e0a3043af16bc71a4211ee00dc00724de6623a7 17-Jun-2009 David Krause <david.krause@motorola.com> Fill in CDMA gaps and clean up ToneGenerator code
oneGenerator.h
4710a1f6c9800dae90f9e2702ba2b5b54c095eae 12-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am d670b8c6: Merge change 3981 into donut

Merge commit 'd670b8c61ebd13324ac21bdbc08d8a02fc0a765a'

* commit 'd670b8c61ebd13324ac21bdbc08d8a02fc0a765a':
Removed trailing whitespaces.
660951867e959ebe98612742ef1f72d33ea7e9a3 12-Jun-2009 Nicolas Catania <niko@google.com> Removed trailing whitespaces.
MediaPlayerService.h
ediaPlayerInterface.h
ediaplayer.h
2a7d5b3c1a3749db7c4ace34bf1253c44967e843 09-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am b2df1699: Merge change 1548 into donut

Merge commit 'b2df1699c996e62baa78877978cd2c5607ea4194'

* commit 'b2df1699c996e62baa78877978cd2c5607ea4194':
NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
9747c5a1f5e51fab72169767972bf55f73711000 08-Jun-2009 Jianhong Jiang <jianhong@google.com> NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
ediarecorder.h
f853bb74a196b5403482bf8e8cf9429081fa5974 04-Jun-2009 Ravi K Yenduri <yenduri@pv.com> Ignore pause and seek for live streaming.
VPlayer.h
273d098cc72a88c797d01c7dff0c1350f315f05f 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of utils.h
ediarecorder.h
ediascanner.h
95634c8b6ad5419e310a5196bcc37f5988ed82da 26-May-2009 Android (Google) Code Review <android-gerrit@google.com> am de8268d6: Merge change 2331 into donut

Merge commit 'de8268d6d1cd168510c490b17e93154d2eab767c'

* commit 'de8268d6d1cd168510c490b17e93154d2eab767c':
Fix issue 1846343 - part 1
f5879c1448cc6aebc51b26d3ec2399d66144f8f4 22-May-2009 Eric Laurent <elaurent@google.com> Fix issue 1846343 - part 1

This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.

A second change is required in opencore author driver and android audio input to completely fix the issue.
udioRecord.h
AudioFlinger.h
ediarecorder.h
7562408b2261d38415453378b6188f74fda99d88 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
udioRecord.h
udioTrack.h
AudioFlinger.h
AudioFlingerClient.h
AudioRecord.h
AudioTrack.h
MediaMetadataRetriever.h
MediaPlayer.h
MediaPlayerClient.h
MediaPlayerService.h
MediaRecorder.h
ediametadataretriever.h
ediaplayer.h
b206b934737c73b2ad243ebcad53f110d464819e 20-May-2009 Jean-Baptiste Queru <jbq@google.com> donut snapshot
udioRecord.h
udioTrack.h
oneGenerator.h
a9470ac2bf900f805468b4868aeeb6465b25e02e 20-May-2009 Garret Pick <pickgr@pv.com> Change required for OpenCORE 2.04 Update
VPlayer.h
0b62e242d112d46e9357242b0a4e11c720c98ca0 05-May-2009 Eric Laurent <elaurent@google.com> Fixed issue 1709450: Requirements for CDMA Tone Generator

Added new tone types for CDMA IS-95 specific tones.
Automatic selection between IS-95, CEPT and JAPAN version base on operator
country code for call supervisory tones.
Also improved tone generator capabilities:
- Each tone segment can now generate its own set of frequencies
- A tone does not have to be a succession of alternating ON/OFF segments
- The sequence repetition does not have to start from first segment
oneGenerator.h
1dd70b9f04961a06fcb73a97fca10a53b3245d3c 21-Apr-2009 Eric Laurent <elaurent@google.com> Fix issue 1745312: Various cleanups in media framework

AudioTrack, AudioRecord:
- remove useless mAudioFlinger member of AudioTrack and AudioRecord.
- signal cblk.cv condition in stop() method to speed up stop completion.
- extend wait condition timeout in obtainBuffer() when waitCount is -1 to avoid waking up callback thread unnecessarily

AudioFlinger:
- remove some warnings in AudioFlinger.cpp.
- remove function AudioFlinger::MixerThread::removetrack_l() as its content is never executed.
- remove useless call to setMasterVolume in AudioFlinger::handleForcedSpeakerRoute().
- Offset VOICE_CALL stream volume to reflect actual volume that is never 0 in hardware (this fix has been made in the open source): 0.01 + v * 0.99.

AudioSystem.java:
- correct typo in comment

IAudioflinger, IAudioFlingerClient:
- make AudioFlinger binder interfaces used for callbacks ONEWAY.

AudioHardwareInterface:
- correct routeStrings[] table in AudioHardwareInteface.cpp
udioRecord.h
udioTrack.h
1503b07c2619dc520b0b6747f645cebe10cc05a3 31-Mar-2009 Ravi K Yenduri <yenduri@pv.com> Enable OpenCORE on master - part 1
VPlayer.h
a845f672e491ec3567709501f8af8d3661f184e7 28-Mar-2009 Eric Laurent <> AI 143177: am: CL 142889 Fix issue #1736153 Camera shutter sound can be muted by new AlarmClock setting.
Current implementation of Camera service plays the camera shutter sound over the ALARM stream so that it cannot be muted by silent mode in order to comply to some country specific requirement. A recent change made it possible for the user to mute the ALARM stream thus making this stream not suitable any more for the camera shutter sound.
The fix consists in creating a new stream type only accessible by native code and that cannot be muted and use it to play camera sounds.
Original author: elaurent
Merged from: //branches/cupcake/...

Automated import of CL 143177
udioSystem.h
e47562d6b22a091c62ad0c7c2d68d0968b5d21af 26-Mar-2009 Eric Laurent <> Automated import from //branches/cupcake/...@142889,142889
udioSystem.h
7d563247cdac0509009d579bbf849157d47c38a9 25-Mar-2009 Jean-Michel Trivi <> Automated import from //branches/donutburger/...@141200,141200
udioRecord.h
7dc112527d77b675d5c0451502b33fe2c552a79e 25-Mar-2009 Jason Sams <> Automated import from //branches/donutburger/...@140866,140866
ediaplayer.h
2c22aeb65e801f663a754d043062f85e49f77739 25-Mar-2009 Jean-Michel Trivi <> Automated import from //branches/donutburger/...@140663,140663
udioTrack.h
87e445b4bed2931b9033aff68878cd4b392e1fab 20-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@141571
udioRecord.h
udioTrack.h
ediaplayer.h
1179bc9b0e3d17c984e8f4ad38561c049dd102fa 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
ediarecorder.h
c048cae0367db6fbb4fe1127be5011910713d4ad 13-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@138607
MediaRecorder.h
VMediaRecorder.h
ediarecorder.h
65e731f393f704eedab6fbe0af7f8a580c8d4617 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
VPlayer.h
ediaplayer.h
87e06b6ae58d0caca9196e31490f2a5b515a9740 06-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136654
hread_init.h
89fa4ad53f2f4d57adbc97ae1149fc00c9b6f3c5 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
udioRecord.h
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioFlingerClient.h
AudioRecord.h
AudioTrack.h
MediaMetadataRetriever.h
MediaPlayer.h
MediaPlayerClient.h
MediaPlayerService.h
MediaRecorder.h
etPlayer.h
ediaMetadataRetrieverInterface.h
ediaPlayerInterface.h
VMediaRecorder.h
VMetadataRetriever.h
VPlayer.h
oneGenerator.h
ediametadataretriever.h
ediaplayer.h
ediarecorder.h
ediascanner.h
hread_init.h
15f767b960b38059a74a42a33e16d8df2aec8bc1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
udioRecord.h
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioFlingerClient.h
AudioRecord.h
AudioTrack.h
MediaMetadataRetriever.h
MediaPlayer.h
MediaPlayerClient.h
MediaPlayerService.h
MediaRecorder.h
etPlayer.h
ediaMetadataRetrieverInterface.h
ediaPlayerInterface.h
VMediaRecorder.h
VMetadataRetriever.h
VPlayer.h
oneGenerator.h
ediametadataretriever.h
ediaplayer.h
ediarecorder.h
ediascanner.h
hread_init.h
ad04d9201452001dbaac4349f084cc9316190b89 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
udioRecord.h
MediaRecorder.h
VMediaRecorder.h
ediarecorder.h
99ffda877980468a9ae31e013cd10fb3645df1b0 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
udioRecord.h
MediaRecorder.h
VMediaRecorder.h
ediarecorder.h
25658fd43d150a45fb37734a9f9f27f48bb5c133 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
udioSystem.h
7a2146d5807030b2629f347736be5301b61e8811 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioFlingerClient.h
MediaRecorder.h
VMediaRecorder.h
ediarecorder.h
5e07b5774c8b376776caa4f5b0a193767697e97e 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioFlingerClient.h
etPlayer.h
ediaPlayerInterface.h
VPlayer.h
oneGenerator.h
e5198b620a9a208ec59ea8457282404725f8ff6e 20-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127101
udioRecord.h
udioTrack.h
oneGenerator.h
54ffb8abf94365496a2dbf5d792b6977d6a8ef06 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
VMediaRecorder.h
cce8bd12da6d8419a8770e4552a51ec297c250c2 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
etPlayer.h
oneGenerator.h
ediametadataretriever.h
7b5eb023f8d87cca6d830ae6c11c6aadbe02aca8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
udioRecord.h
udioSystem.h
udioTrack.h
AudioFlinger.h
MediaMetadataRetriever.h
MediaPlayer.h
MediaPlayerService.h
MediaRecorder.h
ediaMetadataRetrieverInterface.h
ediaPlayerInterface.h
VMediaRecorder.h
VMetadataRetriever.h
VPlayer.h
oneGenerator.h
ediametadataretriever.h
ediaplayer.h
ediarecorder.h
ediascanner.h
2729ea9262ca60d93047e984739887cfc89e82eb 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
udioRecord.h
udioSystem.h
udioTrack.h
AudioFlinger.h
AudioRecord.h
AudioTrack.h
MediaPlayer.h
MediaPlayerClient.h
MediaPlayerService.h
ediaPlayerInterface.h
VPlayer.h
oneGenerator.h
ediametadataretriever.h
ediaplayer.h
ediarecorder.h
ediascanner.h
hread_init.h