5155 Commits

Author SHA1 Message Date
Andreas Huber
115cac8131 Various improvements to nuplayer playback
- Drastically cut down the number of times we supply the AudioSink with data
by estimating the time until the sink would run out of data and then scheduling
a refill in advance of that.

- Use a dedicated looper for video decoders since they are currently taking
too long to return from OMX_FillThisBuffer (bug 5325201)

- Revise thread priorities for the OMX dispatcher and software codecs, instead
of running them at ANDROID_PRIORITY_AUDIO, they now only run at
ANDROID_PRIORITY_FOREGROUND

- Since threads created by pthread_create inherit all of the parent threads
attributes including thread priority, briefly reset thread priority to
ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then
restore it.

Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
2011-09-16 10:44:02 -07:00
Gloria Wang
152f7b3985 Merge "If media player has died already, do not dec the old surface texture reference. Otherwise segfault will occur. For bug 5327664." 2011-09-15 16:56:41 -07:00
Gloria Wang
e828beb386 If media player has died already, do not dec the old surface texture reference.
Otherwise segfault will occur.
For bug 5327664.

Change-Id: I03ea7bc047aa99a106f1e010dac74f75a833ef84
2011-09-15 15:36:02 -07:00
Gloria Wang
b107c628ba Merge "Do not need to reset surface as NULL in MediaPlayer's _release. Related to bug 5252296." 2011-09-15 10:16:00 -07:00
James Dong
1318864fa7 Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications" 2011-09-14 17:42:22 -07:00
Gloria Wang
d59310d086 Do not need to reset surface as NULL in MediaPlayer's _release.
Related to bug 5252296.

Change-Id: Ieab063cee70e072fcc4d861abe0f7979a7bab1ec
2011-09-14 14:24:27 -07:00
Rajneesh Chowdury
2424c93d84 Merge "Fix for bug 5309242 [Prime] VideoEditorAPITest testVideoContentHD failed" 2011-09-14 14:01:36 -07:00
Rajneesh Chowdury
3f43e7d37f Fix for bug 5309242 [Prime] VideoEditorAPITest testVideoContentHD failed
Change-Id: Ibd52a3bda8e1cb17f1c110cc219f2c71a46e5122
2011-09-14 12:37:02 -07:00
Eric Laurent
16066ec591 Merge "Issue 5044873: Pb with BT SCO AudioManager API" 2011-09-14 09:18:23 -07:00
Jean-Michel Trivi
e83f771f0a Merge "Bug 5300223 RemoteControlClient uses PendingIntent" 2011-09-14 09:05:36 -07:00
Eric Laurent
d7454be47f Issue 5044873: Pb with BT SCO AudioManager API
Do not identify the SCO connection client by the binder interface
passed when starting the connection as this binder changes if the
AudioManager proxy changes. Use the client PID instead.

This solves an issue with gTalk starting a SCO connection from one
AudioManager proxy and then changing audio mode from another thus
terminating the previously started SCO connection.

Change-Id: Ia3067fecc551fc15df3bf75ce0c43d181859e4f0
2011-09-14 08:45:58 -07:00
Jean-Michel Trivi
6e920e6dac Bug 5300223 RemoteControlClient uses PendingIntent
API change so RemoteControlClient is given a PendingIntent in
 its constructor, which will be used for receiving media button
 events from remote controls.
Leave the old constructors (but hidden) to not break
 current functionality until the AudioManager and AudioService
 implementations have been updated.

Change-Id: Ifa12c8036c948931adc386a827dce2936788e1cd
2011-09-13 19:27:20 -07:00
Eric Laurent
3f0c821740 Merge "Issue 5298399: Lost speech after a crash in gTalk." 2011-09-13 17:50:31 -07:00
Eric Laurent
7e8626fd75 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
2011-09-13 17:33:29 -07:00
Dianne Hackborn
48c5fb1493 API review: Metadata class not used.
The Metadata class doesn't actually seem to be used with anything
in the SDK, and the API probably needs some work, so hide it.

Change-Id: Ifecf49130b90cbb4c588ad8104f1e7957978f789
2011-09-13 16:24:45 -07:00
Andreas Huber
bf208ec91e Merge "Support .avi tracks that have a sample size of 1, i.e. samples != chunks" 2011-09-13 11:37:22 -07:00
Andreas Huber
63749954aa Support .avi tracks that have a sample size of 1, i.e. samples != chunks
Assume for now that all chunks are the same size, i.e. have the same number of
samples.

Change-Id: Ib8a7dfeb16cc3e5be199ff9d98b68dd0b9c23eb8
related-to-bug: 5279872
2011-09-13 11:12:57 -07:00
James Dong
0209da1cb1 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
2011-09-13 11:00:17 -07:00
Andreas Huber
fa6dfdcfd7 Don't post position updates too frequently
i.e. don't hog my message queue.

related-to-bug: 5284760
Change-Id: I8e2d36a11dbee1567b18ed13dc5257a65c6eeda7
2011-09-13 09:48:22 -07:00
Andreas Huber
7fc8f515a0 Merge "Turn an another assertion into a runtime error in ACodec's implementation" 2011-09-12 14:21:42 -07:00
Andreas Huber
d41108c91f Turn an another assertion into a runtime error in ACodec's implementation
Change-Id: I6779b29f200b90d088273ab3204724ef3d8d59bd
related-to-bug: 5284760
2011-09-12 14:14:08 -07:00
Andreas Huber
f8c84b3434 Increase the avi extractor's confidence slighly over mp3's
So that we don't accidentally identify a .avi file containing an mp3 track as
an mp3 file.

Change-Id: I73495b80cbb5bc1007bf810f2db453c9f175171b
related-to-bug: 5288189
2011-09-12 13:49:00 -07:00
Devaraj Rangasamy
d8f7c2c2dc MTS Recorder Test: Use VideoFrameRate from Device Camcorder Profile
MTS tests have hardcoded video framerates.
MTS can query the video framerate supported by device via
Camcorder profiles and use.

Change-Id: I61666df6af58eaba46f7366521cc114184cb4ac5
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
2011-09-09 17:22:24 -07:00
James Dong
4cf9a3b857 Merge "Fix another hardcoded frame rate in the media framework test" 2011-09-09 15:50:39 -07:00
Guang Zhu
973f553be4 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
2011-09-09 15:36:42 -07:00
James Dong
6f84da50ad Merge "Don't check mFilledBuffers whether it is empty or not when the port reconfiguration is not meant for buffer reallocation" 2011-09-09 14:56:30 -07:00
James Dong
4a0c91fc50 Don't check mFilledBuffers whether it is empty or not when the port reconfiguration is not meant for buffer reallocation
Change-Id: Iee9b18449bce9d7565ab5cc7f9e999484051196c
related-to-bug: 5233843
2011-09-09 13:27:27 -07:00
Marco Nelissen
02ea7d4877 Merge "Fix bug 5045498 Unhide Remote Control Client API" 2011-09-09 08:44:19 -07:00
Eric Laurent
ebf6478f55 Merge "Fix issue 4673378: switching from VoIP to GSM call" 2011-09-09 08:27:04 -07:00
Chih-Chung Chang
a18886ca08 Fix 5278371: OOM in MediaItemThumbnailTest
Because we request 400x240 thumbnails. 100 thumbnails needs 38M,
which is too much. Change it to 70 now.

Also handle the case if the thumbnail callback throws exception.

Change-Id: Iac4ee72f308b7c7a6ae860983197601cf89bee8f
2011-09-09 13:58:59 +08:00
Eric Laurent
9f103de83f Fix issue 4673378: switching from VoIP to GSM call
The problem is that any app can change the audio mode and override
a mode previously set by another app. If two apps (gTalk and Phone) compete
for audio mode ownership, there is no mechanism to maintain coherency
in the actual audio mode selected.

Added a mechanism in AudioService to manage an audio mode request stack.
Any app requesting a mode different from NORMAL enters at the top of the stack
and the requested mode is applied. When an app sets mode back to NORMAL, it exits
the stack and the new mode corresponding to the request at the top of the
stack (if any) is applied.

Change-Id: I68d1755d0922f680df4a19bfc5ab924f5a5d8ccd
2011-09-08 19:23:56 -07:00
Eric Laurent
11e2e5dece Merge "AudioTrack: extend callback thread sleep time" 2011-09-08 16:07:40 -07:00
Pannag Sanketi
5303254cc9 Merge "Always set geometry in queuebuffer" 2011-09-08 15:33:31 -07:00
Eric Laurent
f1d360ac86 AudioTrack: extend callback thread sleep time
Do not force wake up the AudioTrack thread every 10ms if no timed
events (loop, markers..) have to be processed.
This will help reduce power consumption.

Change-Id: Icb425b13800690008dd07c27ffac84739e3dbba3
2011-09-08 15:18:37 -07:00
Pannag Sanketi
e46fcef278 Always set geometry in queuebuffer
The queuebuffer could return early due to timestamp issues. Need to set
the geometry even in that case.

Change-Id: I04d7cd1df3996d640c269285398c0042923ba920
2011-09-08 14:16:55 -07:00
Andreas Huber
8458447162 Audio player must not be used as a timesource before it's started.
Otherwise it'll trigger a division-by-zero exception since the audio sample rate
is as yet unknown.

Change-Id: I0793aa7c1c348ffa2611272bb646eff6ecf6ff53
related-to-bug: 5242451
2011-09-08 11:33:47 -07:00
Chih-Chung Chang
70ad1c378b Merge "Fix 5156702: rotate thumbnails" 2011-09-08 05:52:44 -07:00
James Dong
b05a600352 Fix another hardcoded frame rate in the media framework test
Change-Id: I7d7f9d0812a0228dbf924084a32dbede0338b421
related-to-bug: 5264298
2011-09-07 19:31:24 -07:00
Glenn Kasten
65e7815dd4 Merge "Bug 5270905 fix MediaPlayer with IStreamSource" 2011-09-07 14:56:47 -07:00
Glenn Kasten
27f4bbb676 Bug 5270905 fix MediaPlayer with IStreamSource
Change-Id: Ia8a6381a6c88b4a0a1378aab03f5275f0fa1125a
2011-09-07 14:42:37 -07:00
Pannag Sanketi
166c1b2e7a Merge "Fixing bug in SurfaceMediaSource_test" 2011-09-07 14:18:41 -07:00
Andreas Huber
089d3e3f14 Apparently keyframe status in audio tracks of .webm/.mkv files is unreliable
fortunately in all our supported audio encodings we can treat every frame as
a keyframe.

Change-Id: I32f21d0077bbae7ef9efe725dd351baf531179e2
related-to-bug: 5263837
2011-09-07 11:05:43 -07:00
Andreas Huber
01dba603d7 Merge "Stop metadata retriever from dereferencing a NULL pointer if" 2011-09-07 09:05:04 -07:00
Marco Nelissen
4880a736dc Merge "Fix startBluetoothSco race" 2011-09-07 07:55:00 -07:00
Chih-Chung Chang
47a52158d2 Fix 5156702: rotate thumbnails
Change-Id: I97b51dadf129172d5b154e9dfd66da254e4559d7
2011-09-07 19:20:45 +08:00
James Dong
ccccb505ab Merge "Use device-dependent frame rate in the media recorder performance test" 2011-09-07 04:07:39 -07:00
James Dong
30856a76dc Revert "To make SniffMP3() more concrete so that we can remove false-positve responses from MPEG-PS streams."
This reverts commit 983ab88e117fcbda9370b8f4ba94271d37149672.

related-to-bug: 5231309
2011-09-06 19:18:43 -07:00
James Dong
a985135daa Use device-dependent frame rate in the media recorder performance test
Change-Id: I778eca69c4acb9842f600c6ae23e7a89fb2e55f4
related-to-bug: 5264298
2011-09-06 19:15:48 -07:00
Marco Nelissen
671db6f3ba Fix startBluetoothSco race
Change-Id: I8b711bd3c6b12f2e3e92144c0dadac72261bf914
2011-09-06 16:51:21 -07:00
Andreas Huber
612e16191a Stop metadata retriever from dereferencing a NULL pointer if
the media extractor failed to initialize (malformed or unsupported content)

Change-Id: Icfad4e9eeb8d6713ad12eee7979ab30b696c06e0
related-to-bug: 5263840
2011-09-06 16:05:02 -07:00