OSDN Git Service

android-x86/frameworks-av.git
12 years agoAdd NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec and libstagefri...
James Dong [Wed, 13 Jun 2012 00:40:43 +0000 (17:40 -0700)]
Add NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec and libstagefright_soft_vpxdec

Change-Id: Id4f1ef8dfc21731846a9862b8d12940a92fe99bb
related-to-bug: 6647465

12 years agoMerge "Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor" into jb-dev
James Dong [Tue, 12 Jun 2012 21:20:44 +0000 (14:20 -0700)]
Merge "Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor" into jb-dev

12 years agoAdd NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor
James Dong [Tue, 12 Jun 2012 20:51:12 +0000 (13:51 -0700)]
Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor

Change-Id: I19308c5fb0f39f8e696092186f4386e3dad06894
related-to-bug: 6647465

12 years agoMerge "Update make file" into jb-dev
Dave Burke [Tue, 12 Jun 2012 19:23:20 +0000 (12:23 -0700)]
Merge "Update make file" into jb-dev

12 years agoUpdate make file
Dave Burke [Tue, 12 Jun 2012 17:41:14 +0000 (10:41 -0700)]
Update make file

Change-Id: I7dbd128245f584df2689457df0dd12ce888cf8ef

12 years agoMerge "Fix gapless for deep buffers" into jb-dev
Marco Nelissen [Tue, 12 Jun 2012 14:52:30 +0000 (07:52 -0700)]
Merge "Fix gapless for deep buffers" into jb-dev

12 years agoFix gapless for deep buffers
Marco Nelissen [Tue, 12 Jun 2012 00:00:59 +0000 (17:00 -0700)]
Fix gapless for deep buffers

Forward current flags to next output.
b/6645676

Change-Id: I584f7a67472d99cbd6bc38f3fe84763331d115d1

12 years agoMerge "Fix gapless playback" into jb-dev
Marco Nelissen [Mon, 11 Jun 2012 23:04:56 +0000 (16:04 -0700)]
Merge "Fix gapless playback" into jb-dev

12 years agoFix gapless playback
Marco Nelissen [Mon, 11 Jun 2012 21:52:53 +0000 (14:52 -0700)]
Fix gapless playback

On some devices the actual framecount per buffer of an AudioTrack
will be different than what was requested, which prevented the
track from being reused. Now we create a new AudioTrack with the
requested parameters, and then compare it to the track we already
have. If they match, we throw away the new track and reuse the
existing one.
b/6644559

Change-Id: Id3e8c4460436f52e59b98ecaeb01c94f02877c1d

12 years agoMerge "Revert "Added some informational log messages to track down ANR related issues...
James Dong [Mon, 11 Jun 2012 20:35:06 +0000 (13:35 -0700)]
Merge "Revert "Added some informational log messages to track down ANR related issues"" into jb-dev

12 years agoAdd audio watchdog thread
Glenn Kasten [Wed, 30 May 2012 21:52:57 +0000 (14:52 -0700)]
Add audio watchdog thread

Change-Id: I4ed62087bd6554179abb8258d2da606050e762c0

12 years agoRevert "Added some informational log messages to track down ANR related issues"
James Dong [Mon, 11 Jun 2012 17:49:55 +0000 (10:49 -0700)]
Revert "Added some informational log messages to track down ANR related issues"

This reverts commit c558fa89016ba9583049b84dc57e66a913cabde8.

related-to-bug: 6565826

12 years agoMerge "Fix green or corrupted video frames in the exported movies" into jb-dev
James Dong [Fri, 8 Jun 2012 19:37:50 +0000 (12:37 -0700)]
Merge "Fix green or corrupted video frames in the exported movies" into jb-dev

12 years agoReduce underruns in screen off, esp. with EQ
Glenn Kasten [Thu, 7 Jun 2012 17:17:54 +0000 (10:17 -0700)]
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

12 years agoFix green or corrupted video frames in the exported movies
James Dong [Tue, 5 Jun 2012 02:07:28 +0000 (19:07 -0700)]
Fix green or corrupted video frames in the exported movies

At least two use cases are affected: trimming and transition clip generation.

If the starting time of the transition or the trimming position is not the same as
that of any existing video frame, the video frame right before the transition
starting position or the trimming position must be encoded as the the first video
frame for the transtion or the trimmed video, and it is encoded as a key frame.
This frame was not saved without the patch.

In the transcoding phrase, since we could not find such a frame, the existing
code did not return an error, and incorrectly used some other frame to serve
as the reference key frame for the remaining video frames of the transition or
the trimmed video. As a result, we may see corrupted or green video frames in
the exported movies.

The fix is to always save the frame right before the trimming position or
the transition starting time, so that a key frame will always be encoded, and
the right reference frame is used for remaining video frames. In addition,
checks are added to prevent from future mistakes to use incorrect reference frames.

Patch was originally contributed by teng.hong@nxp.com

Change-Id: I182784d4c1786224445224634edab3338bf2278f
related-to-bug: 5713461

12 years agoaudioflinger: fix duplicating thread standby
Eric Laurent [Fri, 8 Jun 2012 00:16:09 +0000 (17:16 -0700)]
audioflinger: fix duplicating thread standby

The code that waits for a track presentation to be complete
before disabling it caused a regression for duplicating threads.
Because of the way output tracks activity is managed, the number
of frames output by the duplicating thread would never
reach the target set for a track to be considered presented.
The track would not be removed from active list and the thread would
not go to standby and keep its wakelock held.

Bug 6606922.

Change-Id: I4b46b420ac4cbf79a86b6791ae6589d407b01c92

12 years agoMerge "Take latency and current time into account for visualization" into jb-dev
Marco Nelissen [Thu, 7 Jun 2012 18:08:15 +0000 (11:08 -0700)]
Merge "Take latency and current time into account for visualization" into jb-dev

12 years agoTake latency and current time into account for visualization
Marco Nelissen [Wed, 6 Jun 2012 16:52:31 +0000 (09:52 -0700)]
Take latency and current time into account for visualization

Buffer more data, and return the data that is currently being
output from the audio output, to ensure that visualizations are
smooth and responsive even when the audio output has a large
latency and/or large buffers.
b/6522728

Change-Id: I401637f01be7600b3c594a55c869036c13b206c0

12 years agoaudioflinger: modify fast mixer overrun management
Eric Laurent [Wed, 6 Jun 2012 01:12:11 +0000 (18:12 -0700)]
audioflinger: modify fast mixer overrun management

Do not force sleep when an overrun occurs. This was for non
blocking audio HAL and is unused.
Keep statistics on overruns.

Bug 6605215.

Change-Id: I295455d4562201aa3814c88bdd6e52c9226712af

12 years agoaudioflinger: various fixes on direct output
Eric Laurent [Wed, 2 May 2012 02:31:12 +0000 (19:31 -0700)]
audioflinger: various fixes on direct output

Various fixes in direct output playback thread implementation:
- threadLoop_write() was broken for playback threads that do not
use a pipe sink.
- output buffer size calculation was hard coded for stereo.
- removed software volume that was implemented for PCM stereo
format only: the audio HAL has to implement volume if needed
for direct outputs.

Change-Id: If211b4489be9af395435707b8cf0388cce1347b2

12 years agoaudioflinger: fix active sleep time calculation.
Eric Laurent [Mon, 4 Jun 2012 20:45:29 +0000 (13:45 -0700)]
audioflinger: fix active sleep time calculation.

When an audioTrack underruns, the audioflinger mixer thread
sleeps for a certain time to give the app a chance to recover.
This time is based on the reported audio HAL latency.
Some audio HALs implementing deep buffering have a variable
latency and this creates a problem if the sleep time is cached
when the output stream is opened and not updated afterwards.

This change derives the active sleep time from the mix buffer
framecount instead of the latency. This is more conservative
but works for variable latency.

Bug 6588525.

Change-Id: Ia892fc290fe06f836565c3ae15f7a2ce026c88c6

12 years agoState queue dump
Glenn Kasten [Thu, 31 May 2012 20:40:27 +0000 (13:40 -0700)]
State queue dump

Bug: 6591648
Change-Id: Iac75e5ea64e86640b3d890c46a636641b9733c6d

12 years agoFast track dumpsys
Glenn Kasten [Thu, 31 May 2012 14:43:43 +0000 (07:43 -0700)]
Fast track dumpsys

Bug: 6591648
Change-Id: I696f51c682e7233ba690d97da26012084989b412

12 years agoCount underruns for normal tracks also
Glenn Kasten [Thu, 31 May 2012 21:59:29 +0000 (14:59 -0700)]
Count underruns for normal tracks also

Bug: 6591648
Change-Id: Iff9cabe392bb2ce97062603adb9c9dc7aa4170d5

12 years agoMerge "Was calculating measured warmup time wrong" into jb-dev
Glenn Kasten [Sun, 3 Jun 2012 21:40:55 +0000 (14:40 -0700)]
Merge "Was calculating measured warmup time wrong" into jb-dev

12 years agoMerge "Fix fast track leak if out of normal track names" into jb-dev
Glenn Kasten [Fri, 1 Jun 2012 18:06:28 +0000 (11:06 -0700)]
Merge "Fix fast track leak if out of normal track names" into jb-dev

12 years agoMerge "Pipe throttle based on requested frame count" into jb-dev
Glenn Kasten [Fri, 1 Jun 2012 18:04:43 +0000 (11:04 -0700)]
Merge "Pipe throttle based on requested frame count" into jb-dev

12 years agoWas calculating measured warmup time wrong
Glenn Kasten [Fri, 1 Jun 2012 17:49:51 +0000 (10:49 -0700)]
Was calculating measured warmup time wrong

Bug: 6592923
Change-Id: I980c6fc69d78c569147ea44ce33a7f8a41739c91

12 years agoPart of fix for double spins & faster startup
Jeff Tinker [Fri, 1 Jun 2012 04:48:59 +0000 (21:48 -0700)]
Part of fix for double spins & faster startup

This change alters the way that the media player
interacts with the Widevine adaptive streaming buffer
logic.  It eliminates the reliance on cached buffer
duration to determine pause/play states and instead
only generates buffering events when the widevine
library is not producing data (i.e. when it is
buffering).  This eliminates unnecessary pause and
rebuffer cycles, reducing startup time and the
frequency and duration of spinners.

Multi-repo commit, depends on related changes in vendor/widevine

Change-Id: I387db2decd83841775a8351bddf5a6381fe4104f
related-to-bug:6503294
related-to-bug:6463780

12 years agoMerge "Do not keep audio wake lock when apps underrun." into jb-dev
Eric Laurent [Fri, 1 Jun 2012 02:56:21 +0000 (19:56 -0700)]
Merge "Do not keep audio wake lock when apps underrun." into jb-dev

12 years agoFix another buffer overflow issue
James Dong [Thu, 31 May 2012 20:06:53 +0000 (13:06 -0700)]
Fix another buffer overflow issue

Using hard-coded length value easily leads to buffer overflow.
Refactor the code a bit to make it more readable, and more
extensible, and less subject to the buffer overflow coding error.

Patch originally contributed by teng.hong@nxp.com

Change-Id: Id262915302ccea8ae3b0121bf39890ab463aeeb7
related-to-bug: 6328360

12 years agoFix fast track leak if out of normal track names
Glenn Kasten [Wed, 30 May 2012 17:32:06 +0000 (10:32 -0700)]
Fix fast track leak if out of normal track names

Bug: 6580402
Change-Id: I3ac7f012062c35833147f47ba822eb4bf532a824

12 years agoDo not keep audio wake lock when apps underrun.
Eric Laurent [Thu, 31 May 2012 21:27:14 +0000 (14:27 -0700)]
Do not keep audio wake lock when apps underrun.

Do not automatically restart an AudioTrack after an underrun
if the callback is executed but no data is written by the app.

Bug 6541286.

Change-Id: I11e7ab8dc968d7ff087058fec68f44490d3a7731

12 years agoAvoid prematurely terminating parsing when some track only has a single access unit
James Dong [Thu, 31 May 2012 00:34:24 +0000 (17:34 -0700)]
Avoid prematurely terminating parsing when some track only has a single access unit

Patch was contributed by teng.hong@nxp.com

Change-Id: I0f56361d839f18627e512d18e86f51b58b9b0e05
related-to-bug: 6240789

12 years agoPipe throttle based on requested frame count
Glenn Kasten [Wed, 30 May 2012 23:34:17 +0000 (16:34 -0700)]
Pipe throttle based on requested frame count

Now does throttling based on the requested frame count, but
still permits overfilling pipe up to the rounded-up frame count.
Also still uses the larger frame count for non-blocking arithmetic.

Bug: 6585323
Change-Id: Ic2420a071419905524a14c22ebe1ce0e32d70a9d

12 years agoMerge "audioflinger: fix effect problem during underrun" into jb-dev
Eric Laurent [Wed, 30 May 2012 21:07:38 +0000 (14:07 -0700)]
Merge "audioflinger: fix effect problem during underrun" into jb-dev

12 years agoOnly send port settings changed if the number of channels and sample rate are both...
James Dong [Wed, 30 May 2012 17:26:31 +0000 (10:26 -0700)]
Only send port settings changed if the number of channels and sample rate are both known to be valid.

Change-Id: I9f8813eedc95db202488d8860cf485bdb8e69e11
related-to-bug: 6553089

12 years agoaudioflinger: fix effect problem during underrun
Eric Laurent [Wed, 30 May 2012 19:30:29 +0000 (12:30 -0700)]
audioflinger: fix effect problem during underrun

When an audio track underruns, the input buffer of the
corresponding effect chain (if any) must be cleared, otherwise
audio from previous mixer run will be fed again to the effect process
function.

Bug 6551652.

Change-Id: I5cd02196745f756c85af82d6937e9dc54369b37f

12 years agoMerge "Precautionary logging to identify a potential infinite loop." into jb-dev
Dave Burke [Wed, 30 May 2012 00:29:33 +0000 (17:29 -0700)]
Merge "Precautionary logging to identify  a potential infinite loop." into jb-dev

12 years agoPrecautionary logging to identify a potential infinite loop.
Dave Burke [Tue, 29 May 2012 23:41:49 +0000 (16:41 -0700)]
Precautionary logging to identify  a potential infinite loop.

Bug: 6571063
Change-Id: I433659c6da333d5acd25ad03cb7f4a6ab0b6a4a5

12 years agoAdded some informational log messages to track down ANR related issues
James Dong [Tue, 29 May 2012 21:10:05 +0000 (14:10 -0700)]
Added some informational log messages to track down ANR related issues

Change-Id: Ie991c86e75d58f7eb4c9f524815c4de054d5f262
related-to-bug: 6565826

12 years agoMerge "DO NOT MERGE: Minimal fix for takePicture/previewCallback deadlock" into jb-dev
Eino-Ville Talvala [Tue, 29 May 2012 20:39:41 +0000 (13:39 -0700)]
Merge "DO NOT MERGE: Minimal fix for takePicture/previewCallback deadlock" into jb-dev

12 years agoMerge "Unwedge ACodec if allocating output buffers fails while reconfiguring." into...
Andreas Huber [Tue, 29 May 2012 18:36:08 +0000 (11:36 -0700)]
Merge "Unwedge ACodec if allocating output buffers fails while reconfiguring." into jb-dev

12 years agoUnwedge ACodec if allocating output buffers fails while reconfiguring.
Andreas Huber [Tue, 29 May 2012 18:33:29 +0000 (11:33 -0700)]
Unwedge ACodec if allocating output buffers fails while reconfiguring.

Change-Id: I871cf639167c01860e65c0408d3ce935f8f8f1ea
related-to-bug: 6571060

12 years agoDO NOT MERGE: Minimal fix for takePicture/previewCallback deadlock
Eino-Ville Talvala [Tue, 29 May 2012 18:17:48 +0000 (11:17 -0700)]
DO NOT MERGE: Minimal fix for takePicture/previewCallback deadlock

- Caused by already held lock in camera service

- Introduce one more lock, mICameraLock, to control access to camera
  client through ICamera binder interface.

- mLock is released before calling HAL takePicture, allowing HAL
  callbacks to access camera client during takePicture processing.

Bug: 5804701
Change-Id: Ibcef4857a2c844c964afefa70f9cdccdd0a55fd0

12 years agoForce shutdown of the omx decoder even if it's in a wedged state...
Andreas Huber [Tue, 29 May 2012 17:37:15 +0000 (10:37 -0700)]
Force shutdown of the omx decoder even if it's in a wedged state...

Change-Id: I5899928a3df4bcf7715769992955a0b834db1e2f
related-to-bug: 6571060

12 years agoMerge "Property to enable AAC 5.1 pass-through." into jb-dev
Dave Burke [Fri, 25 May 2012 17:02:32 +0000 (10:02 -0700)]
Merge "Property to enable AAC 5.1 pass-through." into jb-dev

12 years agoProperty to enable AAC 5.1 pass-through.
Dave Burke [Wed, 23 May 2012 07:00:53 +0000 (00:00 -0700)]
Property to enable AAC 5.1 pass-through.

Bug: 6275957
Change-Id: I8debdce872fc8287a4f6340f1790e02c075886e3

12 years agoMerge "Prevent occurences of clipping in loud downmixed scenes" into jb-dev
Jean-Michel Trivi [Fri, 25 May 2012 15:38:53 +0000 (08:38 -0700)]
Merge "Prevent occurences of clipping in loud downmixed scenes" into jb-dev

12 years agoFix an error caused by sample size value by order
James Dong [Thu, 24 May 2012 22:05:12 +0000 (15:05 -0700)]
Fix an error caused by sample size value by order

The sample size was saved in the array in network order, but it was treated as host order when
writeInt32() is called. Calling write(void *, int, int) resolves the issue.

related-to-bug: 6555366

Change-Id: If7ef99911ad65108c61b533673ac4d4cd580a370

12 years agoPrevent occurences of clipping in loud downmixed scenes
Jean-Michel Trivi [Thu, 24 May 2012 17:11:07 +0000 (10:11 -0700)]
Prevent occurences of clipping in loud downmixed scenes

The downmixer effect is a mixer, wich, like the platform mixer,
  hard-clips. To prevent clipping during loud scenes across multiple
  chanels, apply a fixed attenuation on the result of the downmix.
  Note that this attenuation is lower the theoretical required
  attenuation (except for quad and surround) but is adequate for
  most content.

Bug 4280902
Change-Id: Iec520e9f1367284d6102633f532429361717692d

12 years agoaudioflinger: change session check in createTrack.
Eric Laurent [Thu, 24 May 2012 18:07:14 +0000 (11:07 -0700)]
audioflinger: change session check in createTrack.

Do not refuse to create a track on an output thread if the same session
is present on another thread. It is now possible that two tracks
with the same session ID are on different threads if one can use deep
buffering and the other can't.

In this case, move effects attached to this session to the output
thread ion which the new track is created.

Bug 6530324.

Change-Id: I9019b3ee382e374c89d2319033afcfa7f886e4c4

12 years agoaudioflinger: refine latency latency calculation.
Eric Laurent [Wed, 23 May 2012 01:55:44 +0000 (18:55 -0700)]
audioflinger: refine latency latency calculation.

There is an audio pipe between the normal mixer output and the fast
mixer to cope for scheduling delays and buffer size difference.
This pipe depth was not taken into account in latency calculation.

Adding the pipe contribution to the latency significantly improves A/V sync.

Bug 6520569.

Change-Id: I5584908e8aa8a02170eb38b22b4370eea800a235

12 years agoMerge "Tell surface flinger that we want to protect output buffers from being" into...
Andreas Huber [Tue, 22 May 2012 20:48:59 +0000 (13:48 -0700)]
Merge "Tell surface flinger that we want to protect output buffers from being" into jb-dev

12 years agoTell surface flinger that we want to protect output buffers from being
Andreas Huber [Tue, 22 May 2012 19:55:03 +0000 (12:55 -0700)]
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

12 years agoMerge "Keep a copy of most recent audio played" into jb-dev
Glenn Kasten [Tue, 22 May 2012 19:13:58 +0000 (12:13 -0700)]
Merge "Keep a copy of most recent audio played" into jb-dev

12 years agoOnly mark the audio player as started if it did so successfully.
Andreas Huber [Tue, 22 May 2012 17:51:06 +0000 (10:51 -0700)]
Only mark the audio player as started if it did so successfully.

Change-Id: I4683f5ca243f9f1b80990028d225d0f6c5973899
related-to-bug: 6500580

12 years agoRevert "Stop audio source if AudioPlayer could not be started"
Andreas Huber [Tue, 22 May 2012 17:03:57 +0000 (10:03 -0700)]
Revert "Stop audio source if AudioPlayer could not be started"

This reverts commit 022048e95f3f1d65cb776cf21de2001423fcf7d9.

12 years agoRevert "Revert to PV for AAC codec for FactoryROM."
Dave Burke [Tue, 22 May 2012 04:18:22 +0000 (21:18 -0700)]
Revert "Revert to PV for AAC codec for FactoryROM."

This reverts commit d7d79a2bbf38d1d19ec7cc8d6a514fc999b5c444.

Change-Id: I7076feab31ab64fccd364699280d821011edc099

12 years agoRevert to PV for AAC codec for FactoryROM.
Dave Burke [Sat, 19 May 2012 00:44:51 +0000 (17:44 -0700)]
Revert to PV for AAC codec for FactoryROM.

Change-Id: I72cf856685c0c4bae745646f870a0415d416afb5

12 years agoMerge "Fix a mediaserver crash caused by dereferencing a NULL pointer." into jb-dev
James Dong [Mon, 21 May 2012 20:57:06 +0000 (13:57 -0700)]
Merge "Fix a mediaserver crash caused by dereferencing a NULL pointer." into jb-dev

12 years agoMerge "For an RTSP live stream we won't map rtp time to normal play time," into jb-dev
Andreas Huber [Mon, 21 May 2012 20:56:06 +0000 (13:56 -0700)]
Merge "For an RTSP live stream we won't map rtp time to normal play time," into jb-dev

12 years agoFix a mediaserver crash caused by dereferencing a NULL pointer.
James Dong [Mon, 21 May 2012 20:38:42 +0000 (13:38 -0700)]
Fix a mediaserver crash caused by dereferencing a NULL pointer.

The pointer (info in method drainInputBuffer) in can be null at the point of the dereference,
but it will get updated subsequently. Thus, we should move the logging after the pointer gets updated.

related-to-bug: 6530159

Change-Id: Ifa5f19a694953af6942454e5c28cd3fa024f11d2

12 years agoKeep a copy of most recent audio played
Glenn Kasten [Mon, 21 May 2012 16:17:20 +0000 (09:17 -0700)]
Keep a copy of most recent audio played

Change-Id: I6b2f97881c39998a2fae9ab79d669af6c0a37e94

12 years agoFor an RTSP live stream we won't map rtp time to normal play time,
Andreas Huber [Mon, 21 May 2012 18:12:40 +0000 (11:12 -0700)]
For an RTSP live stream we won't map rtp time to normal play time,

since we don't have the information necessary.

Change-Id: I3119fcc061c4b6756a69c6139ffdf013d806fee1
related-to-bug: 6528548

12 years agoMerge "Add more verbose ADTS error logging to SoftAAC." into jb-dev
Andreas Huber [Mon, 21 May 2012 17:11:52 +0000 (10:11 -0700)]
Merge "Add more verbose ADTS error logging to SoftAAC." into jb-dev

12 years agoAdd more verbose ADTS error logging to SoftAAC.
Andreas Huber [Mon, 21 May 2012 17:02:14 +0000 (10:02 -0700)]
Add more verbose ADTS error logging to SoftAAC.

and fix the corresponding code in SoftAAC2.

Change-Id: I6c745fb6e8e093708fdfe2861963b0a35fa7b912
related-to-bug: 6519161

12 years agoIf we encounter an error during buffer allocation change state back
Andreas Huber [Mon, 21 May 2012 16:51:14 +0000 (09:51 -0700)]
If we encounter an error during buffer allocation change state back

to LOADED instead of remaining in the transitional state LOADED->IDLE
that won't properly handle flush or shutdown requests.

Change-Id: Ica1bf22eb884b220f18ed2a4f7a9c56eec228796
related-to-bug: 6516512

12 years agoInstead of asserting on malformed ADTS headers or insufficient data,
Andreas Huber [Fri, 18 May 2012 20:08:14 +0000 (13:08 -0700)]
Instead of asserting on malformed ADTS headers or insufficient data,

stop decoding and signal a runtime error.

Change-Id: Ib66a17a2908273f65a92999951439cc6f0752164
related-to-bug: 6519161

12 years agoMerge "Add throttle to have pipe fill at more stable rate" into jb-dev
Glenn Kasten [Fri, 18 May 2012 20:04:25 +0000 (13:04 -0700)]
Merge "Add throttle to have pipe fill at more stable rate" into jb-dev

12 years agoAdd throttle to have pipe fill at more stable rate
Glenn Kasten [Fri, 18 May 2012 17:47:28 +0000 (10:47 -0700)]
Add throttle to have pipe fill at more stable rate

Change-Id: Ibff9ab62764e2acd04518a4a00e25f19e28aff4a

12 years agoDon't reconfigure stream after outputing data.
Dave Burke [Fri, 18 May 2012 17:46:11 +0000 (10:46 -0700)]
Don't reconfigure stream after outputing data.

Handle invalid configuration.
Bug: 6519161

Change-Id: Ib2d38bee769e63e627c93d7f3839c3a55de694e9

12 years agoMerge "systrace for audio" into jb-dev
Glenn Kasten [Fri, 18 May 2012 14:23:12 +0000 (07:23 -0700)]
Merge "systrace for audio" into jb-dev

12 years agoRobustness - use defaults if we see bogus sample rate / channels from decoder.
Dave Burke [Fri, 18 May 2012 06:55:34 +0000 (23:55 -0700)]
Robustness - use defaults if we see bogus sample rate / channels from decoder.

Bug: 6498711
Change-Id: I6950d316a292cfd0cb516ee6d95b6af071b08fdc

12 years agoHandle stream changes at any point in the stream.
Dave Burke [Fri, 18 May 2012 06:08:08 +0000 (23:08 -0700)]
Handle stream changes at any point in the stream.

Also, handle discontinuity properly (was using wrong flag before).
Bug: 6498711

Change-Id: I18a6684f7dc96aa04b1e8113b54ec1053895ca98

12 years agoMerge "Clear the decoder input buffer after it signalled an error to be able to conti...
Dave Burke [Fri, 18 May 2012 04:05:38 +0000 (21:05 -0700)]
Merge "Clear the decoder input buffer after it signalled an error to be able to continue." into jb-dev

12 years agosystrace for audio
Glenn Kasten [Mon, 14 May 2012 23:37:13 +0000 (16:37 -0700)]
systrace for audio

Trace fast track buffer fill status for underruns etc.

Move the definition of macro to Android.mk.

No overhead if disabled.

Change-Id: If0e83e21b61b059ca38f543f8a6ffb58e08c79ee

12 years agoFixes parsing of PSI sections in MPEG2 transport streams
Andreas Huber [Tue, 15 May 2012 19:37:29 +0000 (12:37 -0700)]
Fixes parsing of PSI sections in MPEG2 transport streams

They can span multiple transport stream packets, something the parser
previously did not support.

Change-Id: I78da6ffd2d422cceedb87aad61cba2062419e635
related-to-bug: 6166596

12 years agoClear the decoder input buffer after it signalled an error to be able to continue.
Andreas Huber [Thu, 17 May 2012 23:06:01 +0000 (16:06 -0700)]
Clear the decoder input buffer after it signalled an error to be able to continue.

Change-Id: I06d43723dea7688d63cfb05e7fc7754672788562
related-to-bug: 6419102

12 years agoMerge "Display pipe underrun counters in dumpsys" into jb-dev
Glenn Kasten [Thu, 17 May 2012 22:47:18 +0000 (15:47 -0700)]
Merge "Display pipe underrun counters in dumpsys" into jb-dev

12 years agoDisplay pipe underrun counters in dumpsys
Glenn Kasten [Tue, 15 May 2012 14:39:27 +0000 (07:39 -0700)]
Display pipe underrun counters in dumpsys

The normal mixer writes it's submix to a pipe, which is read by the fast
mixer.  Now dumpsys media.audio_flinger display the raw underrun counters
when fast mixer tries to pull from the pipe but doesn't get enough frames.

Change-Id: I72505f149f9e12802784da654a651d43734e1c79

12 years agoSkip bad kHz values, and display them accurately
Glenn Kasten [Tue, 15 May 2012 00:41:09 +0000 (17:41 -0700)]
Skip bad kHz values, and display them accurately

One device reports zero CPU kHz occasionally, so skip those values.

Preserve accuracy of the low-order 4 bits of the the CPU frequency.

Change-Id: I7d934f697412277462464fca82d112d0306a214e

12 years agoMerge "Buffer at least 2 secs worth of data at startup of after a seek before" into...
Andreas Huber [Thu, 17 May 2012 21:52:55 +0000 (14:52 -0700)]
Merge "Buffer at least 2 secs worth of data at startup of after a seek before" into jb-dev

12 years agoBuffer at least 2 secs worth of data at startup of after a seek before
Andreas Huber [Thu, 17 May 2012 21:18:50 +0000 (14:18 -0700)]
Buffer at least 2 secs worth of data at startup of after a seek before

resuming starting RTSP playback.

Change-Id: I060c6c7fd627ab7ebd5c095ddcfdb4cc0f637aad
related-to-bug: 6364126

12 years agoMerge "Prefix MPEG4-generic audio data with ADTS headers" into jb-dev
Andreas Huber [Thu, 17 May 2012 19:42:18 +0000 (12:42 -0700)]
Merge "Prefix MPEG4-generic audio data with ADTS headers" into jb-dev

12 years agoMerge "Add informational logging to track 0 channel issue." into jb-dev
Dave Burke [Thu, 17 May 2012 19:29:48 +0000 (12:29 -0700)]
Merge "Add informational logging to track 0 channel issue." into jb-dev

12 years agoAdd informational logging to track 0 channel issue.
Dave Burke [Thu, 17 May 2012 19:04:00 +0000 (12:04 -0700)]
Add informational logging to track 0 channel issue.

Bug #: 6498711

Change-Id: I952777923569511a171fe8b79eab579625eda073

12 years agoPrefix MPEG4-generic audio data with ADTS headers
Andreas Huber [Thu, 17 May 2012 19:12:39 +0000 (12:12 -0700)]
Prefix MPEG4-generic audio data with ADTS headers

to work around limitations of the new AAC decoder.

Change-Id: I4988c7c39fedb7d04eb1ae2ba2d618aa6cb14e77
related-to-bug: 6488547

12 years agoStop audio source if AudioPlayer could not be started
James Dong [Thu, 17 May 2012 02:06:19 +0000 (19:06 -0700)]
Stop audio source if AudioPlayer could not be started

related-to-bug: 6500580

Change-Id: If47e442db2f1ea400e9b598502bb48513f28cd6d

12 years agoMerge "Stop extrapolating audio time from the anchor if we're paused or reached eos...
Andreas Huber [Thu, 17 May 2012 16:40:55 +0000 (09:40 -0700)]
Merge "Stop extrapolating audio time from the anchor if we're paused or reached eos." into jb-dev

12 years agoMerge "Stereo downmixer supports generic configurations. Fix 7.1 downmix" into jb-dev
Jean-Michel Trivi [Wed, 16 May 2012 20:46:04 +0000 (13:46 -0700)]
Merge "Stereo downmixer supports generic configurations. Fix 7.1 downmix" into jb-dev

12 years agoStereo downmixer supports generic configurations. Fix 7.1 downmix
Jean-Michel Trivi [Tue, 15 May 2012 22:51:16 +0000 (15:51 -0700)]
Stereo downmixer supports generic configurations. Fix 7.1 downmix

Added a generic downmixer to stereo function to handle the
  multichannel configurations not supported by the dedicated
  downmix functions.
  It first verifies the mask is supported, and then derives
  channel indices for the downmix.
Added support for forcing the generic downmixer to be always
  used instead of the format-specific functions (define
  DOWNMIX_ALWAYS_USE_GENERIC_DOWNMIXER to force it).

Fixed 7.1 downmix function where handling of accumulate vs
  overwrite was inversed.

Bug 4280902

Change-Id: I8259b32c4e90f76ef4dcd803592fc71df4ae90c5

12 years agoRemove libvideoeditor_jni.so's dependency on static libs in video editor engine
James Dong [Tue, 15 May 2012 07:27:46 +0000 (00:27 -0700)]
Remove libvideoeditor_jni.so's dependency on static libs in video editor engine

related-to-bug: 6502980

Change-Id: I9cbbf44eb53c406263df4003cc3de2af4d239180

12 years agoMerge "Add logging for invalid channel count or sample rate." into jb-dev
Dave Burke [Wed, 16 May 2012 01:37:16 +0000 (18:37 -0700)]
Merge "Add logging for invalid channel count or sample rate." into jb-dev

12 years agoAdd logging for invalid channel count or sample rate.
Dave Burke [Wed, 16 May 2012 01:15:23 +0000 (18:15 -0700)]
Add logging for invalid channel count or sample rate.

Change-Id: I2e2145e4b258923cf6c2907106345b7172c12280

12 years agoMerge "Speed up stsz box write in MPEG4Writer" into jb-dev
James Dong [Wed, 16 May 2012 00:24:27 +0000 (17:24 -0700)]
Merge "Speed up stsz box write in MPEG4Writer" into jb-dev

12 years agoMerge "Move CameraParameters header to join rest of camera library." into jb-dev
Eino-Ville Talvala [Wed, 16 May 2012 00:21:31 +0000 (17:21 -0700)]
Merge "Move CameraParameters header to join rest of camera library." into jb-dev

12 years agoIncrease normal mixer's pipe to fast mixer
Glenn Kasten [Tue, 15 May 2012 14:39:52 +0000 (07:39 -0700)]
Increase normal mixer's pipe to fast mixer

Change-Id: I330925c7d07b6adb30b773bda3657e4efef9ae9b

12 years agoMerge "Log which OMX component is not returning all buffers to us on executing->idle...
Andreas Huber [Tue, 15 May 2012 23:27:02 +0000 (16:27 -0700)]
Merge "Log which OMX component is not returning all buffers to us on executing->idle." into jb-dev

12 years agoSpeed up stsz box write in MPEG4Writer
James Dong [Tue, 15 May 2012 17:43:30 +0000 (10:43 -0700)]
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