summaryrefslogtreecommitdiffstats
path: root/media/libmedia/IMediaPlayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* stagefright: Squashed commit of pause/resume featuresSteve Kondik2015-11-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 2 APIs (suspend/resume) in MediaPlayer - API:suspend() will just pause the player and release all the decoders to replace release() which will release the whole player - API:resume() will just init the decoders again, then start() will be called to restart streaming playback - Add a check in AwesomePlayer::onVideoEvent() to make sure the first seek operation will always seek to the next i-frame Change-Id: Ie4c82906a2a056378119921a656128ebdc1007c4 audio: Add pause support for hardware omx component - ADSP doesn't enter sleep state after wma playback is paused and power suspended. - No support for NT session pause in case of hardware component. NT session need to be paused to put ADSP into power collapse. - Add support of pause in stagefright to ensure device enters suspend mode. Also add intermediate states to avoid concurrency issues between read and pause. Change-Id: I41b946b8c8805e6ee303646b63513b5b16514ef6 libstagefright: Drain input buffer on resume - Buffers returned from codec in paused state are not drained. When codec is resumed these buffers are not drained until the next flush, and may cause timed out issue. - Added change to drain input buffers for sw decoders when resuming. Change-Id: Ida2ab1d5dc3a1910accdd6fb89548262a912d8e7 CRs-Fixed: 569585, 574967 libstagefright: camcorder pause-resume implementation - Add pause resume feature in camcorder app. So that user can pause recording and resume later which results in a single recorded clip. Change-Id: Id19c45ae5bb85265aa4d5304b160ebf119d9575a libstagefright: support pause/resume for timelapse recording Modify the timestamp calculation mechanism in CameraSourceTimeLapse in order to support pause/resume. Change-Id: Icb02ea798b0b807ffb7ada2d1ef5b2414b74edfb
* Zero out return values in media binder callsRobert Shih2015-09-281-2/+2
| | | | | | | | | | | More specifically when handling: * GET_STREAM_VOLUME in IAudioPolicyService, and * GET_CURRENT_POSITION and GET_DURATION in IMediaPlayer This prevents leaking uninitialized values across binder in error cases. Bug: 23756261 Change-Id: I0ffd900ab12b685b0611259ade4a3efb1ec5defe
* IMediaPlayer.cpp: make sure structures are initialized to 0Nick Kralevich2015-09-021-0/+2
| | | | | | | | Credit https://code.google.com/p/android/issues/detail?id=183310 Bug: 23515142 Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427 (cherry picked from commit b73b826cc16291b33649402497efbe0f946413bd)
* stagefright: support setting/getting playback/sync config in MediaSyncLajos Molnar2015-04-301-6/+102
| | | | | | | Bug: 18249558 Bug: 19666434 Bug: 20057497 Change-Id: I5868b17423d7c20cfaf4a399f3eb67bfba440605
* Unhide the android.media.[Media]DataSource interface.Chris Watkins2015-04-151-0/+17
| | | | | | | | | | | | | | | | | | | | | This allows apps to implement MediaDataSource, which is modeled on stagefright's DataSource, to supply media data to the framework. This was already implemented for MediaExtractor, but it was renamed from DataSource. MediaExtractor, MediaPlayer and MediaMetadataRetriever each have a new overload: #setDataSource(android.media.MediaDataSource) Only NuPlayer supports this new data source. The change introduces: * IDataSource: The binder interface for DataSource. * JMediaDataSource: The native counterpart to the java interface. It implements IDataSource. * CallbackDataSource: A stagefright DataSource that wraps an IDataSource. Change-Id: Ib3c944b49cc8a792c8eb9c85e5015c07f298ebc1
* namespace does not need a closing semicolonGlenn Kasten2015-03-231-1/+1
| | | | Change-Id: Ie8f9d42fc061f6d558f23b98414e04eb3d14b376
* mediaplayer: support dynamic playback rateWei Jia2015-02-241-0/+15
| | | | | | Bug: 19196501 Change-Id: I856b1507d5fa2cedfb645706d2435683a7d3e050
* Update calls to IInterface::asBinder()Marco Nelissen2014-11-141-4/+4
| | | | | | to use the new static version. Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c
* Adjust to asBinder()'s new behaviorMarco Nelissen2014-11-121-3/+3
| | | | Change-Id: I2de9e3770d4989bc201d886f4580747569b203dc
* FINAL ATTEMPT: HTTP services are now provided from JAVA and made available ↵Andreas Huber2014-02-041-2/+17
| | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-7/+7
| | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
* Add the ability to dynamicaly register MediaPlayer types.John Grossman2012-08-131-1/+33
| | | | | | | | | | | | Add the ability to dynamically register low level MediaPlayer factories which will be probed at setDataSource time to determine the proper MediaPlayerBase to instantiate. This change is in preparation for moving libaah_rtp out of frameworks/base and into phantasm platform directory. Change-Id: Icf8904db3ab9e3c85df6e780d5546d9988cb9076 Signed-off-by: John Grossman <johngro@google.com>
* Merge "Gapless playback, step 1."Marco Nelissen2012-03-131-1/+14
|\
| * Gapless playback, step 1.Marco Nelissen2012-03-131-1/+14
| | | | | | | | | | | | | | Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly by reusing the initial AudioTrack for subsequent players. Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
* | Whitespace and indentationGlenn Kasten2012-03-131-1/+1
|/ | | | | | | | | | | | | | Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
* Switch the way we configure for MediaPlayer retransmission.John Grossman2012-03-011-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a cherry-pick of I6ab07d89b2eeb0650e634b8c3b7a0b36aba4e7dd with merge conflicts addressed by hand and additional changes made in response to code review feedback. 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: I3b46c5227bbf69acb2f3cc4f93cfccad9777be98 Signed-off-by: John Grossman <johngro@google.com>
* fix libgui header locationMathias Agopian2012-02-271-2/+0
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Use audio_stream_type_t consistentlyGlenn Kasten2012-01-131-3/+3
| | | | | | | | | At native level it was a mixture of audio_stream_type_t, int, uint32_t, and uint8_t. Java is still int. Also fixed a couple of hard-coded -1 instead of AUDIO_STREAM_DEFAULT, and in startToneCommand a hard-coded 0 instead of AUDIO_STREAM_VOICE_CALL. Change-Id: Ia33bfd70edca8c2daec9052984b369cd8eee2a83
* Remove surface legacy APIs and code.Andreas Huber2011-10-281-17/+0
| | | | | | All surfaces are now supported through surface textures. Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
* Bug 5270905 fix MediaPlayer with IStreamSourceGlenn Kasten2011-09-071-0/+1
| | | | Change-Id: Ia8a6381a6c88b4a0a1378aab03f5275f0fa1125a
* Require INTERNET permission for network-based content.Dave Burke2011-09-021-0/+71
| | | | | | Bug #1870981 Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
* Fix ordering assumption of argument evaluation.Gloria Wang2011-08-011-2/+6
| | | | | | | | | | No specific order is specified in the C++ standard, but the order of the calls to Parcel read commands matters. Move any calls with multiple reads to local variables. Fix for bug 5104979. Change-Id: I709aa040e990d2659e7a3a089f7a42ae812de9ff
* Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-291-0/+39
| | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* Return status code from invoke()James Dong2011-04-061-4/+5
| | | | | Change-Id: Ie64b418d2a1f44e07942399c285b460c68f8e14f related-to-bug: 4199781
* Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-231-1/+23
| | | | | | | | | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the video sink for an android.media.MediaPlayer. The new API MediaPlayer.setTexture is currently hidden. This includes: - New Java and C++ interfaces - C++ plumbing and implementation (JNI, Binder) - Stagefright AwesomePlayer and NuPlayer use ANativeWindow (either Surface or SurfaceTextureClient) Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
* Remove all traces of legacy renderer support in stagefright.Andreas Huber2010-11-161-16/+0
| | | | Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
* Squashed commit of the following:Andreas Huber2010-10-291-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 0d5694ba2d399dd0869532a4d6256448185a1be0 Author: Andreas Huber <andih@google.com> Date: Fri Oct 29 11:59:23 2010 -0700 suspend() and resume() methods on VideoView are back but don't do anything. They need to be back because they were public before. Change-Id: Iddfd1021ffcf341f26e8d55ba761fd33701e2425 commit 16192891ed7d349ee97e47d1729d20a2d0d247b8 Author: Andreas Huber <andih@google.com> Date: Fri Oct 29 11:47:05 2010 -0700 Revert "New API on VideoView widget to suspend/resume a session. Do not release the MediaPlayer client for video suspending/resuming." This reverts commit 2e1818a4d16c3309660f27286c77d8d1eee95a25. Conflicts: api/current.xml Change-Id: I68dd1d05871044faf3f832d0838aa40bc7f890e5 commit 8f934dc1a3ae4e60f0790fcf97671e063fa20fad Author: Andreas Huber <andih@google.com> Date: Fri Oct 29 11:44:16 2010 -0700 Revert "Release mediaplayer if the current state is not suspending. Fix for bug 2480093." This reverts commit efb882cf75eef39ecaf9f8920ed302a019fa629f. commit f2ed03550887986f39d36b5dabcd9e919949c7cf Author: Andreas Huber <andih@google.com> Date: Fri Oct 29 11:44:08 2010 -0700 Revert "Release MediaPlayer if suspend() returns false." This reverts commit 047212fd4ea360675e94d3ce83c7f5544f65b268. commit 441ecce678bd24e9660a72c8627b5bd94433ff8b Author: Andreas Huber <andih@google.com> Date: Fri Oct 29 11:40:46 2010 -0700 manually. Change-Id: I4fdd43c9f7c8b3eedddb31a196da4984e1c58e87 Change-Id: I60d4b10e7a9e4ed8d9a796f1711618f557eb6e89
* Squashed commit of the following:Andreas Huber2010-08-231-2/+19
| | | | | | | | | | | | | | | | | | | | | | commit 35cc68814a9537c31fde146e171e7b0bbdfe211e Author: Andreas Huber <andih@google.com> Date: Mon Aug 16 08:48:42 2010 -0700 Only enable support for yuv to yuv conversion on passion, where it's available, use the slower yuv->rgb565 path everywhere else. commit d8ac5a8814103e60d11d2acf61997fc31a1dc58d Author: Andreas Huber <andih@google.com> Date: Fri Aug 13 13:56:44 2010 -0700 The software renderer takes over all rendering, converting from yuv to yuv if possible and rgb565 otherwise. commit 684972074b74318bdcb826ed9b5b0864d2d2e273 Author: Andreas Huber <andih@google.com> Date: Fri Aug 13 09:34:35 2010 -0700 A first shot at supporting the new rendering APIs. Change-Id: Iea9b32856da46950501f1a700f616b5feac710fd
* Added support for auxiliary audio effects to AudioTrack and MediaPlayer.Eric Laurent2010-07-211-0/+30
| | | | | | | | Added methods to AudioTrack and MediaPlayer java classes to enable use of auxiliary audio effects. The effect can be attached and detached by specifying its ID and the send level controlled. Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
* New API on java's MediaPlayer to suspend/resume a session.Andreas Huber2010-02-121-0/+32
| | | | related-to-bug: 2231576
* split libsurfaceflinger_client and libcamera_client out of libuiMathias Agopian2010-02-111-1/+1
|
* Basic plumbing to retrieve metadata from the native player.Nicolas Catania2009-07-101-2/+21
| | | | | | | | | | | | | | | | | | | IMediaPlayer.h Added a getMetadata method that mirrors the on in MediaPlayer.java. MediaPlayer.java Added a native method to get the metadata from the native player. Parse the parcel into a Metadata object. Metadata.java Added a stub to parse the Parcel returned by the native player into a set of metadata. android_media_MediaPlayer.cpp JNI call to forward the getMetadata call. MediaPlayerService.cpp MediaPlayerService::Client implements the new getMetadata method added in IMediaPlayer.h
* Implemented the metadata changed notification filters.Nicolas Catania2009-07-091-0/+15
| | | | | | | | | | | | | | | | | | IMediaPlayer: new setMetadataFilter method so set a filter (2 lists of allowed and blocked metadata type) serialized in a Parcel. MediaPlayer.java/android_media_MediaPlayer.cpp/mediaplayer.cpp new setMetadataFilter that passes the filter down to the MediaPlayerService's binder interface. MediaPlayerService.cpp The Client inner class holds the allowed and blocked metadata types. These are in 2 vectors that get populated in the setMetadataFilter. A new shourldDropMetadata method returns true if a type of metadata should be dropped according to the filters. The notify method in run the metadata update notifications thru the filter and possibly drop them.
* Direct api to the native media player.Nicolas Catania2009-06-241-1/+14
| | | | | | | | | | | | | | | | | | | | | MediaPlayer.java has 3 new methods: * newRequest creates a Parcel that can be used to send data to the native player using invoke. * invoke issues synchronous calls to the native player using opaque parcels for the request and reply. IMediaPlayer.h has 1 new abstract method: * invoke The Midi and Vorbis players have a stub for these. So far only PV makes use of that new feature. To avoid any copy overhead, the JNI interface uses Parcel as a java object (no serialization/copy happens at the JNI layer). The remote interface token is inserted when the Parcel is constructed in java. That way the parcel is already routable when it reaches IMediaPlayer.cpp (proxy). No extra copy is needed there.
* Renamed all android.hardware.IMedia* strings to android.media.IMedia*niko2009-06-221-2/+1
| | | | | | | | | | The android.hardware.ICamera string have not been changed (but is looks like the camera service and client one should undergo the same procedure) The implementation of the interface must provide a unique string for it's interface name. Currently all these strings in the media framework start with 'android.hardware' when it should really be 'android.media', the interface token has nothing to do with hardware.
* am f3288f17: Merge change 2468 into donutAndroid (Google) Code Review2009-05-261-0/+2
|\ | | | | | | | | | | | | Merge commit 'f3288f178ae2b2c7910b234f54f43475a83eb860' * commit 'f3288f178ae2b2c7910b234f54f43475a83eb860': setVolume did not check interface descriptor
| * setVolume did not check interface descriptorDave Sparks2009-05-261-0/+2
| | | | | | | | DO NOT MERGE
* | some work to try to reduce the code size of some native librariesMathias Agopian2009-05-261-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make sure that all binder Bn classes define a ctor and dtor in their respective library. This avoids duplication of the ctor/dtor in libraries where these objects are instantiated. This is also cleaner, should we want these ctor/dtor to do something one day. - same change as above for some Bp classes and various other non-binder classes - moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere. - improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere - IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16 - implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called. The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
* | move libbinder's header files under includes/binderMathias Agopian2009-05-201-1/+1
|/
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+275
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-275/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-20/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+295