OSDN Git Service

android-x86/frameworks-av.git
12 years agoSwitch the way we configure for MediaPlayer retransmission.
John Grossman [Wed, 22 Feb 2012 23:38:35 +0000 (15:38 -0800)]
Switch the way we configure for MediaPlayer retransmission.

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: I6ab07d89b2eeb0650e634b8c3b7a0b36aba4e7dd

12 years agoRevert "Add a way to play file descriptor data sources using the A@H transmitter...
John Grossman [Tue, 21 Feb 2012 20:00:45 +0000 (12:00 -0800)]
Revert "Add a way to play file descriptor data sources using the A@H transmitter media player."

This reverts commit 64006cb1642b2ec0ee74c66007d869b884391fd1.

Back out this change in order to get ready to implement a longer term,
more media-team approved way of selecting a retransmit player.

Change-Id: I97b68b9859a174eab858598cb00d4445a14fbc17

12 years agoLibAAH_RTP: Add support for AAC in MP4.
John Grossman [Sun, 19 Feb 2012 01:46:40 +0000 (17:46 -0800)]
LibAAH_RTP: Add support for AAC in MP4.

Change-Id: Ie8298eb9d253fc6ede448da87660a60d23170987

12 years agoPut a bandaid on a segfault in timed audio track handling.
John Grossman [Mon, 13 Feb 2012 01:51:21 +0000 (17:51 -0800)]
Put a bandaid on a segfault in timed audio track handling.

Add a bandaid to prevent a segfault which can occur while handling
timed audio buffers.  There is a deeper problem which should
eventually be addressed, but for now this fix should prevent any
crashing.

The deeper problem is as follows.

When the AudioFlinger mixer gets data to mix from an AudioTrack, it
ends up getting a structure filled out which points into an IMemory
region owned by the AudioTrack.  Unfortunately, this structure is not
holding a refcount on the IMemory which it points into.  If the
IMemory refcount hits 0 and the chunk of RAM is retuned to the binder
heap it came from, there can still be a Buffer object being held by
the AudioFlinger mixer which points into the region of memory which
was retuned to the binfer heap.  If AF reads from this buffer, it
could read corrupt data (if the region of memory gets handed back out
to a writer), or it could segfault (if the heap has been freed and the
pages unmapped).  Similar problems could happen if AF attempts to
write to the buffer, heap corruption in one case, segfaulting in the
other.

In the past, this has not been an issue for AF, because tracks
allocate a single IMemory (which serves as a ring buffer) and the
IMemory lives for as long as the track lives.  As an artifact of the
way the code came out, the mixer cannot be holding a Buffer structure
pointing into the IMemory which used to be owned by a track if the
track no longer exists.  Tracks cannot come into or out of existence
during a mix operation, which is the only thing which makes this safe.

TimedTracks work differently, however.  Timed tracks each allocate a
small binder heap, and then hand out IMemory instances  broken out of
this heap.  The heap lives as long as the track, so the worst which
could happen here is that a TimedTrack's IMemory gets returned to the
heap while there is still a buffer structure in flight pointing into
the memory region, then the region gets handed out again and
overwritten by new data causing the mixer to mix the wrong audio.  The
timing to cause this to happen is very difficult to encounter, and you
to generate the timing conditions required, you need to be in a pretty
bad failure state where audio is already breaking up and skipping, so
its unlikely that anyone would notice (which is why I'm band-aiding
the segfault and letting the deeper issue slide for now).

In general, however, it might be a good idea to revisit this buffering
design.  On principal, if someone is going to hold pointers into a
refcounted object, they should be holding a ref on the object at the
same time.  Failure to do this will usually lead to a situation where
there are corruption or segfault issues, or to a system where the
refcounted object's lifetime must be implicitly managed very carefully
in ways which are usually non-obvious and are easy to break by new
engineers on a project.

Change-Id: Ib391075395ed0ef46a03c37aa38a82d09e88abeb

12 years agoFix a segfault in AudioFlinger.
John Grossman [Thu, 9 Feb 2012 19:28:36 +0000 (11:28 -0800)]
Fix a segfault in AudioFlinger.

Check the string returned by a HAL's implementation of get_parameters
for NULL before attempting to make use of it.  That way, we won't
bring down the mediaserver because of a poorly written HAL.

Change-Id: I45f0fd3de003151f98acf32c36c42f58d053f3a0

12 years agoExplicitly manage common clock client lifetimes.
John Grossman [Sun, 5 Feb 2012 21:36:33 +0000 (13:36 -0800)]
Explicitly manage common clock client lifetimes.

Change the CCHelper class to be an instanced instead of a static
pattern.  The CCHelper instances all share an interface to the common
clock service and register/unregister a callback handler in response
to there being CCHelper instance in the system or not.  This brings
usage of the CCHelper into like with the new auto-disable
functionality of the common time service.  For any given process,
whenever there are CCHelper instances active, the process will
maintain a callback target to the common clock service and will be
considered to be an active client.

Also change all of the users of the CCHelper interface to manage the
lifecycle of their new CCHelper instances.

Change-Id: I7c28c5d70d9b07ba7407b4ac706e7e7d7253001b

12 years agoAdd native common time config service.
John Grossman [Wed, 18 Jan 2012 23:00:33 +0000 (15:00 -0800)]
Add native common time config service.

Define a native service interface for configuring and controlling the
common time service.  Implement the native marshallers and stub the
implementation of the new interface.

Change-Id: Ia6a6a20ef3d221e8829c55be1dd5f98ed996c610

12 years agoAdd marshallers for the new common clock methods.
John Grossman [Wed, 18 Jan 2012 01:10:55 +0000 (17:10 -0800)]
Add marshallers for the new common clock methods.

Add marshallers and stub implementations for new methods in the common
clock interface to support new functionality being added in the
process of integrating the common time service more closely with the
Java level of Android.

Change-Id: Iac2d3fb405d1b64cea1d8e13f988160afb76a06d

12 years agoChange ICommonClock marshallers to return explicit error codes.
John Grossman [Tue, 17 Jan 2012 18:24:58 +0000 (10:24 -0800)]
Change ICommonClock marshallers to return explicit error codes.

Change the ICommonClock marshallers to return an explicit error with
each transaction.  This makes it easier to disambiguate between binder
errors (dead object due to the service crashing) vs. runtime errors
(cannot return common time due to lack of sync)

Change-Id: I2182cf0cfb2e11b4669f392554f104ef7c4bca8b

12 years agoMove the definition of time server state.
John Grossman [Tue, 17 Jan 2012 18:20:12 +0000 (10:20 -0800)]
Move the definition of time server state.

Move the State enum up to the ICommonClock interface so it can be
returned for status/debugging up to clients.

Change-Id: I81fef5b96ffc69a4f2e9801b3744feea099ccd47

12 years agoDe-AAH-ify the common time service.
John Grossman [Wed, 18 Jan 2012 02:52:32 +0000 (18:52 -0800)]
De-AAH-ify the common time service.

Bulk name change to remove references to Android@Home from the common time
service in preparation for cleanup and up-integration into the master
branch.  Basically, aah_timesrv is now common_time.

Change-Id: I3d3db212f96e8ba171aa36b9c58e27e4a336cb0a

12 years agoAdd a way to play file descriptor data sources using the A@H transmitter media player.
Jason Simmons [Mon, 30 Jan 2012 02:03:02 +0000 (18:03 -0800)]
Add a way to play file descriptor data sources using the A@H transmitter media player.

* Added a MediaPlayer.setMediaPlayerType API that be called to specify the
  desired media player implementation before calling setDataSource
* Implemented setDataSource(fd) in the AAH_TxPlayer

Change-Id: I359075d9c7d6fd699dda14eb85ec50da19307639

12 years agoresolved conflicts for merge of 7eeaf3f0 to ics-aah
Jason Simmons [Tue, 24 Jan 2012 21:16:19 +0000 (13:16 -0800)]
resolved conflicts for merge of 7eeaf3f0 to ics-aah

Change-Id: I92b709268e22e3c3e9590c15173ab073b37db726

12 years agoam 41773d46: Merge "DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when...
Eric Laurent [Tue, 24 Jan 2012 19:51:15 +0000 (11:51 -0800)]
am 41773d46: Merge "DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""" into ics-mr1

* commit '41773d46556aa47d4322ff89fdaf7d1345c2d1f2':
  DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""

12 years agoAudioFlinger: refine mixer sleep time logic
Eric Laurent [Tue, 24 Jan 2012 02:56:59 +0000 (18:56 -0800)]
AudioFlinger: refine mixer sleep time logic

When an AudioTrack is in underrun state, the AudioFlinger mixer will
sleep for a short period of time to give the app a chance to fill the
AudioTrack buffer. If the AudioTrack is still not ready during next mixing round,
the mixer will proceed with other tracks.

If an application keeps a steady underrun condition, the AudioFlinger mixer will
alternate between ready and not ready states. In the longer term this will cause the
audio HAL to underrun.
There is a mechanism to reduce the sleep period if the mixer is not ready several times in a
row but this mechanism is defeated by the alternating ready/not ready conditions.

The fix consists in only increasing sleep time if the mixer is ready for at least two
consecutive times.

Issue 5904527.

Change-Id: Id0139bca9be8c4e425ec6d428515c4d8f718e8c9

12 years agoDO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""
Eric Laurent [Tue, 24 Jan 2012 02:35:10 +0000 (18:35 -0800)]
DO NOT MERGE Revert "Revert "AudioFlinger: mix track only when really ready (2)""

This reverts commit b918035d34422a2041b6ec8c09c566bb93345b40.

Change-Id: I093bcfa56ad54a080b930208b6b79169d33581fb

12 years agoam fee5a860: Merge "DO NOT MERGE Revert "AudioFlinger: mix track only when really...
Justin Ho [Mon, 23 Jan 2012 23:13:50 +0000 (15:13 -0800)]
am fee5a860: Merge "DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"" into ics-mr1

* commit 'fee5a860a8355cda071ff23644e943414ba7f65d':
  DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"

12 years agoDO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"
Justin Ho [Mon, 23 Jan 2012 22:01:15 +0000 (14:01 -0800)]
DO NOT MERGE Revert "AudioFlinger: mix track only when really ready (2)"

This reverts commit 71c4496a9757438afd30b4404824f296f6158a49.

Change-Id: Iff10c49ea728bb10023ddeb50a3b708db770fff2

12 years agoam db2e7163: Merge "AudioFlinger: mix track only when really ready (2)" into ics-mr1
Eric Laurent [Thu, 19 Jan 2012 00:14:20 +0000 (16:14 -0800)]
am db2e7163: Merge "AudioFlinger: mix track only when really ready (2)" into ics-mr1

* commit 'db2e71635968f455ad4f41b2e24fb8b909c24ca0':
  AudioFlinger: mix track only when really ready (2)

12 years agoAudioFlinger: mix track only when really ready (2)
Eric Laurent [Wed, 18 Jan 2012 03:20:12 +0000 (19:20 -0800)]
AudioFlinger: mix track only when really ready (2)

This problem due to the way audio buffers are mixed when
low power mode is active was addressed by commits 19ddf0eb
and 8a04fe03 but only partially. As a matter of fact, when more
than one audio track is playing, the problem is still present.
This is most noticeable when playing music with screen off
and a notification or navigation instruction is played: in this case,
the music or notification is likely to skip.

The fix consists in declaring the mixer ready if all active tracks
are ready. Previous behavior was to declare ready if at least one track was
ready. To avoid that one application failing to fill the track buffer blocks other
tracks indefinitely, this condition is respected only if the mixer was ready
in the previous round.

Issue 5799167.

Change-Id: Iabd4ca08d3d45f563d9824c8a03c2c68a43ae179

12 years agoEnhance Visualizer behavior in the case of mediaserver death.
John Grossman [Wed, 11 Jan 2012 20:23:42 +0000 (12:23 -0800)]
Enhance Visualizer behavior in the case of mediaserver death.

Bring the Visualizer class into line with the SDK documentation by
returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when
the Visualizer loses its binder connection to the mediaserver because
of a mediaserver restart.

Also add a new callback interface to allow clients to be
asynchronously notified in the case of server death.  Right now, the
interface definition and the registration method are flagged as hidden
pending API council review/approval.

See http://b/issue?id=5717519 for details.

Change-Id: Id428fb946d6d7676bffd2a597366e8444ebe24f2
Signed-off-by: John Grossman <johngro@google.com>
12 years agoam c15cf3d2: Merge "stagefright: limit audio gap for looped playback" into ics-mr1
Eric Laurent [Wed, 11 Jan 2012 19:12:55 +0000 (11:12 -0800)]
am c15cf3d2: Merge "stagefright: limit audio gap for looped playback" into ics-mr1

* commit 'c15cf3d286f3d63d141b73f639a5a61ddb028029':
  stagefright: limit audio gap for looped playback

12 years agostagefright: limit audio gap for looped playback
Eric Laurent [Mon, 9 Jan 2012 21:47:48 +0000 (13:47 -0800)]
stagefright: limit audio gap for looped playback

The audio gap when looping audio is mostly due to
a delay requested by the audio player when executing
the end of stream message. This is to allow the audio
to be drained out of the pipe before actually stopping the
AudioTrack.
This delay is not needed when looping as the AudioTrack
is not stopped.

The fix consists in ignoring the requested delay when the
looping flag is set in awesome player.

Issue 5800981.

Change-Id: Ib32d2930c53ecebc21ca8440e6e054c7e20db4a5

12 years agolibaah_rtp: address http://b/issue?id=5755419
John Grossman [Mon, 9 Jan 2012 18:15:50 +0000 (10:15 -0800)]
libaah_rtp: address http://b/issue?id=5755419

Introduce a heartbeat timeout for TX senders.  If none of the TX
sender's clients send any packets for this timeout period (10 minutes
right now), then the sender will stop sending keep-alive heartbeats.
This should cause RX clients to release any held media resources,
including any timed audio track.  Releasing timeed audio tracks allows
the audio system to go into its idle state, which allows the power amp
in Tungsten to power all of the way down, saving both heat and power.

Change-Id: Ib7a96d334e1064ddea3f07a6b21e6efedefc549a
Signed-off-by: John Grossman <johngro@google.com>
12 years agoam 7944704e: Merge "Switch camera sounds to always use the system enforced audio...
Eino-Ville Talvala [Fri, 6 Jan 2012 23:49:21 +0000 (15:49 -0800)]
am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '7944704e6c4cc10105838b78d3d8403bf66a066b':
  Switch camera sounds to always use the system enforced audio stream.

12 years agoSwitch camera sounds to always use the system enforced audio stream.
Eino-Ville Talvala [Thu, 5 Jan 2012 23:34:53 +0000 (15:34 -0800)]
Switch camera sounds to always use the system enforced audio stream.

Instead of picking between the music stream and the enforced audio
stream, change the camera service to always play sounds through
enforced system stream. Also update the currently-hidden CameraSound
API to match.

Bug: 5778365
Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3

12 years agoam fb578b6b: Merge "audioflinger: fix clicks on 48kHz audio." into ics-mr1
Eric Laurent [Wed, 4 Jan 2012 21:00:44 +0000 (13:00 -0800)]
am fb578b6b: Merge "audioflinger: fix clicks on 48kHz audio." into ics-mr1

* commit 'fb578b6b88af51812b71a86ad4dd3a7de56e394b':
  audioflinger: fix clicks on 48kHz audio.

12 years agoaudioflinger: fix clicks on 48kHz audio.
Eric Laurent [Fri, 23 Dec 2011 00:08:41 +0000 (16:08 -0800)]
audioflinger: fix clicks on 48kHz audio.

The calculation done in prepareTracks_l() for the minimum amount
off frames needed to mix one output buffer had 2 issues:
- the additional sample needed for interpolation was not included
- the fact that the resampler does not acknowledge the frames consumed
immediately after each mixing round but only once all frames requested have been used
was not taken into account.
Thus the number of frames available in track buffer could be considered sufficient although
it was not and the resampler would abort producing a short silence perceived as a click.

Issue 5727099.

Change-Id: I7419847a7474c7d9f9170bedd0a636132262142c

12 years agoam ac279de9: Merge "SurfaceMediaSource: use the HW_TEXTURE usage bit" into ics-mr1
Dave Burke [Fri, 16 Dec 2011 03:25:07 +0000 (19:25 -0800)]
am ac279de9: Merge "SurfaceMediaSource: use the HW_TEXTURE usage bit" into ics-mr1

* commit 'ac279de9d9fcfd59a336298cfdd5b1f4ab6d038f':
  SurfaceMediaSource: use the HW_TEXTURE usage bit

12 years agoSurfaceMediaSource: use the HW_TEXTURE usage bit
Jamie Gennis [Fri, 16 Dec 2011 02:14:05 +0000 (18:14 -0800)]
SurfaceMediaSource: use the HW_TEXTURE usage bit

This change makes SurfaceMediaSource request Gralloc buffers with the
HW_TEXTURE usage bit rather than the VIDEO_ENCODER bit.  It is a
temporary workaround for what is likely a Gralloc bug.

Bug: 5771063
Change-Id: I9cce615e80fc14a1644fae27ba06970c262dd179

12 years agoam d70c64db: Revert the following patches because they may lead to power regression...
James Dong [Wed, 14 Dec 2011 21:50:15 +0000 (13:50 -0800)]
am d70c64db: Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix."    This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.

* commit 'd70c64db9f67dbe8f888de6b1bdcc835226ec526':
  Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck 1. Revert "Fix drm flag setting missed in false drm recognition fix."    This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.

12 years agoRevert the following patches because they may lead to power regression because SHA...
James Dong [Wed, 14 Dec 2011 18:57:05 +0000 (10:57 -0800)]
Revert the following patches because they may lead to power regression because SHA/MD5 module is stuck
1. Revert "Fix drm flag setting missed in false drm recognition fix."
   This reverts commit 9f704f6c46a171357e49c411c83458b9d4565f3b.

2. Revert "Fixed the false drm recognition."
   This reverts commit aadbd80b307c817698ce5110ff8e002804d1b230.

3. Revert "Fix drm enumeration order, resolves failure to play forward lock ringtones"
   This reverts commit a5cbf023e349f2394ba6fc58d73b4375cfec4369.

4. Revert "Fix ANRs due to Widevine DRM plugin sniff taking too long."
   This reverts commit d0d19db1ca1c289b069db33f4665bcb9386064e9.

As a result of the reverting, many ANRs from WV sniffing are back.

related-to-bug: 5739618

12 years agoam 3ab63008: Merge "DO NOT MERGE: Support for parsing of "folded" RTSP header values...
Andreas Huber [Tue, 13 Dec 2011 20:02:19 +0000 (12:02 -0800)]
am 3ab63008: Merge "DO NOT MERGE: Support for parsing of "folded" RTSP header values" into ics-mr1

* commit '3ab630084071eb5dc7f92b4a8a617f8cef10c514':
  DO NOT MERGE: Support for parsing of "folded" RTSP header values

12 years agoDO NOT MERGE: Support for parsing of "folded" RTSP header values
Andreas Huber [Fri, 9 Dec 2011 23:09:56 +0000 (15:09 -0800)]
DO NOT MERGE: Support for parsing of "folded" RTSP header values

and some tweaks to the AMR assembler contributed by Samsung (untested).

Change-Id: I6c3df31fa3a35433bfddfdda82747bb4c6ee86a1
related-to-bug: 5669027

12 years agoam a5cbf023: Fix drm enumeration order, resolves failure to play forward lock ringtones
Jeff Tinker [Mon, 12 Dec 2011 19:06:32 +0000 (11:06 -0800)]
am a5cbf023: Fix drm enumeration order, resolves failure to play forward lock ringtones

* commit 'a5cbf023e349f2394ba6fc58d73b4375cfec4369':
  Fix drm enumeration order, resolves failure to play forward lock ringtones

12 years agoFix drm enumeration order, resolves failure to play forward lock ringtones
Jeff Tinker [Sat, 10 Dec 2011 04:04:17 +0000 (20:04 -0800)]
Fix drm enumeration order, resolves failure to play forward lock ringtones

Change-Id: I58e8a26849409bc3bf98b066c5e07c2a0c91e0c9
related-to-bug: 5735466

12 years agoam ef664f62: Merge "Fix drm flag setting missed in false drm recognition fix." into...
Jeff Tinker [Fri, 9 Dec 2011 19:13:59 +0000 (11:13 -0800)]
am ef664f62: Merge "Fix drm flag setting missed in false drm recognition fix." into ics-mr1

* commit 'ef664f62a1525e8f53d0937e889333544ffef3ad':
  Fix drm flag setting missed in false drm recognition fix.

12 years agoFix drm flag setting missed in false drm recognition fix.
Jeff Tinker [Fri, 9 Dec 2011 16:57:23 +0000 (08:57 -0800)]
Fix drm flag setting missed in false drm recognition fix.

Change-Id: Ie38668c8a32969ef7c7df4ca3350e2364291953c
related-to-bug: 5732033

12 years agoam aadbd80b: Fixed the false drm recognition.
James Dong [Fri, 9 Dec 2011 08:17:27 +0000 (00:17 -0800)]
am aadbd80b: Fixed the false drm recognition.

* commit 'aadbd80b307c817698ce5110ff8e002804d1b230':
  Fixed the false drm recognition.

12 years agoFixed the false drm recognition.
James Dong [Fri, 9 Dec 2011 03:31:59 +0000 (19:31 -0800)]
Fixed the false drm recognition.

Change-Id: If0198e52ff7bbd7422f219f55a37aae97f7d74f1

related-to-bug: 5732033

12 years agoam 68f592a8: Merge "Don\'t perform RTSP seeks right away but queue them for 200ms...
Andreas Huber [Thu, 8 Dec 2011 21:35:23 +0000 (13:35 -0800)]
am 68f592a8: Merge "Don\'t perform RTSP seeks right away but queue them for 200ms" into ics-mr1

* commit '68f592a8210af27df4339089bbee47fb602cae6a':
  Don't perform RTSP seeks right away but queue them for 200ms

12 years agoam 0ba9380a: Merge "Fix Bitreader "putBits" implementation, make sure we emulate...
Andreas Huber [Thu, 8 Dec 2011 21:35:16 +0000 (13:35 -0800)]
am 0ba9380a: Merge "Fix Bitreader "putBits" implementation, make sure we emulate timestamps" into ics-mr1

* commit '0ba9380a337d5e2eae9fd9e4eb8039403ed3815b':
  Fix Bitreader "putBits" implementation, make sure we emulate timestamps

12 years agoMerge "Don't perform RTSP seeks right away but queue them for 200ms" into ics-mr1
Andreas Huber [Thu, 8 Dec 2011 21:33:16 +0000 (13:33 -0800)]
Merge "Don't perform RTSP seeks right away but queue them for 200ms" into ics-mr1

12 years agoDon't perform RTSP seeks right away but queue them for 200ms
Andreas Huber [Thu, 8 Dec 2011 21:04:50 +0000 (13:04 -0800)]
Don't perform RTSP seeks right away but queue them for 200ms

and only execute the last one.

Change-Id: I9ab342396ec9c9c03624a4b0306d1e180ceca000
related-to-bug: 5732960

12 years agoFix Bitreader "putBits" implementation, make sure we emulate timestamps
Andreas Huber [Thu, 8 Dec 2011 20:27:47 +0000 (12:27 -0800)]
Fix Bitreader "putBits" implementation, make sure we emulate timestamps

if we don't receive npt time mapping from the rtsp server (i.e. live stream)

Change-Id: I5147d665bd90c9a303ad6ffdafbf770f930f917c
related-to-bug: 5660357

12 years agoam a693a4b5: Merge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into...
Jeff Tinker [Thu, 8 Dec 2011 08:16:15 +0000 (00:16 -0800)]
am a693a4b5: Merge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into ics-mr1

* commit 'a693a4b5553584a01b8b6b3640dc0393d2d88f28':
  Fix ANRs due to Widevine DRM plugin sniff taking too long.

12 years agoMerge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into ics-mr1
Jeff Tinker [Thu, 8 Dec 2011 08:13:43 +0000 (00:13 -0800)]
Merge "Fix ANRs due to Widevine DRM plugin sniff taking too long." into ics-mr1

12 years agoFix ANRs due to Widevine DRM plugin sniff taking too long.
Jeff Tinker [Thu, 8 Dec 2011 04:23:20 +0000 (20:23 -0800)]
Fix ANRs due to Widevine DRM plugin sniff taking too long.

Add a Widevine-specific format sniffer to avoid having to
refetch data from the remote server.

Change-Id: I5fdb21fe7a0d6e74f2a6f06e6fbf8070b068ac60
related-to-bug: 5725548

12 years agoam 54a53841: Merge "Fetch at least 192KB to avoid our mp3 sniffer from blocking on...
Dave Burke [Wed, 7 Dec 2011 22:07:49 +0000 (14:07 -0800)]
am 54a53841: Merge "Fetch at least 192KB to avoid our mp3 sniffer from blocking on data." into ics-mr1

* commit '54a53841a9ff48ba4cd004469ae4ff77caed900a':
  Fetch at least 192KB to avoid our mp3 sniffer from blocking on data.

12 years agoMerge "Fetch at least 192KB to avoid our mp3 sniffer from blocking on data." into...
Dave Burke [Wed, 7 Dec 2011 22:05:41 +0000 (14:05 -0800)]
Merge "Fetch at least 192KB to avoid our mp3 sniffer from blocking on data." into ics-mr1

12 years agoFetch at least 192KB to avoid our mp3 sniffer from blocking on data.
Andreas Huber [Wed, 7 Dec 2011 20:50:47 +0000 (12:50 -0800)]
Fetch at least 192KB to avoid our mp3 sniffer from blocking on data.

Change-Id: Icb10c129249bb9b69e91f6633a385840c94efa59
related-to-bug: 5666532

12 years agoam 3de8d36b: Reconcile with ics-mr0-release
The Android Open Source Project [Wed, 7 Dec 2011 19:03:56 +0000 (11:03 -0800)]
am 3de8d36b: Reconcile with ics-mr0-release

* commit '3de8d36b6fd166cf63ca256c455c0ea26a849668':
  DO NOT MERGE: Remove the AVI extractor.
  Disable wifiwatchdog for now

12 years agoam 791a3183: Merge "Merge commit \'babb7200\' into manualmerge" into ics-mr1
Andreas Huber [Wed, 7 Dec 2011 19:03:00 +0000 (11:03 -0800)]
am 791a3183: Merge "Merge commit \'babb7200\' into manualmerge" into ics-mr1

* commit '791a31832ab586f056c2bcab8e0515d4bb1e2f7a':
  DO NOT MERGE: Remove the AVI extractor.

12 years agoam 6b8b5a0a: Merge "DO NOT MERGE - Consider I-Frame at zeroeth position when searchin...
James Dong [Wed, 7 Dec 2011 19:02:31 +0000 (11:02 -0800)]
am 6b8b5a0a: Merge "DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames" into ics-mr1

* commit '6b8b5a0a4183c0f8d1d5ceacc9e50194589a77d3':
  DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames

12 years agoam 05d63069: Merge "DO NOT MERGE: Remove the AVI extractor." into ics-mr1
Andreas Huber [Wed, 7 Dec 2011 19:02:29 +0000 (11:02 -0800)]
am 05d63069: Merge "DO NOT MERGE: Remove the AVI extractor." into ics-mr1

* commit '05d630691127c022befd071b2bede87c707112a9':
  DO NOT MERGE: Remove the AVI extractor.

12 years agoReconcile with ics-mr0-release
The Android Open Source Project [Wed, 7 Dec 2011 15:24:54 +0000 (07:24 -0800)]
Reconcile with ics-mr0-release

Change-Id: I5341d7d7de8ec8dfa86095e8d8d45a912bb01a47

12 years agoMerge commit 'babb7200' into manualmerge
Andreas Huber [Tue, 6 Dec 2011 23:03:10 +0000 (15:03 -0800)]
Merge commit 'babb7200' into manualmerge

12 years agoDO NOT MERGE: Remove the AVI extractor.
Andreas Huber [Tue, 6 Dec 2011 18:59:48 +0000 (10:59 -0800)]
DO NOT MERGE: Remove the AVI extractor.

Change-Id: Ib9cb4a48bd817da703ef53eb14932616d2973ee0

12 years agoTungsten: Improve RX player error handling.
John Grossman [Tue, 6 Dec 2011 22:05:05 +0000 (14:05 -0800)]
Tungsten: Improve RX player error handling.

First, clear an issue which was causing an assert to fire.  Basically,
once a decoder pump had entered the error state and was shutdown, it
was not clearing its status, and when a substream attempt to recycle
the pump, startup was failing an assert (no thread had been created,
meaning that the system was not initialized, yet status indicated an
error).  This was a small one-liner in aah_decoder_pump.cpp.

Second, try to become a little nuanced about how we handle errors in
the decoder pump.  A comment in the code pretty much says it all, but
the summary is that we don't want to completely abort playback because
a single chunk of ES failed to decode, but if nothing is decoding and
we are making no progress at all, we probably need to put the
MediaPlayer instance into the fatal Error state and signal the app
level so that further action can be taken (automatic recovery attempts
followed by bug reports and signalling the user if those fail).

This is to address the fallout of http://b/issue?id=5498460, where
something at the OMX decoder level becomes unhappy about not being
able to obtain an output buffer which eventually unwinds to this
assert which results in a dead mediaserver.  After this change, the
mediaserver will no longer crash, and may even recover (depending on
whether or not the OMX unhappiness is transient or not), but the
primary issue (unhappy OMX) is probably still around.  It is quite
difficult to reproduce, I will probably need to open a different bug
to track that issue.

Change-Id: I5b65b818378a5ae9c915e91b7db7129f0bda6837
Signed-off-by: John Grossman <johngro@google.com>
12 years agoMerge "DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync...
James Dong [Tue, 6 Dec 2011 20:52:52 +0000 (12:52 -0800)]
Merge "DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames" into ics-mr1

12 years agoDO NOT MERGE: Remove the AVI extractor.
Andreas Huber [Tue, 6 Dec 2011 18:01:27 +0000 (10:01 -0800)]
DO NOT MERGE: Remove the AVI extractor.

Change-Id: Ifce6c0d3d87aad2f5cc7f40ad6304936cbfa795e

12 years agoDO NOT MERGE: Remove the AVI extractor.
Andreas Huber [Tue, 6 Dec 2011 18:59:48 +0000 (10:59 -0800)]
DO NOT MERGE: Remove the AVI extractor.

Change-Id: Ib9cb4a48bd817da703ef53eb14932616d2973ee0

12 years agoMerge "AudioFlinger: Make StandbyTime configurable." into ics-aah
John Grossman [Tue, 6 Dec 2011 18:04:38 +0000 (10:04 -0800)]
Merge "AudioFlinger: Make StandbyTime configurable." into ics-aah

12 years agoAudioFlinger: Make StandbyTime configurable.
John Grossman [Mon, 5 Dec 2011 22:35:26 +0000 (14:35 -0800)]
AudioFlinger: Make StandbyTime configurable.

Make the standby time for AudioFlinger configurable using a system
property.  Default AudioFlinger behavior is to go into standby
(allowing the audio outputs to underflow) after there has been nothing
to mix and AudioFlinger has just been pumping out silence for the
configured standby time (which defaulted to 3 seconds).

Now, by setting the "ro.audio.flinger_standbytime_ms" property in
their platform init.rc, platforms can override this default and
control the standby time.  If the property is missing or malformed,
the old default value of 3 seconds will be used instead.

Change-Id: Ic9fa8b5f5bccee493bc72c65e408d3fd8ddd1059
Signed-off-by: John Grossman <johngro@google.com>
12 years agoam 7b6aff23: Merge "audioflinger: fix audio skipping over A2DP" into ics-mr1
Eric Laurent [Tue, 6 Dec 2011 01:22:46 +0000 (17:22 -0800)]
am 7b6aff23: Merge "audioflinger: fix audio skipping over A2DP" into ics-mr1

* commit '7b6aff23735a9ef8759c5ecb4427784413e9b85b':
  audioflinger: fix audio skipping over A2DP

12 years agoMerge "audioflinger: fix audio skipping over A2DP" into ics-mr1
Eric Laurent [Tue, 6 Dec 2011 01:20:53 +0000 (17:20 -0800)]
Merge "audioflinger: fix audio skipping over A2DP" into ics-mr1

12 years agoDO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames
James Dong [Mon, 5 Dec 2011 20:41:06 +0000 (12:41 -0800)]
DO NOT MERGE - Consider I-Frame at zeroeth position when searching for sync frames

The current logic does not check the I-frame at zeroeth position and therefore
for the files with only 1 I-Frame at zeroeth postion does not play.

Originally authored by Braganza Sam Robertsh <sam.braganza@samsung.com>

Do not merge to master branch since we made some improvement to SampleTable.cpp in the master branch.

Change-Id: I068184dec71986f14a586f769c2af1f52b4bcf94
related-to-bug: 5711942

12 years agoam f2e12498: Merge "Properly identify how much metadata we need to cache in order...
Andreas Huber [Mon, 5 Dec 2011 20:02:53 +0000 (12:02 -0800)]
am f2e12498: Merge "Properly identify how much metadata we need to cache in order to instantiate" into ics-mr1

* commit 'f2e1249846a17c69d728189a8dc67f37261f0a59':
  Properly identify how much metadata we need to cache in order to instantiate

12 years agoProperly identify how much metadata we need to cache in order to instantiate
Andreas Huber [Mon, 5 Dec 2011 19:34:43 +0000 (11:34 -0800)]
Properly identify how much metadata we need to cache in order to instantiate

the extractor without blocking (and therefore be able to abort).

Change-Id: Id2acdde897e02baaeabadae70b7c95b66c9041b3
related-to-bug: 5666532

12 years agoaudioflinger: fix audio skipping over A2DP
Eric Laurent [Mon, 5 Dec 2011 17:47:19 +0000 (09:47 -0800)]
audioflinger: fix audio skipping over A2DP

The maximum sleep time allowed in the mixer thread when audio tracks
are enabled but not ready for mixing is derived from the latency
reported by the output stream.
This does not work for A2DP where the latency also reflects encoding, decoding
and transfer time.

Modified activeSleepTimeUs() to take A2DP case into account.

Issue 5682206.

Change-Id: I3784ac01fb6f836b5a6ce6f764fb15347586de35

12 years agoam 1a3ece9f: Merge "MTP: Add support for restricting PTP to only certain subdirectori...
Mike Lockwood [Fri, 2 Dec 2011 21:22:28 +0000 (13:22 -0800)]
am 1a3ece9f: Merge "MTP: Add support for restricting PTP to only certain subdirectories of the storage DO NOT MERGE" into ics-mr1

* commit '1a3ece9f871c94eb524543ae618a2a1c88cab2cd':
  MTP: Add support for restricting PTP to only certain subdirectories of the storage DO NOT MERGE

12 years agoam 7f87d9cf: Merge "MTP: Don\'t attempt to read more than 16K at a time from the...
Mike Lockwood [Fri, 2 Dec 2011 21:22:26 +0000 (13:22 -0800)]
am 7f87d9cf: Merge "MTP: Don\'t attempt to read more than 16K at a time from the MTP driver DO NOT MERGE" into ics-mr1

* commit '7f87d9cf666c38b9f43b7b2d99acbd9c8f91d8d1':
  MTP: Don't attempt to read more than 16K at a time from the MTP driver DO NOT MERGE

12 years agoMTP: Add support for restricting PTP to only certain subdirectories of the storage...
Mike Lockwood [Thu, 1 Dec 2011 21:58:41 +0000 (16:58 -0500)]
MTP: Add support for restricting PTP to only certain subdirectories of the storage DO NOT MERGE

Bug: 5527220

Change-Id: I81d6de590ea3002118ba46eb4b6d5fe9061c998c
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoMTP: Don't attempt to read more than 16K at a time from the MTP driver DO NOT MERGE
Mike Lockwood [Thu, 1 Dec 2011 23:36:06 +0000 (18:36 -0500)]
MTP: Don't attempt to read more than 16K at a time from the MTP driver DO NOT MERGE

This could happen sometimes if other operations increased the size of the
data packet buffer to > 16K

Change-Id: I10f85f0ce32df39f46b0a984361958c0a13f6800
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoam 2c2ed7be: Merge "Fixes a typo in AVIExtractor that would advertise the wrong video...
Andreas Huber [Thu, 1 Dec 2011 18:19:52 +0000 (10:19 -0800)]
am 2c2ed7be: Merge "Fixes a typo in AVIExtractor that would advertise the wrong video dimensions" into ics-mr1

* commit '2c2ed7bef931f43dc0701ab723beb0cbed2cb630':
  Fixes a typo in AVIExtractor that would advertise the wrong video dimensions

12 years agoFixes a typo in AVIExtractor that would advertise the wrong video dimensions
Andreas Huber [Thu, 1 Dec 2011 18:02:37 +0000 (10:02 -0800)]
Fixes a typo in AVIExtractor that would advertise the wrong video dimensions

Change-Id: I587a5ce259b04c973ed2d7614e874cb74c521aab
related-to-bug: 5696324

12 years agoam 6f1dd757: Merge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1
Jamie Gennis [Wed, 30 Nov 2011 01:26:59 +0000 (17:26 -0800)]
am 6f1dd757: Merge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1

* commit '6f1dd757cb158d17c76baeb170f7db2271802ef8':
  SurfaceMediaSource: use the vid enc usage bit

12 years agoMerge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1
Jamie Gennis [Wed, 30 Nov 2011 01:25:09 +0000 (17:25 -0800)]
Merge "SurfaceMediaSource: use the vid enc usage bit" into ics-mr1

12 years agoam 564fee36: Merge "Make sure we can properly shutdown even if" into ics-mr1
Andreas Huber [Tue, 29 Nov 2011 22:30:46 +0000 (14:30 -0800)]
am 564fee36: Merge "Make sure we can properly shutdown even if" into ics-mr1

* commit '564fee36667e2699c59a29102136220dc2f65862':
  Make sure we can properly shutdown even if

12 years agoam d12dc284: Merge "If an error occurs that prevents us from reallocating buffers...
Andreas Huber [Tue, 29 Nov 2011 22:30:45 +0000 (14:30 -0800)]
am d12dc284: Merge "If an error occurs that prevents us from reallocating buffers during a format change" into ics-mr1

* commit 'd12dc28460f622ab29e83fa688ad83a8263e9417':
  If an error occurs that prevents us from reallocating buffers during a format change

12 years agoam 351143fb: Merge "Updated (internal) API for IStreamSource to signal discontinuitie...
Andreas Huber [Tue, 29 Nov 2011 22:30:43 +0000 (14:30 -0800)]
am 351143fb: Merge "Updated (internal) API for IStreamSource to signal discontinuities" into ics-mr1

* commit '351143fb0e2fcfb7dc2ef1045d693c71eb0ea329':
  Updated (internal) API for IStreamSource to signal discontinuities

12 years agoam 405a4e34: Merge "Finer granularity discontinuity support." into ics-mr1
Andreas Huber [Tue, 29 Nov 2011 22:30:40 +0000 (14:30 -0800)]
am 405a4e34: Merge "Finer granularity discontinuity support." into ics-mr1

* commit '405a4e34032f8a07028138266fe9f79f6753b466':
  Finer granularity discontinuity support.

12 years agoMerge "Make sure we can properly shutdown even if" into ics-mr1
Andreas Huber [Tue, 29 Nov 2011 22:09:10 +0000 (14:09 -0800)]
Merge "Make sure we can properly shutdown even if" into ics-mr1

12 years agoMerge "If an error occurs that prevents us from reallocating buffers during a format...
Andreas Huber [Tue, 29 Nov 2011 22:09:03 +0000 (14:09 -0800)]
Merge "If an error occurs that prevents us from reallocating buffers during a format change" into ics-mr1

12 years agoMerge "Updated (internal) API for IStreamSource to signal discontinuities" into ics-mr1
Andreas Huber [Tue, 29 Nov 2011 22:08:45 +0000 (14:08 -0800)]
Merge "Updated (internal) API for IStreamSource to signal discontinuities" into ics-mr1

12 years agoUpdated (internal) API for IStreamSource to signal discontinuities
Andreas Huber [Tue, 29 Nov 2011 19:57:35 +0000 (11:57 -0800)]
Updated (internal) API for IStreamSource to signal discontinuities

Change-Id: Idd4b9d8e7cec16b3e3c91c70e75144d42be30f96
related-to-bug: 5553055

12 years agoFiner granularity discontinuity support.
Andreas Huber [Mon, 28 Nov 2011 20:36:11 +0000 (12:36 -0800)]
Finer granularity discontinuity support.

No clients can signal a format change on either audio or video track (or both)
and a time discontinuity (timestamps changed) independantly.

Change-Id: I3e6cf4e7c260e85759879d61a9b517f68431c22f
related-to-bug: 5553055

12 years agoMake sure we can properly shutdown even if
Andreas Huber [Tue, 29 Nov 2011 00:27:35 +0000 (16:27 -0800)]
Make sure we can properly shutdown even if

a) one of the two decoders has a pending discontinuity
b) the renderer holds on to all output buffers for that decoder
c) the renderer is paused

if all three conditions are met the decoder won't ask for more input data
and therefore never see the discontinuity.

To avoid this we briefly resume the renderer just before shutting down.

Change-Id: I9e08af2a1eb4298d1cd00497d6aa33f4ad184e9a
related-to-bug: 5655016

12 years agoIf an error occurs that prevents us from reallocating buffers during a format change
Andreas Huber [Mon, 28 Nov 2011 18:54:12 +0000 (10:54 -0800)]
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

12 years agoam 20398fac: Merge "audioflinger: reduce sleep time to avoid underrun" into ics-mr1
Eric Laurent [Wed, 23 Nov 2011 20:32:30 +0000 (12:32 -0800)]
am 20398fac: Merge "audioflinger: reduce sleep time to avoid underrun" into ics-mr1

* commit '20398fac99ff78cb3ec3dd122930e45d409e0524':
  audioflinger: reduce sleep time to avoid underrun

12 years agoaudioflinger: reduce sleep time to avoid underrun
Eric Laurent [Wed, 23 Nov 2011 02:50:29 +0000 (18:50 -0800)]
audioflinger: reduce sleep time to avoid underrun

Progressively reduce the sleep time applied in MixerThread::threadLoop()
in case of consecutive application underruns to avoid starving the audio HAL.
As the default sleep time is longer than the duration of an audio buffer
we ended up writing less data than needed by the audio HAL if
the condition persisted.

Issue 5553055.

Change-Id: I2b23ee79c032efa945025db228beaecd1e07a2e5

12 years agoam cb6fbc89: Merge "Report a runtime error instead of asserting on malformed avc...
Andreas Huber [Tue, 22 Nov 2011 16:41:26 +0000 (08:41 -0800)]
am cb6fbc89: Merge "Report a runtime error instead of asserting on malformed avc configuration data." into ics-mr1

* commit 'cb6fbc89c25298643ab342b4a228e772b0e56978':
  Report a runtime error instead of asserting on malformed avc configuration data.

12 years agoMerge "Report a runtime error instead of asserting on malformed avc configuration...
Andreas Huber [Tue, 22 Nov 2011 16:39:11 +0000 (08:39 -0800)]
Merge "Report a runtime error instead of asserting on malformed avc configuration data." into ics-mr1

12 years agoam 02740dc4: Merge "Fix log spamming during time lapse video recording" into ics-mr1
James Dong [Tue, 22 Nov 2011 04:30:14 +0000 (20:30 -0800)]
am 02740dc4: Merge "Fix log spamming during time lapse video recording" into ics-mr1

* commit '02740dc49df86fc94c872454aa9db98737d5e8c8':
  Fix log spamming during time lapse video recording

12 years agoSurfaceMediaSource: use the vid enc usage bit
Jamie Gennis [Tue, 22 Nov 2011 00:51:47 +0000 (16:51 -0800)]
SurfaceMediaSource: use the vid enc usage bit

This change makes SurfaceMediaSource add the VIDEO_ENC usage bit when
allocating its GraphicBuffers rather than the HW_TEXTURE bit.

Change-Id: Ie20e225c894fdbc31cad6bb82b3b64c7e98074eb

12 years agoFix log spamming during time lapse video recording
James Dong [Sun, 20 Nov 2011 17:45:44 +0000 (09:45 -0800)]
Fix log spamming during time lapse video recording

Change-Id: I4fc0809203684ebb02eaf217d7abad00aefc898f

related-to-bug: 5626569

12 years agoam 7ff7821a: am d4b22ab4: status_t != bool
Marco Nelissen [Fri, 18 Nov 2011 23:10:38 +0000 (15:10 -0800)]
am 7ff7821a: am d4b22ab4: status_t != bool

* commit '7ff7821a601a39fffb318e29873957b4a3703c46':
  status_t != bool

12 years agoam d4b22ab4: status_t != bool
Marco Nelissen [Fri, 18 Nov 2011 23:07:21 +0000 (15:07 -0800)]
am d4b22ab4: status_t != bool

* commit 'd4b22ab4889f9b1885bfc0dc45667c846a171a98':
  status_t != bool

12 years agostatus_t != bool
Marco Nelissen [Fri, 18 Nov 2011 21:10:56 +0000 (13:10 -0800)]
status_t != bool

b/5567433

Change-Id: I255ab8c3b0b5e0ea6a5cc7c05df757c667f3855e

12 years agoReport a runtime error instead of asserting on malformed avc configuration data.
Andreas Huber [Fri, 18 Nov 2011 20:22:59 +0000 (12:22 -0800)]
Report a runtime error instead of asserting on malformed avc configuration data.

Change-Id: Ibcd9c3fb5b6532eba843ed80ecdcdacaf50d8845
related-to-bug: 5641069