summaryrefslogtreecommitdiffstats
path: root/include/media/MediaPlayerInterface.h
Commit message (Collapse)AuthorAgeFilesLines
* stagefright: Squashed commit of pause/resume featuresSteve Kondik2015-11-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* frameworks/av: Changes related to DASHManikanta Sivapala2015-10-061-0/+1
| | | | | | | | | 1) Add MEDIA_QOE event type 2) Open certain methods for extension by declaring them as virtual 3) Add DASH_PLAYER as a new player type 4) Creating DASH Player factory Change-Id: I0376841530218703fabd9d4f45d2c9a32a1f52b2
* stagefright: Disable AwesomePlayerMingming Yin2015-10-061-1/+0
| | | | | | | | | | | | Permanently remove StagefrightPlayer codebase & remove its entry from MediaPlayerFactory as AwesomePlayer is completely replaced by NuPlayer. Keep the AwesomePlayer codebase to make libstagefright_timedtext available to NuPlayer via libstagefright. Conflicts: media/libmediaplayerservice/MediaPlayerFactory.cpp Change-Id: Idfecdc519919ee940817c7bb515433fc37588bd3
* NuPlayer: Add audio sink buffer configurationAndy Hung2015-06-031-1/+2
| | | | | | | | Property media.stagefright.audio.sink (in milliseconds) Also change the default buffer size for PCM playback to 500 ms. Bug: 21198655 Change-Id: I5781288f59bf08fbecd9263a26c919570b58be0f
* media: rename doNotResuscitate to doNotReconnect to align with the ↵Ronghua Wu2015-05-221-1/+1
| | | | | | | implementation. Bug: 21370108 Change-Id: I4c202d81507b29afb5e7f72231c4c7847d0b29bf
* libmediaplayerservice: try to open audio sink in offload mode in error.Ronghua Wu2015-05-221-1/+2
| | | | | | Bug: 19061432 Bug: 21370108 Change-Id: Iaa757555ef37fd1ac87b6e2d5a9969bb58cc5ebc
* stagefright: support setting/getting playback/sync config in MediaSyncLajos Molnar2015-04-301-2/+29
| | | | | | | Bug: 18249558 Bug: 19666434 Bug: 20057497 Change-Id: I5868b17423d7c20cfaf4a399f3eb67bfba440605
* stagefright: warnings be gone, some are now errors, use clangLajos Molnar2015-04-171-13/+13
| | | | Change-Id: I81f438ae444f04c12ae27ae4ef6d073033de172c
* Unhide the android.media.[Media]DataSource interface.Chris Watkins2015-04-151-0/+5
| | | | | | | | | | | | | | | | | | | | | 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
* mediaplayer: use non-blocking mode for AudioSink::write().Wei Jia2015-03-031-1/+13
| | | | | | | This cherry picks https://googleplex-android-review.git.corp.google.com/#/c/643541/ to master. Bug: 19448263 Change-Id: I43dea830212de79c2b080185b6c6b36078f517d2
* mediaplayer: support dynamic playback rateWei Jia2015-02-241-0/+1
| | | | | | Bug: 19196501 Change-Id: I856b1507d5fa2cedfb645706d2435683a7d3e050
* resolved conflicts for merge of b955b722 to lmp-mr1-dev-plus-aospMarco Nelissen2015-01-271-1/+0
|\ | | | | | | Change-Id: I385371869169eee4fe6330ffe0abc5eda4cb4f72
| * Remove MediaPlayerService::decode()Marco Nelissen2015-01-261-1/+0
| | | | | | | | | | | | | | and make SoundPool use MediaCodec for decoding files to PCM. Bug: 18239054 Change-Id: Ia144fc1bbb0d2787638ee972e2224339b4965310
* | am cec272df: am 724b9ea5: Merge "Replace MidiFile player with a Midi extractor"Marco Nelissen2015-01-131-2/+0
|\ \ | |/ | | | | | | * commit 'cec272dfe2cf6bf6cdb8a4afa5afdd0e910c915f': Replace MidiFile player with a Midi extractor
| * Replace MidiFile player with a Midi extractorMarco Nelissen2015-01-081-2/+0
| | | | | | | | | | | | | | This gets rids of a bunch of special midi handling and replaces it with an extractor that works with NuPlayer and MediaMetadataRetriever. Change-Id: I8d0f5bbdde2ca24267cf4d62ab26afe9630e0217
* | do not hold mNotifyLock when calling MediaPlayer::notifyChong Zhang2014-10-271-2/+9
|/ | | | | Bug:18120688 Change-Id: Ia66dcfc3fd2d67d1ceba9808d21e0120cc8691d6
* NuPlayer: use getTimestamp instead of getPositionLajos Molnar2014-09-171-0/+2
| | | | | Bug: 14659809 Bug: 16985287 Change-Id: I59ec72fbd40a9b8d28fe548ddad082c03000c045
* Remove no longer needed http proxy handling code, it's obsolete nowAndreas Huber2014-02-051-5/+0
| | | | | | | | since we started to use java's HTTPConnection instead of the native implementation. Also remove other remnants of the previous http implementation, such as accounting for the http user's uid. Change-Id: I60bfd31381ea40d2220db587ec5c433093b60034
* FINAL ATTEMPT: HTTP services are now provided from JAVA and made available ↵Andreas Huber2014-02-041-0/+1
| | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* update offloaded audio track sampling rateEric Laurent2013-11-221-0/+1
| | | | | | | | AudioPlayer must read the sampling rate from offloaded audio sinks whenever a new time position is computed as the decoder can update the sampling rate on the fly. Change-Id: I997e5248cfd4017aeceb4e11689324ded2a5bc88
* AwesomePlayer: correct stream type for offloadEric Laurent2013-11-141-0/+1
| | | | | | | | | | | | canOffloadStream() function in stagefright utils forces the stream type to AUDIO_STREAM_MUSIC when querying the audio policy manager if a particular track is offloadable or not. This causes MP3 ringtones to be offloaded which is not a validated use case. The fix consists in using the actual stream type read from the AudioSink. Bug: 11410937. Change-Id: I44b8e033a8e785a79cdc291b142f80b5580bdc4d
* libmediaplayerservice: offload playback supportRichard Fitzgerald2013-07-261-1/+1
| | | | | | | | | | | | | | | | | | Main change is to how recycled tracks are used for gapless playback. If we are playing offloaded tracks that can't be recycled we don't open a new offloaded output until we have closed the previous one. This is because offloaded tracks are a limited resource so we don't want to spuriously create unnecessary instances. If the tracks cannot be recycled this means that the formats are incompatible and so the hardware most likely will also be unable to use the existing output channel for the new track. If we already have the maximum number of hardware offload channels open (which could be only one) then creation of the next output would fail if we attempted it while the previous output was still open. Change-Id: I4f5958074e7ffd2e17108157fee86329506730ea Signed-off-by: Eric Laurent <elaurent@google.com>
* Public API changes for audio offload support.Richard Fitzgerald2013-06-271-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: this does _not_ include all private member variables added to classes as part of offload support. Only public/protected functions and stubs functions/variables needed to make the changes buildable. - isOffloadSupported() added to audio policy service A stub implementation is required to build, this always returns false - setParameters() added to IAudioTrack A stub implementation is required to build, this always returns INVALID_OPERATION - CBlk flag for stream end - Change AudioSystem::getRenderPosition() to take an audio_output_t so caller can specify which output to query - Add AudioSystem::isOffloadSupported() This is fully implemented down to the AudioFlinger function AudioPolicyServer::isOffloadSupported() which is just a stub that always returns false. - Add EVENT_STREAM_END to AudioTrack interface. STREAM_END is used to signal when the hardware has actually finished playing all the data it was sent. - Add event type enumeration to media player interface AudioSink callbacks so that the same callback can be used to handle multiple types of event. For offloaded tracks we also have to handle STREAM_END and TEAR_DOWN events - Pass audio_offload_info_t to various functions used for opening outputs, tracks and audio players. This passes additional information about the compressed stream down to the HAL when using offload. For publicly-available APIs this is an optional parameter (for some of the internal and low-level APIs around the HAL interface it is mandatory) - Add getParameters() and setParameters() API to AudioTrack Currently dummy implementations. - Change AudioPlayer contructor so that it takes a set of bitflags defining what options are required. This replaces the original bool which only specified whether to use deep buffering. - Changes to StageFright class definition related to handling tearing-down of an offloaded track when we need to switch back to software decode - Define new StageFright utility functions used for offloaded tracks Currently dummy implementations. - AudioFlinger changes to use extended audio_config_t. Fills in audio_offload_info_t member if this info is passed in when opening an output. - libvideoeditor changes required to add the new event type parameter to AudioSink callback functions - libmediaplayerservice changes required to add the new event type parameter to AudioSink callback functions Change-Id: I3ab41138aa1083d81fe83b886a9b1021ec7320f1 Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Eric Laurent <elaurent@google.com>
* Update HTTP proxy configuration for all media playback inside stagefright.Andreas Huber2013-05-311-0/+5
| | | | | | Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b related-to-bug: 8873723 (cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-3/+3
| | | | | | | | | | 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 a small hook to support gapless in AAH.John Grossman2012-09-061-4/+4
| | | | Change-Id: Ie07eca6b45142bdd83412ee0e38d732a4c355630
* Move the AAH RTP code out of framework and into vendor.John Grossman2012-08-131-3/+0
| | | | | | | | | | Relocate the AAH RTP code from framework/av into vendor/google_devices/phantasm. This change is the deletion, there will be a separate CL which re-introduces on the vendor side of things. Change-Id: Ibe7e6d4b633a3886b87a615691a2692f2382af6c Signed-off-by: John Grossman <johngro@google.com>
* Add the ability to dynamicaly register MediaPlayer types.John Grossman2012-08-131-2/+5
| | | | | | | | | | | | 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>
* Add support for deep audio buffersEric Laurent2012-04-201-1/+5
| | | | | | | | | | Allow AudioSink to use deep audio buffering when the source is audio only and its duration is more than a certain threshold. This helps improve battery life but implies higher audio latency. Change-Id: Ie79915b61c370292f05aabda9779356570e03cbb
* Add gapless playback support for NuPlayerMarco Nelissen2012-04-021-2/+3
| | | | | | | | | This makes NuPlayer use a SkipCutBuffer when needed, and adds a new AudioSink method to retrieve the number of frames written so far, so NuPlayerRenderer can calculate how much data it can write without blocking. Also make some more methods const. Change-Id: Id7d253ad8a7b85e9a84ca2baafbe32817b16c744
* Gapless playback, step 1.Marco Nelissen2012-03-131-0/+1
| | | | | | | Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly by reusing the initial AudioTrack for subsequent players. Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
* Add channel mask in AudioSinkJean-Michel Trivi2012-03-021-1/+3
| | | | | | | | | | | | | | | | Add support for specifying a channel mask when opening an AudioSink. This parameter does not replace the channel count parameter in order to not have to duplicate the logic to derive a mask from the channel count everywhere an AudioSink is used without a known mask. A mask of 0 (CHANNEL_MASK_USE_CHANNEL_ORDER) means a mask will be automatically derived from the number of channels. Update existing AudioSink implementations to use the channel mask, and users of AudioSink to specify the mask if available, and CHANNEL_MASK_USE_CHANNEL_ORDER otherwise. Change-Id: Ifa9bd259874816dbc25ead2b03ea52e873cff474
* Switch the way we configure for MediaPlayer retransmission.John Grossman2012-03-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Upintegreate AAH TX and RX players from ICS_AAHJohn Grossman2012-02-161-0/+3
| | | | | | | | Upintegrate the android at home TX and RX players developed in the ICS_AAH branch. Change-Id: I8247d3702e30d8b0e215b31a92675d8ab28dccbb Signed-off-by: John Grossman <johngro@google.com>
* Playback rate on MediaPlayerJean-Michel Trivi2012-02-131-0/+2
| | | | | | | | | Add support for modifying the playback rate of a MediaPlayer by altering the sample rate of its AudioTrack. The playback rate is expressed in permille, where 1000 is the playback at normal speed. Change-Id: I981d060ab32f7bae7a767e82c60c88ae635dceed
* Use audio_stream_type_t consistentlyGlenn Kasten2012-01-131-1/+1
| | | | | | | | | 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
* Use audio_format_t consistentlyGlenn Kasten2012-01-051-1/+1
| | | | | | | | Was int, uint32_t, uint16_t, and uint8_t with 2-bit bitfield. Also replace 0 by AUDIO_FORMAT_DEFAULT and replace 1 by AUDIO_FORMAT_PCM_16_BIT. Change-Id: Ia8804f53f1725669e368857d5bb2044917e17975
* Remove surface legacy APIs and code.Andreas Huber2011-10-281-3/+0
| | | | | | All surfaces are now supported through surface textures. Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
* Charge network traffic to the uid of the process using the MediaPlayer.Andreas Huber2011-07-011-0/+4
| | | | | Change-Id: I2bcb54b8232afd3fc7ee16289f37c7a7b3f23067 related-to-bug: 4517282
* Make dumpsys(media.player) more useful by having AwesomePlayer populate it.Andreas Huber2011-06-081-0/+4
| | | | Change-Id: I12ba7d542331a8293d67a0d47378b8be4f777759
* Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-291-0/+2
| | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-1/+1
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* - Add another parameter in notify() to be able to send timed text sampleGloria Wang2011-04-131-3/+5
| | | | | | | | through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939. Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
* Remove unused references to ISurfaceMathias Agopian2011-04-041-1/+0
| | | | Change-Id: I542806b5c91c525ed7cde821f6963f1e020ddf1a
* Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-231-1/+8
| | | | | | | | | | | | | | 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
* Protect notification callback parameters with a mutex.Andreas Huber2011-01-261-4/+14
| | | | | | | | This avoids the race condition where notifications are dispatched to a NULL receiver after notifications have been disabled. Change-Id: I6d351ffbee97616e2c35559c132a6c5e6a66948a related-to-bug: 3394139
* Initial support for a true streaming player for mpeg2 transport streams.Andreas Huber2010-12-151-1/+2
| | | | Change-Id: I153eec439d260a5524b21270e16d36940ec3161a
* Support streaming data across binder boundaries.Andreas Huber2010-11-231-0/+5
| | | | Change-Id: Ifbac61406dcb81343765f99ccba08bd90f9274cc
* Remove all traces of legacy renderer support in stagefright.Andreas Huber2010-11-161-1/+0
| | | | Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
* Squashed commit of the following:Andreas Huber2010-10-291-2/+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