259 Commits

Author SHA1 Message Date
Andreas Huber
669ad13de9 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
2011-03-02 15:38:32 -08:00
James Dong
797e4f1dce Get rid of redundant media profiles
bug - 3330679

Change-Id: Idc55aea32746c0c57552c5e15a289681421aa859
2011-03-01 15:58:59 -08:00
Jamie Gennis
e6befb88bd 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
2011-02-28 12:12:20 -08:00
Glenn Kasten
cc562a3576 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
2011-02-23 15:02:56 -08:00
Gloria Wang
87e639bc15 Merge "- Add method in MediaPlayerService to collect and pull codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data" 2011-02-23 09:58:33 -08:00
Gloria Wang
d211f41f76 - Add method in MediaPlayerService to collect and pull
codec usage (duration) for the battery app
- Collect MediaPlayer decoding usage data

Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
2011-02-22 22:42:05 -08:00
James Dong
bafa7eaccb Check file descriptor before passing it through binder calls
bug - 3476613

Change-Id: I858933fd2fe4c095c0bd58bf50344c47fc104be9
2011-02-22 12:34:02 -08:00
Glenn Kasten
8b4b97a14a Bug 3352047 Wrong message when adjusting volume
Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
2011-02-10 14:37:42 -08:00
Eric Laurent
25101b0b9a 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
2011-02-03 09:26:24 -08:00
Marco Nelissen
cc2915c0b1 am c929677e: Merge "Increase the number of useful bits in the spectrum." into gingerbread
* commit 'c929677e017759047d94599faa1b80ebe278fefb':
  Increase the number of useful bits in the spectrum.
2011-01-29 09:32:05 -08:00
Marco Nelissen
dbc0fe985f Increase the number of useful bits in the spectrum.
Change-Id: I3efc2ac8db689285566df35cb6f594aab41141db
2011-01-24 08:47:55 -08:00
Andreas Huber
d95b46a1d1 Make parameter blocks read/writable even for SET_PARAMETER/SET_CONFIG requests.
Refactor the logic a little.

Change-Id: Idd7a26678d846c96b0b11f096305e7467381bda3
2011-01-19 10:34:52 -08:00
James Dong
9efe47374b Squash commits of the following patches, cherry-picked from other branch - do not merge.
o Prepare for publishing MediaMetadataRetriever as public API
  step one:
  o replaced captureFrame with getFrameAtTime
  o removed getMode

o Replace MediaMetadataRetriever.captureFrame() with MediaMetadataRetriever.getFrameAtTime()
  as part of the preparation for publishing MediaMetadataRetriever as public Java API

o Remove captureFrame from MediaMetadataRetriever.java class
  It has been replaced by getFrameAtTime() method

o Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java

o 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 - 3309041

Change-Id: I2efb6e8b8d52897186b016cb4efda6862f5584c4
2011-01-12 17:12:46 -08:00
James Dong
11eab056dd 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
2011-01-12 14:14:11 -08:00
Andreas Huber
52c7832e35 Increase cache size and low-watermark threshold, also
MediaPlayer now sends out MEDIA_INFO,MEDIA_INFO_VIDEO_TRACK_LAGGING messages
to the JAVA client informing it how much (if at all) the video lags behind
audio (arg2 is the media delay in ms).

Change-Id: I6933f573d8597a35112e4b5ee0fcb826a7f6ddd1
related-to-bug: 3335220
2011-01-11 15:05:28 -08:00
Mike Lockwood
076e05b488 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>
2010-12-16 15:35:36 -08:00
Eric Laurent
36d41b8103 Fix issue 2712130: Sholes: problem when playing audio while recording over bluetooth SCO.
The problem is that when an input stream is opened for record over bluetooth SCO, the kernel
mono audio device should be opened in RW mode to allow further use of this same device by an output stream
also routed to bluetooth SCO.
This does not happen because of a bug in AudioSystem::isBluetoothScoDevice() that does not return true
when the device is DEVICE_IN_BLUETOOTH_SCO_HEADSET (input device for blurtooth SCO).

Change-Id: Ic78bf324b4a68e65721d763dc7682ce7a8f14f75
2010-12-15 19:09:42 -08:00
Andreas Huber
ae9d507253 API Support for both synchronous and queued commands, optionally associated metadata.
Change-Id: Idb90d64cb638942210c5822b3cba2f05b087d601
2010-12-06 12:45:50 -08:00
James Dong
faf09ba940 Prepare for publishing MediaMetadataRetriever as public API
step one:
o replaced captureFrame with getFrameAtTime
o removed getMode

bug - 2433195

Change-Id: I38a8cecef29014692f0b08b8818326e3ebb40a12
2010-12-03 15:32:47 -08:00
Chia-chi Yeh
1981674771 am 4f93f08d: am 683a7ff9: Merge "Visualizer: Fix the conversion from 8-bit sample to 16-bit sample." into gingerbread
* commit '4f93f08d8c8b8067ff2176d9ec15c76c0e4cc0c2':
  Visualizer: Fix the conversion from 8-bit sample to 16-bit sample.
2010-11-30 16:23:40 -08:00
Chia-chi Yeh
4f93f08d8c am 683a7ff9: Merge "Visualizer: Fix the conversion from 8-bit sample to 16-bit sample." into gingerbread
* commit '683a7ff922409d2aa6c944bc4e08de32029e80e5':
  Visualizer: Fix the conversion from 8-bit sample to 16-bit sample.
2010-11-30 11:45:54 -08:00
Chia-chi Yeh
683a7ff922 Merge "Visualizer: Fix the conversion from 8-bit sample to 16-bit sample." into gingerbread 2010-11-29 22:56:56 -08:00
Andreas Huber
52b52cdfb7 Support streaming data across binder boundaries.
Change-Id: Ifbac61406dcb81343765f99ccba08bd90f9274cc
2010-11-23 14:46:13 -08:00
Eric Laurent
f3d6dd0782 Fix issue 3157123.
Use a Mutex wherever atomic operations were used in AudioTrack,
AudioRecord, AudioFlinger and AudioEffect classes.

Change-Id: I6f55b2cabdcd93d64ef19446735b8f33720f8dbc
2010-11-19 15:49:42 -08:00
James Dong
c5bba6cc70 Fix an issue wherre error notification will not be sent after mediaplayer reset
bug - 3198642

Change-Id: Ieab13e12af9fdd0ad0873c522885e1350e7cd24c
2010-11-18 12:25:52 -08:00
Andreas Huber
c23dabfb20 Remove all traces of legacy renderer support in stagefright.
Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
2010-11-16 13:05:53 -08:00
Jean-Michel Trivi
1a22bdb01a 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
2010-11-12 14:35:52 -08:00
Andreas Huber
2e1a896724 resolved conflicts for merge of 31dc911a to gingerbread-plus-aosp
Change-Id: I2f51b2120b3c552566d91a7dc498a5e8b130205f
2010-11-08 11:56:08 -08:00
Andreas Huber
31dc911aee Support post-decode video rotation.
Change-Id: Ia371316e73a57e44610de86adce3eaa560afbf84
2010-11-05 17:03:17 -07:00
Chia-chi Yeh
67f41771d5 Visualizer: Fix the conversion from 8-bit sample to 16-bit sample.
Change-Id: Ie6d77b0f61a37333e05cdcdb6ef29d6f6c345a9d
2010-11-01 10:56:45 +08:00
Andreas Huber
69b8d69aad 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
2010-10-29 13:20:06 -07:00
James Dong
387e38dd87 OMX extension to support storing meta data in video input buffers during recording
bug - 3042125

Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
2010-10-21 14:06:17 -07:00
Jean-Baptiste Queru
5582cc3a68 Merge fb474872 from gingerbread-plus-aosp
Change-Id: I1bbb845a86a7b7df44ea175df3af22e5f47c44e3
2010-10-18 08:33:38 -07:00
Andreas Huber
fb47487259 am b04f356d: Merge "Include the framework copy of the OpenMAX headers instead of referencing external/opencore." into gingerbread
Merge commit 'b04f356d86eec74217fca8e3b85d801c4fcaa678' into gingerbread-plus-aosp

* commit 'b04f356d86eec74217fca8e3b85d801c4fcaa678':
  Include the framework copy of the OpenMAX headers instead of referencing external/opencore.
2010-10-15 18:25:14 -07:00
Andreas Huber
a4f391c9bf Include the framework copy of the OpenMAX headers instead of referencing external/opencore.
Change-Id: I762f59acf5e1f770e4d7c2d89af362bfffebefa6
related-to-bug: 3101573
2010-10-15 13:31:29 -07:00
Andreas Huber
a4a2a3aaef am 27c7fb1a: am 90d59d18: Merge "Metadata.cpp and Metadata.java had drifted out of sync. This change remedies that." into gingerbread
Merge commit '27c7fb1a861776b4fdc2632697e4e25eee83617f'

* commit '27c7fb1a861776b4fdc2632697e4e25eee83617f':
  Metadata.cpp and Metadata.java had drifted out of sync. This change remedies that.
2010-10-15 08:33:23 -07:00
Kenny Root
4a90f93781 resolved conflicts for merge of a127c07c to master
Change-Id: Ifdfc6681cba00f36456eaf7a97f34a75b9d0c086
2010-10-14 23:58:41 -07:00
Andreas Huber
27c7fb1a86 am 90d59d18: Merge "Metadata.cpp and Metadata.java had drifted out of sync. This change remedies that." into gingerbread
Merge commit '90d59d180bd963f00161e6bfaabfda432960cab6' into gingerbread-plus-aosp

* commit '90d59d180bd963f00161e6bfaabfda432960cab6':
  Metadata.cpp and Metadata.java had drifted out of sync. This change remedies that.
2010-10-13 15:50:27 -07:00
Andreas Huber
0c9b577e4d Metadata.cpp and Metadata.java had drifted out of sync. This change remedies that.
Change-Id: I48175666857ab0fb1519777bdb6f7f0b6b5cc599
related-to-bug: 3073955
2010-10-13 15:12:08 -07:00
Andreas Huber
a127c07c42 am 312644cd: Merge "Support for writing to MPEG2 transport stream files." into gingerbread
Merge commit '312644cdbb39522fe9cac028b15b907ce0e8e0f7' into gingerbread-plus-aosp

* commit '312644cdbb39522fe9cac028b15b907ce0e8e0f7':
  Support for writing to MPEG2 transport stream files.
2010-10-13 09:19:28 -07:00
Andreas Huber
9adf466021 Support for writing to MPEG2 transport stream files.
Change-Id: If3b7a807bc224a4b1cb2236537c3ebdc5aee0d97
2010-10-12 16:05:23 -07:00
Eric Laurent
329430a54e 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
2010-10-10 16:06:04 -07:00
Eric Laurent
4f21e517d0 am b37fcbfd: Merge "Added getter for session Id to AudioSink" into gingerbread
Merge commit 'b37fcbfd7f9d65b90b43e0242903030c5a6517b5' into gingerbread-plus-aosp

* commit 'b37fcbfd7f9d65b90b43e0242903030c5a6517b5':
  Added getter for session Id to AudioSink
2010-10-08 08:30:03 -07:00
Eric Laurent
b3bdf3f008 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
2010-10-07 18:23:03 -07:00
Eric Laurent
785c416ecf am de12c3cf: am 220ab887: Merge "Issue 3032913: improve AudioTrack recovery time" into gingerbread
Merge commit 'de12c3cf56e3f27b2efc60eeae8b5e422747f2b9'

* commit 'de12c3cf56e3f27b2efc60eeae8b5e422747f2b9':
  Issue 3032913: improve AudioTrack recovery time
2010-09-30 19:47:21 -07:00
Eric Laurent
de12c3cf56 am 220ab887: Merge "Issue 3032913: improve AudioTrack recovery time" into gingerbread
Merge commit '220ab8877b234e6807b7f6d9028ba55d23220301' into gingerbread-plus-aosp

* commit '220ab8877b234e6807b7f6d9028ba55d23220301':
  Issue 3032913: improve AudioTrack recovery time
2010-09-30 17:47:07 -07:00
Eric Laurent
4712baab81 Issue 3032913: improve AudioTrack recovery time
This issue showed that when an AudioTrack underruns during a too long period
of time and is therefore disabled by audioflinger mixer, it takes an additional
delay of up to 3 seconds to recover.
This fix adds a simple mechanism to recover immediately when the client application
is ready to write data again in the AudioTrack buffer

Also throttle warnings on record overflows

Change-Id: I8b2c71578dd134b9e60a15ee4d91b70f3799cb3d
2010-09-30 17:21:23 -07:00
Eric Laurent
3b8901946b am 1b37df95: am 9627847d: Merge "Fix error in AudioEffect command status reporting." into gingerbread
Merge commit '1b37df95ec9d03aaa5f4055c6cd86db42f9c9727'

* commit '1b37df95ec9d03aaa5f4055c6cd86db42f9c9727':
  Fix error in AudioEffect command status reporting.
2010-09-27 08:48:40 -07:00
Eric Laurent
1b37df95ec am 9627847d: Merge "Fix error in AudioEffect command status reporting." into gingerbread
Merge commit '9627847d588cd969f60dcc79d165209184a90069' into gingerbread-plus-aosp

* commit '9627847d588cd969f60dcc79d165209184a90069':
  Fix error in AudioEffect command status reporting.
2010-09-27 08:45:07 -07:00
Eric Laurent
4d3fb50782 Fix error in AudioEffect command status reporting.
AudioEffect::command() should not interpret the status
returned in pReplyData unless the command is ENABLE or
DISABLE.

Also fixed:
- bug in Visualizer::getWAveForm() status reporting.
- wrong initialization value for capture buffer in visualizer engine.

Change-Id: I60fb0011f9dba96ee74661dec1e8ef441edcaf35
2010-09-24 15:24:54 -07:00