History log of /system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
42d2daefb2508a4f8f05ce8fe4c6b7da9f3d896d 10-Nov-2011 Glenn Kasten <gkasten@google.com> Bug 5201321 recover from mediaserver crash

Add a media player death notifier to recover from media server crashes.
Downgrade some logs.
Destructors should be protected.

Change-Id: I7774733bcb12fc7fbfe237bdbeffca1adde46e78
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
8d7bd3c0c920ba70cbf3cc762411902c94c35253 26-Oct-2011 Andreas Huber <andih@google.com> Remove MediaPlayer::setVideoSurface legacy.

Change-Id: I95aa181f39b375087b30ac65fea37589108c9f16
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
13ffc7f7c69e2fabf1ef70ebb2ea81489be9bd74 28-Oct-2011 Glenn Kasten <gkasten@google.com> am d0b07222: Merge "Bug 5526807 inform client of errors after prepare" into ics-mr0

* commit 'd0b0722276aea9a06a118a64abfc8b3e9498e931':
Bug 5526807 inform client of errors after prepare
31cc0d9597a502a2c81ff318556adde92d50590a 27-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5526807 inform client of errors after prepare

Change-Id: Ic5c88f8e1c8e7d6226a7a71a2a89a70f0fa876f8
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
9a371a201366ff0c0c132a31029a6c2357400b3e 25-Oct-2011 Ed Heyl <ed@google.com> Merge remote branch 'goog/ics-mr0' into ics-mr1
ba6d04f523bf6c3c2d4ed6975109e72f328889b8 24-Oct-2011 Glenn Kasten <gkasten@google.com> Bug 5505856 remove incorrect setDataSource(NULL)

Change-Id: Id23cbc43b56c014f5931cd1e941c12a773dba2b5
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
891673f650f233f17f60e2c663fa24279b8dc9af 30-Sep-2011 Glenn Kasten <gkasten@google.com> Fix race in getting duration

mDuration is protected by mSettingsLock because it is accessed from both
the ALooper thread and from the application thread, but only one of the
two "set"s was using the lock, and the "get" was not using the lock.

Also added some comments about the lock, and moved lock closer inside { }.

Change-Id: I7c96186f31baaad1b941d934549cb50d4f82d0c8
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
810d56b4cf6c5893b48e7d56166bb18635052dec 11-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Multithread safety and code reduction"
e851581e7a62192f69626b9a0d2e5380a4d3979c 30-Sep-2011 Glenn Kasten <gkasten@google.com> Multithread safety and code reduction

Remove unsafe GenericPlayer::getSampleRate(). getSampleRate() was not
thread-safe as it accessed a member variable updated in the looper thread
without a lock. If getSampleRate() is ever needed again, the sample rate
is available in the mPcmFormatValues array, which does have a lock.

Replace member variables mChannelMask, mChannelCount, and mSampleRateHz
by local variables for locality and performance.

Change-Id: Ibf92ed090430153d748ded4d0b835e429df47eea
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
1fee010d186474f0ffbd954fbdbfe7ff873e4746 11-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5293383 ~StreamSourceAppProxy wasn't reached"
3adea07faf6124cfbc68d2db80e05f4cced9dfa9 12-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5293383 ~StreamSourceAppProxy wasn't reached

Fix bug where StreamSourceAppProxy destructor wasn't reached,
which caused all sorts of other problems later on. To see this,
enable the logs StreamSourceAppProxy::~StreamSourceAppProxy and
StreamPlayer::~StreamPlayer. You'll see that StreamPlayer was destroyed,
but not StreamSourceAppProxy.

As StreamSourceAppProxy is child of StreamPlayer, make the reference
from StreamSourceAppProxy to StreamPlayer a weak reference in case
StreamSourceAppProxy's lifetime exceeds StreamPlayer. It is not supposed
to any more with this fix, but the wp<> provides extra safety.

StreamPlayer preDestroy no longer bypasses the preDestroy in
GenericMediaPlayer.

Do a full disconnect in GenericMediaPlayer::preDestroy.

Push decremented reference counts for strong pointer through binder
to workaround binder's "optimization".

Extra error-checking in setListener and setBuffers to verify
that mediaserver is calling them correctly.

Use mutex mLock consistently in StreamSourceAppProxy.

Add an explicit StreamSourceAppProxy::disconnect to break
a circular reference, and call it in StreamPlayer destructor.

Make methods private: receivedCmd_l and receivedBuffer_l.

Add explicit clear during preDestroy to give up references earlier.

Warning: setDataSource(NULL) is not supported by NuPlayer yet,
this depends on another change in frameworks/base, so it is
commented out for now.

Rename mPlayerPrepared to mPreparedPlayer to avoid confusion with the
enum mPlayerPrepared.

Change-Id: Ie5f554c206027d22204eb86edd15489c6281b512
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
cd8656c85980f7e239e725028d9c0f2045f3aba7 10-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Don't update prepare state more than once"
5094d062ec703d4108649070f8a20aa874911cf2 04-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5385386 missing HEADATNEWPOS"
5a7123b8f2a7c726ff5d5ef89952b213a4da8411 04-Oct-2011 Glenn Kasten <gkasten@google.com> Don't update prepare state more than once

If a MEDIA_ERROR event is received during preparation, it indicates
that prepare has completed unsuccessfully. However, MEDIA_ERROR can
also legitimately be sent after successful prepare. In that case, don't
update the prepare state.

Similarly, in the unlikely case that MEDIA_PREPARED is received after
prepare has already completed successfully or unsuccessfully, ignore it.
This probably indicates a buggy mediaserver, but we wouldn't want that
to take down the client also.

Change-Id: I2a92e98d13b70d1aa5ff6f440ad528f6896a2ead
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
6e4a403130d31d2ec2804ff1572140690276c496 01-Oct-2011 Glenn Kasten <gkasten@google.com> Merge "Remove dead code"
29c0e5eb471b5d3f519887da6ee067da6f2fcd33 28-Sep-2011 Glenn Kasten <gkasten@google.com> Remove dead code

Change-Id: Ic68d4d7b942ef99120ad30ee3ef7ce48ff1d697a
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
22c4f2714b5a419ba350ba733a78d17e09fbd2c3 29-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5385386 missing HEADATNEWPOS

Workaround for mediaserver bug where it does not send MEDIA_SEEK_COMPLETE
to the MediaPlayerNotifier after a discontinuity is processed.

Instead, we simulate a seek complete event in this case.
A short delay is applied to compensate for shared memory latency.

A longer-term fix will be to have mediaserver send the event.

Change-Id: Id0d01b842a145fa5762d44f03144741152f7b03f
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
51627b879ac8c1ef34028801d9d6b697f362c405 16-Sep-2011 Glenn Kasten <gkasten@google.com> Bug 5334969 MediaPlayerNotificationClient safety

Fixed race due to missing mutex around 2 updates to mPlayerPrepared.

MediaPlayerNotificationClient had a raw reference to GenericMediaPlayer;
if for some reason the binder thread out-lived the GenericMediaPlayer,
then it might reference a destroyed object. Made it a weak reference,
and issue warning if the GenericMediaPlayer has been destroyed.
This has similar effect as a callback protector.

Minor related:
- mHasVideo is read without mutex, safe since never changed but make it const
- GenericMediaPlayer's reference to MediaPlayerNotificationClient is now const also

Change-Id: I67b50e861a055c73fd490fb537a3d6d23d25c3d2
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
abf6db3696e93960f7bc943e8235ba31f73e5c3f 24-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5193695 Fix crash after MediaPlayer destroyed

The StreamSource callback thread was continuing to run after the
MediaPlayer object was destroyed. Fixed by adding a callback protector
and a pre-destroy hook. GenericMediaPlayer::preDestroy now also
calls MediaPlayer::stop just in case.

Change-Id: I5bd771d4d1936f433d2a8c9959593782c96daed9
Miscellaneous:
- added an explicit destructor on CMediaPlayer::mAVPlayer for consistency
(probably not a bug since there was a clear on it earlier)
- updated comments for CallbackProtector
- made some CallbackProtector fields private since no sub-classes yet
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
d62f504ebe6a3f9b15c6115f9add1c4fed87d847 11-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5153313 keep compatibility of local files URI

Also fix a bug in decode from fd to PCM buffer queue, where
we were closing the application's fd.

Change-Id: I220cd1c242f2f5e240b4dd1b9e8d79c88878bdcd
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
feab9b6558fd4d08de14a54c30d1ffc46d41be92 19-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5126938 dependency for video sinks"
6bd00f9169990c3b9e84b03ef1c5c27ed50a37d1 13-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5161265 Recover from mediaserver process crash

Use the utility method IMediaDeathNotifier::getMediaPlayerService()
to get a reference to media player service. It retries after errors,
and keeps a single global per-process reference to the service rather
than one per object. If we still can't contact the media player service
after retries, handle it like an unsuccessful prepare.

Miscellaneous:
- Remove unused field Parcel metadatafilter

Change-Id: I451a64bd76b4a7f157774abe967448ec081f1014
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
39671763229bf1140c8e1c1b6cd4c072cbd4eb6c 08-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5126938 dependency for video sinks

Fixing bug 5126938 will involve configuring the video sink in two places:
at the initial data locator when creating the MediaPlayer object, and
then later in the IAndroidConfiguration interface. This CL is preparation
for that.

Details:
- Abstract out common code into android_Player_setNativeWindow.
- Move the code for checking and initializing the video sink from an
#ifdef ANDROID in the CMediaPlayer_Realize portable code to into
platform-specific android_Player_realize.
- Only set one of mSurface or mSurfaceTexture to non-NULL.
- For methods which can't fail, replace the SLresult return value by void.

Change-Id: Iec8fd91e1a6de45eb64241b35e3f7d7faf63d727
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
8c2aa18530c67c95852f98e291ee9167bc680de8 05-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5903270 play interface, events, markers, etc."
a81ac67d31590942f5a3a8233cf9759c20a494dc 29-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5903270 play interface, events, markers, etc.

As the media framework does not directly support marker and periodic
callbacks, we use a retriggerable one-shot timer at application level
to emulate this. This has the advantage of being faster, but is also
less accurate than if it were in the framework.

Details:
- Get position is now synchronous and (mostly) lock-free
- Fix regression in SL_PLAYEVENT_HEADATMARKER and SL_PLAYEVENTHEADATNEWPOS
- Fix SMP races in GetPlayState, GetCallbackEventsMask, GetMarkerPosition,
GetPositionUpdatePeriod
- AudioSfDecoder was not updating mPositionMsec when getPositionUsec failed
- Updating attributes is relatively expensive, so only do it when a significant change
in SetMarkerPosition, ClearMarkerPosition, SetPositionUpdatePeriod
- Error on unknown message type in onMessageReceived
- Delete an obsolete FIXME
- "Clearing" a marker is now equivalent to disabling the marker event,
and the default marker position is cleared.
- use Android time units and types (int32_t, ANDROID_UNKNOWN_TIME, etc.) where appropriate
instead of SLmillisecond and SL_TIME_UNKNOWN

Change-Id: Ib78bafa20d883b8d927364769663837389b6ea1d
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
0b02ad8c6715ac9d8526e4229a6030ef436704bc 03-Aug-2011 Glenn Kasten <gkasten@google.com> Bug 5110581 SL_PLAYEVENT_HEADATEND while looping

Change-Id: Ia4d0433b4a6589bfda2f88addbe5b7eb3d0d9789
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
37b926ac68d4516d07ae485c49057aab5d366340 02-Aug-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5080320 MediaPlayer volume"
0afa0fdcde5876941eaefaacc778984ec4efefa0 28-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5080320 MediaPlayer volume

Details:
- re-factor volume-related code yet again
- remove dead variables mAmplFromVolLevel, mAmplFromStereoPos, mDirectLevel
- add placeholders for kEventPrefetchFillLevelUpdate and kEventPrefetchStatusChange

Known issues:
- MPEG-2 TS doesn't yet implement the ability to query channel count, so default to stereo

Change-Id: Ic0f2297b267dc3d380755e8d314e1d5f0f659d7c
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
e0ff127e9dc760359bcd5410cc0984a13cccd477 29-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5092976 no spurious callbacks on prefetch fail"
5ec63c4998f9b1d8c30363f21cbecc7ffc5d152a 26-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5081346 fix whole file looping

Change-Id: If4e233f9007d7e48225a342a43f06df7f66cdea7
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
f037e5965c0a0e6a918344753dc59bf4e8149d10 29-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5092976 no spurious callbacks on prefetch fail

Change-Id: I754085b4d1e43c4d10bea36e0fb683d8113844e9
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
7e4729ac84d876de3ae439ae9cfef41701d6a2a2 25-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 4599730 fix mute solo, channel count, volume

Change-Id: I1624c744168233c4ef79f2cd3090447b8aa7d53b
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
41562990ca46e5d6c4aadde6c2469b8007bb980c 22-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5045590 preset reverb on audio players

Aux effects on MediaPlayer audio players (non-AudioTrack) were broken

Change-Id: I5b97bee08d809b12cb9815d6d277934123780581
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
990fae9062f84ee737b8b379818afc101cb7bb02 22-Jul-2011 Glenn Kasten <gkasten@google.com> Merge "Bug 5047695 Handle unsuccessful prepare up to app"
e1c913c670ee6f38940555b4247bc4a572eaa798 21-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5047695 Handle unsuccessful prepare up to app

Change-Id: I9f1541b37ad5cda21dc49388e42c7fb08b22fc5b
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
6e00efb769f780bc46c2ccda92688ba890623fb4 21-Jul-2011 Glenn Kasten <gkasten@google.com> Add more verbose logging

Change-Id: I0cccee0d59fe3eefc6ef94b22bb6100d96bccdff
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
5dc09fe1d61c11a91343237032d65163fe691297 20-Jul-2011 Glenn Kasten <gkasten@google.com> Bug 5047695 missing cases

Change-Id: I9ae27ed4e977568a9687b9dd18eb998651569b24
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
bbaef0633cc7e9509e462c65d071d76e2857ffe9 19-Jul-2011 Glenn Kasten <gkasten@google.com> Reduce logging

Change-Id: I71c5e016147002fa84a56fc703da52e7b5c8417a
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
c6941c3f417cc80983f2a4d84688bf3a15af0ac0 12-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Implement XAPlayItf::GetPosition on MediaPlayer

The play interface was only in place for routing calls to an
AudioPlayer in OpenSL ES, not in OpenMAX AL for a MediaPlayer.

Change-Id: Icf514be428396264252874faf1060c76ddee9545
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
1b3d049fdaa0dfb601e5b7f482e04e84d38d2f93 08-Jul-2011 Jean-Michel Trivi <jmtrivi@google.com> Implement GetPosition for players playing from a URI/FD

AudioPlayer (OpenSL ES) and MediaPlayer (OpenMAX AL) that play
media from a URI or FD are implemented on top of an Android
MediaPlayer. This CL implements requesting the current position
from the underlying MediaPlayer object inside the event loop.
At this stage, GetPosition cannot be called from inside a
callback as the callback is made on the same thread that will
process the asynchronous part of the GetPosition implementation.
Add test app for GetPosition.

Change-Id: Ife768bc40e37fc60cc19f6ba84bbe6cb06cc6590
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
cd422d88f508397adf8f6b492a82f0d9baee5b88 14-Apr-2011 Gloria Wang <gwang@google.com> - Add another parameter in notify() to be able to send timed text sample
through listener during video playback.
For feature request 800939.

Change-Id: I14aa18d2f803163a62c05f9e6bd990518c58cd3f
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
f096e77e6cbfc60263f42b435cb34fbab7be2e45 13-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix stuttering at beginning of playback

When an AudioPlayer is created, its playstate is set to STOPPED
three times. A stop command is translated into a pause + seek(0).
When a seek is underway, any new seek command was postponed. So
when playback would start after a first seek(0), the other seeks
would be executed, causing the stutterring.
This CL verifies that, when seeking to a certain time, any new
seek command to the same point in time received while seeking
is ignored.
It also correct the update of mStateFlags, which should be done
BEFORE the command is issued to the player, in case the seek
complete notification happens syncronously with the seek command.

This CL does NOT fix why a newly created player sees its playstate
updated to STOPPED three times in a test app like slesTest_playUri
before playback starts.

Change-Id: Ic7627678735f559b911ea3c5a0e1e00d7d7534d2
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
3f324661dd8bf33dd3fb2afeb84fbb05262a0d08 13-Apr-2011 Glenn Kasten <gkasten@google.com> Fix various bugs found with unit tests

ISeek::SetLoop was returning undefined status.
Khronos Bug 7614 - sizeof(long) != 32 bits on x86_64.
Fix bug in IID hashing due to the above.
Fix bug in GenericMediaPlayer::onLoop; was using mPlayer without checking for NULL.
Fix wrong API level in tests/sandbox/object.c.
Decrease log level from I to V in MediaPlayerNotificationClient::notify
and GenericPlayer::~GenericPlayer.
Fix memory leak in tests/sandbox/engine.c.
Comment out overly verbose log in tests/sandbox/streamSource/slesTestPlayStream.cpp.

Change-Id: I322fa9e19ee95ea1e18870a20f6a3c03b8f21208
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
2c822e4a9be125252fe3e1f75d8d731880525779 11-Apr-2011 Jean-Michel Trivi <jmtrivi@google.com> Use reference to sp on GenericPlayer

When an object like GenericPlayer is stored in CAudioPlayer or
CMediaPlayer by a sp, don't use a pointer to GenericPlayer when
the object is passed as a function parameter, but rather use
a reference to the sp that maintains it.

Change-Id: I49ff219618ac4b657deb43cfffb65f0e0dd6d58d
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
8ad101d5bcaca289da3d820e2b87b5da55e560f9 29-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Move support for SL URI and FD playback under GenericPlayer class

The SfPlayer class was implementing URI and FD decode and playback
in the application process. This CL removes this class entirely
and moves its functionality under the GenericPlayer class. This
means that the playback of URIs and FDs is now implemented through
an android::MediaPlayer object running in the media service.

The SfPlayer header had many StageFright and system includes, which
are now moved to the relevant files where they are required,
instead of automagically coming from sles_allinclusive.h.

Note that this CL breaks support for the following OpenSL ES features
due to missing Android MediaPlayer features:
SLPlayItf.GetPosition
HEADATMARKER
HEADATNEWPOSITION
SLVolumeItf.EnableStereoPosition
SetStereoPosition
SLMuteSoloItf
SLPlaybackRateItf

Support for those features will be reintegrated in subsequent CLs.

Change-Id: I8d7f6ea006eb7b876ef1ca1909d74b4517335850
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
d004feb25e830dd92a8d6e6af0d363e4d11721a2 29-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Reduce include noise in SL and XA class definitions

In classes.h: we should only have to include the headers
for the objects that are actually stored as member variables of
the OpenSL ES and OpenMAX AL objects (so here AudioTrackProtector,
Effect, and GenericPlayer).
In CMediaPlayer.c: remove useless includes and change the video
surface function prototypes to use const refs to strong pointers
instead of pointers to access the GenericMediaPlayer objects.

Note that android_SfPlayer.h is still in sles_allinclusive.h because
it will be dealt with when the SfPlayer functionality is absorbed
under LocAVPlayer.

Change-Id: Ic2c9459862588399d9545a247cc15341effc0f66
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
30ebe675beff91283cc72d4ee5e94e56ab7e107f 16-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 clean logs, PTS should be unsigned

- Don't pollute logs.
- Save MPEG-2 PTS as an unsigned 64bit value, negative values are
invalid.

Change-Id: I51d427789dd1e42219a63c68159f2e28628f0448
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
fcc996296bdbf6c3949ad4312991fdde4ae2e157 09-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 Implement streamInformation and volume in OpenMAX AL

- Implement StreamInformation for video size notification.
- Implement the XAVolumeItf for volume control
- Fix bug in GUID -> MPH hash.
- Fixed typo in GenericPlayer::pause() log
- Do not signal a discontinuity automatically when the ABQ is
cleared because clearing the queue doesn't imply there will
be a discontinuity in the data (e.g. the same data that was
cleared could be reenqueued)
- In "native-media" test app: add test code to exercise the
XAVolumeItf functionality.

Change-Id: I9f69f8cacbdce51b6d96d60141ec1d0f645df991
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
5b21a0626e173d407aa3835e5cffcaa9b582016d 07-Mar-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 3329759 support commands in SLAndroidBufferQueueItf

Support for EOS, DISCONTINUITY, and DISCONTINUITY with
a PTS.

- in IAndroidBufferQueue structure, added buffer type
- modified AdvancedBufferHeader structure to have a buffer
type-specific structure that contains all the items for each
buffer
- added parsing of items when enqueueing a buffer
- enforce buffer size enqueue to be a multiple of MPEG-2 TS
block size for buffer of the corresponding types
- when enqueueing a buffer on an empty queue, implemented
an asynchronous notification on StreamPlayer to consume
the newly queued buffer. Verified this kicks off playback
after having starved the framework for buffers.
- report unknown duration when using AndroidBufferQueue

Change-Id: I9bde97a6c6ffca7d376b4963313b820b35f50a26
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
13a07de046bce3663b905a892dbaf770a54d982d 05-Mar-2011 Glenn Kasten <gkasten@google.com> Bug 3329759 Surface texture as video sink

XA_DATALOCATOR_NATIVEDISPLAY now allows either a Surface or SurfaceTexture
together with a JNIEnv *.

Miscellaneous fixes:
- Clarify test button labels.
- Line length 100.
- Fix typos in XA_DATALOCATOR_ANDROIDFD and XA_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE.

Change-Id: I3f3c604dfda3cf66ef7d7adc8689564a83623b2f
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp
e8af8705a6eb3b8ebd239c379d9143dc69c363d4 24-Feb-2011 Jean-Michel Trivi <jmtrivi@google.com> OpenMAX AL: consolidate MediaPlayer implementations under superclass

The OpenMAX AL MediaPlayer object has two implementations: one
for playing from URI/FD (LocAVPlayer) and one for playing from
AndroidBufferQueue (StreamPlayer). They both inherit from AVPlayer.
This CL makes LocAVPlayer and StreamPlayer inherit from
GenericMediaPlayer (new name of AVPlayer) which encapsulates the
interaction with an android::MediaPlayer instance running in
the media server process.
Also it makes GenericMediaPlayer inherit from GenericPlayer, the
player superclass also used in OpenSL ES.

After this CL, the OpenMAX AL and OpenSL ES have a common class
hierarchy for their players.

Change-Id: I5f6e279fc29b7f6f26c9ed5c83a9455cfda88ff4
/system/media/wilhelm/src/android/android_GenericMediaPlayer.cpp