4515 Commits

Author SHA1 Message Date
Gloria Wang
966f9e558d Merge "- 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." 2011-04-13 15:36:14 -07:00
Glenn Kasten
3220d0a1de am 8d2e14da: am 34cd123a: am b0d6f10e: Bug 4167061 remove debugging code
* commit '8d2e14daa752d657b9747fc9734fbfd7b34c1f7a':
  Bug 4167061 remove debugging code
2011-04-13 11:56:41 -07:00
Glenn Kasten
8d2e14daa7 am 34cd123a: am b0d6f10e: Bug 4167061 remove debugging code
* commit '34cd123a2ee1aa9d13d7eb9ee9c9dd5a1cea50a4':
  Bug 4167061 remove debugging code
2011-04-13 11:52:32 -07:00
Glenn Kasten
34cd123a2e am b0d6f10e: Bug 4167061 remove debugging code
* commit 'b0d6f10eedeef099164995d51dbd076a6fcc5acc':
  Bug 4167061 remove debugging code
2011-04-13 11:48:28 -07:00
Glenn Kasten
b0d6f10eed Bug 4167061 remove debugging code
Change-Id: I1cb46a7bbf885c72e75d32f3f7675d90ab611e85
2011-04-13 11:16:49 -07:00
Gloria Wang
162ee49e1c - 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
2011-04-13 11:11:34 -07:00
Elliott Hughes
dd66bcbf9d More native code cleanup.
Don't keep unused global references to classes, don't throw exceptions
when an exception is already pending, and fix a (harmless) misunderstanding
about how GetStringChars works.

Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820
2011-04-12 11:28:59 -07:00
Andreas Huber
3f9659a096 Merge "Experimental support for changing the video surface/texture on an active mediaplayer" 2011-04-12 09:25:32 -07:00
Andreas Huber
dfad483298 Merge "If the media extractor specifies an invalid thumbnail time, default to the first frame." 2011-04-12 08:36:59 -07:00
Elliott Hughes
a3804cf77f You don't need to poke around inside FileDescriptor manually.
We can help you with that.

Note also that getParcelFileDescriptorFD did no such thing. All its callers
were passing in a regular java.io.FileDescriptor and expecting the int. No
ParcelFileDescriptors involved.

Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
2011-04-11 17:04:01 -07:00
Glenn Kasten
4123211637 am a7e8385c: am 87ee132a: am c6c2285b: Enable HDCP debugging in Stagefright (1 of 2)
* commit 'a7e8385cb34a19e47fb67bf8f632a8b47503242d':
  Enable HDCP debugging in Stagefright (1 of 2)
2011-04-11 12:49:03 -07:00
Glenn Kasten
a7e8385cb3 am 87ee132a: am c6c2285b: Enable HDCP debugging in Stagefright (1 of 2)
* commit '87ee132ac5dd99564d4ad8f05631bbb021dbc0b0':
  Enable HDCP debugging in Stagefright (1 of 2)
2011-04-11 12:46:38 -07:00
Glenn Kasten
87ee132ac5 am c6c2285b: Enable HDCP debugging in Stagefright (1 of 2)
* commit 'c6c2285b36e83b96056e2404371cdf6e6f7acaee':
  Enable HDCP debugging in Stagefright (1 of 2)
2011-04-11 12:43:28 -07:00
Glenn Kasten
c6c2285b36 Enable HDCP debugging in Stagefright (1 of 2)
Change-Id: Ia3ea555d5fa45547ed6bfce59f299087ced7809c
2011-04-11 11:07:53 -07:00
Andreas Huber
87312e9a81 If the media extractor specifies an invalid thumbnail time, default to the first frame.
Change-Id: I96514fa661d26726b4562872a5ebe87be88db71e
related-to-bug: 3447147
2011-04-11 10:57:29 -07:00
Jason Simmons
6eb3c59cfe Merge "In the MP3 extractor, compute timestamps based on sample count instead of byte count. This fixes timestamp accuracy on VBR streams." 2011-04-11 10:43:41 -07:00
Elliott Hughes
7797e647fc Merge "Tidy up exception throwing in the media native code." 2011-04-08 18:37:01 -07:00
Jamie Gennis
0741b1ae22 am 0fb4e73f: am 3a9f5143: am 66380f76: Stagefright: authenticate ANativeWindow.
* commit '0fb4e73f5fd107b0ebd1c7a1a25dc40d99cf0705':
  Stagefright: authenticate ANativeWindow.
2011-04-08 17:43:33 -07:00
Elliott Hughes
15dd15fd57 Tidy up exception throwing in the media native code.
(I'm going through all of frameworks/base in multiple passes. This pass is just
for exception throwing.)

Change-Id: Ia14a5c720edae86ac780023be88e676aa1b3315d
2011-04-08 17:42:34 -07:00
Jamie Gennis
0fb4e73f5f am 3a9f5143: am 66380f76: Stagefright: authenticate ANativeWindow.
* commit '3a9f5143efe63b4b94a1bd1312e0ba618a58674f':
  Stagefright: authenticate ANativeWindow.
2011-04-08 17:41:38 -07:00
Jamie Gennis
3a9f5143ef am 66380f76: Stagefright: authenticate ANativeWindow.
* commit '66380f768c0de8bde1f54ac6ab3f126b66928dad':
  Stagefright: authenticate ANativeWindow.
2011-04-08 17:40:00 -07:00
Jamie Gennis
66380f768c Stagefright: authenticate ANativeWindow.
This change adds a check to verify that the ANativeWindow to which
decoded video buffers are queued sends those buffers to SurfaceFlinger.
The check is done when the buffer content is flagged as protected.  This
change also adds an error in the case where protected buffers are
needed, but an ANativeWindow is not being used as the video destination.

Change-Id: I107c9082d65ef0de4a13594e9535a2053ad5161b
Bug: 4269240
2011-04-08 15:24:10 -07:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
James Dong
5f3586e1ad Give PSP and QuickTime compatible mp4 files a chance to play
Change-Id: I2618946b242b581fb8ed5de9a13ede23a4191b11
related-to-bug: 4173290
2011-04-07 17:57:04 -07:00
Jason Simmons
293e03d868 In the MP3 extractor, compute timestamps based on sample count instead of byte count.
This fixes timestamp accuracy on VBR streams.

Change-Id: I73a30309536919cbeb5e5163f2f1340e2b9fa4b1
2011-04-07 17:16:04 -07:00
James Dong
c35f01dc0e Merge "Media JNI code cleanup" 2011-04-07 11:16:49 -07:00
James Dong
c371a02e7c Media JNI code cleanup
o Don't throw exception again because an exception was already thrown
o Check on return values from FindClass() and GetMethodID

Change-Id: Id92bb8228f1f0d2798d1cdf7de73cbb43816060b
related-to-bug: 4139926
2011-04-07 11:10:25 -07:00
Eric Laurent
b8da6cb5b2 Do not disable effect in AudioEffect destructor.
Current implementation of AudioEffect class destructor disables
the effect before disconnecting from IAudioEffect interface.
This is problematic when more than one client has a handle on the same
effect engine as destroying one handle will disable the effect which is
not the intended behavior.

Change-Id: I10eacf981506469a7ef4eb9a1650813f0848de5d
2011-04-07 09:41:46 -07:00
James Dong
4edf1d10d4 Return status code from invoke()
Change-Id: Ie64b418d2a1f44e07942399c285b460c68f8e14f
related-to-bug: 4199781
2011-04-06 21:33:03 -07:00
James Dong
ebabd09ae8 Merge "Handle the failure from GetStringUTFChars()" 2011-04-06 15:26:48 -07:00
Jean-Michel Trivi
d07f6a7934 Merge "Bug 4231349 fix error in javadoc for android.media.MediaPlayer" 2011-04-06 14:46:17 -07:00
Jean-Michel Trivi
ea763069b1 Bug 4231349 fix error in javadoc for android.media.MediaPlayer
In the javadoc for MediaPlayer.OnBufferingUpdateListener,
the percent parameter for onBufferingUpdate() is described as:
  the percentage (0-100) of the buffer that has been filled thus far

This is incorrect. This percentage is the ratio of (current position
+ content buffered) relative to the total duration.
Also buffering updates are only sent for progressive HTTP download.

Change-Id: I9f346a150b39fa1f7b17126119ecc0d7d27fbfbe
2011-04-06 14:42:18 -07:00
Glenn Kasten
85b65f2008 Merge "Miscellaneous code cleanup in audio framework" 2011-04-06 13:03:11 -07:00
James Dong
3977472d9f Handle the failure from GetStringUTFChars()
Change-Id: I9eb0f9f0fd2fa5116e7be80b1fa2ed4a95521b9d
related-to-bug: 4139926
2011-04-06 12:05:03 -07:00
Glenn Kasten
ed0079dddd 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
2011-04-06 10:24:18 -07:00
Brian Carlstrom
46e18c11d4 Don't use local ref for cached jclass reference in JNI code
Change-Id: Id45b2acb358a819f2fd332e99f3a095f6fc7299b
related-to-bug: 4241138
2011-04-06 10:04:20 -07:00
Mike Lockwood
b83dee77e2 Merge "MTP and media provider support for multiple storage devices:" 2011-04-05 13:36:49 -07:00
Mike Lockwood
b239b68376 MTP and media provider support for multiple storage devices:
- MTP support for multiple storage units

- Add storage_id column to media database for MTP storage ID

- Add framework resource for defining mount points and user visible descriptions
for multiple volumes

- Clean up locking in MtpServer JNI code

Change-Id: Iffb66ed156ef5bc80b14228af78fbacee7734360
2011-04-05 15:19:16 -04:00
Eric Laurent
ae29b7632e New fix for issue 4111672: control block flags
The first fix (commit 913af0b4) is problematic because it makes threads
in mediaserver process block on the cblk mutex. This is not permitted
as it can cause audio to skip or worse have a malicious application
prevent all audio playback by keeping the mutex locked.

The fix consists in using atomic operations when modifying the control
block flags.

Also fixed audio_track_cblk_t::framesReady() so that it doesn't block
when called from AudioFlinger (only applies when a loop is active).

Change-Id: Ibf0abb562ced3e9f64118afdd5036854bb959428
2011-04-05 12:05:41 -07:00
Andreas Huber
dc5ba0451c Merge "This reverts an earlier change 4aeec2da39fce4de9b07b694d59fd308ffb3d491" 2011-04-04 12:45:23 -07:00
Andreas Huber
c6e3b27fa1 This reverts an earlier change 4aeec2da39fce4de9b07b694d59fd308ffb3d491
Instead of returning 0-filled buffers after EOS from AudioTrack we do this
work in AudioOutput instead. That way the EOS signal (0 frames returned)
is preserved in AudioCache which otherwise would lead to a heap size overflow
filling everything with zeroes.

Change-Id: I7e07429ba887957a4340dd4b21eef4bba76248cd
related-to-bug: 3514073
2011-04-04 11:43:40 -07:00
Andreas Huber
8e64c31f6c Avoid a race condition while signaling audio EOS/seek complete by acquiring the lock.
Change-Id: Idfea452ff661b264e013fe515bcd2a2762bd959c
related-to-bug: 4193552
2011-04-04 11:29:35 -07:00
James Dong
55311e8d13 Merge "ISurfaceTexture does not have a method getIdentity()" 2011-04-01 14:06:56 -07:00
Andreas Huber
1aebc47141 Merge "Remove legacy hack to only drop frames every other late frame" 2011-04-01 14:02:06 -07:00
Andreas Huber
5e9c3de539 Merge "Fix a webm-seek issue introduced when adding support for streaming webm" 2011-04-01 14:01:09 -07:00
Andreas Huber
21796929d3 Fix a webm-seek issue introduced when adding support for streaming webm
Change-Id: I52ec841832077603ee035f7a648316349513e978
related-to-bug: 4199894
2011-04-01 13:36:53 -07:00
James Dong
a93f84e067 ISurfaceTexture does not have a method getIdentity()
Change-Id: I81e6b0335747bd5c2c4b15c9f8c99100842a06c1
2011-04-01 13:29:27 -07:00
Andreas Huber
2334d82073 Remove legacy hack to only drop frames every other late frame
Change-Id: I197e568d292341c330efb394c41aa9af0e74b081
related-to-bug: 4203195
2011-04-01 13:27:42 -07:00
Mike Lockwood
8538149572 am 1c56976a: am 38f04c0f: am 11dd5ae9: Improve Javadoc for USB Manager and MTP/PTP support.
* commit '1c56976a774434bd279b6181c4fc3c555c4648c2':
  Improve Javadoc for USB Manager and MTP/PTP support.
2011-04-01 11:38:52 -07:00
Mike Lockwood
1c56976a77 am 38f04c0f: am 11dd5ae9: Improve Javadoc for USB Manager and MTP/PTP support.
* commit '38f04c0f28fc59bc7e893ca6a1ffc4d0745ab8c2':
  Improve Javadoc for USB Manager and MTP/PTP support.
2011-04-01 11:37:05 -07:00