summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediaplayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add MediaPlayer::getAudioStreamType.John Spurlock2014-03-191-0/+8
| | | | Change-Id: I9cd8a718d2873543609aa651fd85749478f4f89f
* Track pid for each sessionMarco Nelissen2014-02-111-4/+4
| | | | | | so they can be properly freed. Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
* Remove no longer needed http proxy handling code, it's obsolete nowAndreas Huber2014-02-051-11/+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-5/+11
| | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* Fix compile warning / incomplete initializationGlenn Kasten2013-12-191-1/+1
| | | | Change-Id: Ib4accf99be800988e081f96222e1ee73538221ec
* soundpool: allocate shared memory heap by clientEric Laurent2013-09-241-8/+16
| | | | | | | | | | | | | | | | | | | | | | | Current SoundPool implementation allocates the shared memory heap containing decoded PCM samples in mediaserver process. When mediaserver process crashes, the shared memory heaps allocated by AudioCache cannot be mapped anymore in the new instance of mediaserver. This causes a silent failure to end playback of new sounds because AudioFlinger believes the new AudioTracks are opened in streaming mode and not static mode: it sees a NULL shared memory pointer when the track is created. The fix consists in allocating the memory heap in the client process. Thus the heap is not lost when mediaserver restarts. The global memory usage is the same as this is shared memory. Also added a way to detect that a shared memory is passed when the track is created but cannot be mapped on mediaserver side. Also fix a crash in SoundPool when ALOGV is enabled. Bug: 10894793. Change-Id: Ice6c66ec3b2a409d75dc903a508b6c6fbfb2e8a7
* MediaPlayer: add listener for raw track dataChong Zhang2013-08-191-0/+3
| | | | | | Bug: 10326117 Change-Id: I2c0bdf8adc67b11f8dc633423bee66897548f181
* Reject unprepared MediaPlayersMarco Nelissen2013-08-051-0/+7
| | | | | | | Don't allow a MediaPlayer that has been reset() or release()d to be used as the argument to setNextMediaPlayer. Change-Id: I47da1460ec3742f5b2bd7b79e7998b290032d5a1
* am d5018116: Merge "Fix typo."Glenn Kasten2013-06-141-1/+1
|\ | | | | | | | | * commit 'd5018116252a3ecb491e2eaddad12180b85d1e78': Fix typo.
| * Fix typo.Masaki Muranaka2013-06-061-1/+1
| | | | | | | | Change-Id: Ia72ed2bef54751dc2d6c3379a58de95a0e9ebfdd
| * Add support for HLS playlists of type 'event'.Andreas Huber2012-11-271-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related-to-bug: 6870049 Squashed commit of the following: commit eee2f3ba6bb7335f4e285632726db85645669929 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 15:02:01 2012 -0800 Make everything a lot less verbose by default. Change-Id: I884d7a7901aa1e7d4ff590f065ca57a79d2af8b3 commit 6bbdb837ed5bd88008e45efb8faf595e4051ba26 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:34:46 2012 -0800 HLS now properly signals media time changes at discontinuities including the start of playback (which may not necessarily be at time 0 if the playlist is of type 'event' and hasn't completed yet). Change-Id: I5ab747d024f9b8d0df72a4e06a12ebb29f62802e commit 1555589832b1878a144a976a643e1af4d61f877c Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:32:28 2012 -0800 As part of a time discontinuity, clients of IStreamListener can now signal the corresponding media time after the discontinuity, i.e. the first PTS timestamp following the discontinuity will be considered equivalent to the specified media time and media buffers timestamped accordingly. Change-Id: Id7db7679b7faa6efd6270620ff52e34e884f3e92 commit 5c24c605c073a11c426d025b1e7478fc1ad8365a Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 13:00:56 2012 -0800 NuPlayer sources now expose flags() and can announce that duration may change (increase) dynamically, in which case duration will be polled at 1 second intervals and communicated to the upper layers. Change-Id: I45102909b7a19eed0dda576747e3814d742a0eea commit ecb71de8e281e61971a2cd73e7161a97540bc357 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 12:57:47 2012 -0800 Stop caching duration in MediaPlayer, duration could increase dynamically. Change-Id: I7bb2f16c0abe49debdf45c776d2266aa069d7791 commit 544aec5823e6d7a3e97e15b6b23546616bcd343e Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 08:46:28 2012 -0800 An attempt to add support for "event" style HLS playlists. Change-Id: I3dfb2e801ecaff8f5d8bdb3a4fca1b18aeeb2c60 Change-Id: I48cf7f65a654d33f2f49ded74f8be22aed9e3b98
* | Update HTTP proxy configuration for all media playback inside stagefright.Andreas Huber2013-05-311-0/+11
| | | | | | | | | | | | Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b related-to-bug: 8873723 (cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
* | Don't purge effects we're about to start usingMarco Nelissen2013-05-101-1/+1
| | | | | | | | | | | | | | | | | | By acquiring the new session id before releasing the old, we prevent purging existing effects with the new session id that aren't currently attached but will be once the player is switched to the new session id. b/8767565 Change-Id: I703881b69c5accd8832ac834246925a20ada4c21
* | Instead of returning an error, return an invalid duration (-1 ms)Andreas Huber2013-04-111-0/+7
| | | | | | | | | | | | | | | | if no duration information was available. This prevents us from entering ERROR state, effectively rendering the player instance useless. Change-Id: I602d2661ae8b8633360306c0ea9208fb11e2bf17 related-to-bug: 8596285
* | Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-151-1/+1
| | | | | | | | Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
* | Merge "Remove unnecessary parameter"Glenn Kasten2012-12-211-3/+3
|\ \
| * | Remove unnecessary parameterGlenn Kasten2012-12-181-3/+3
| | | | | | | | | | | | | | | | | | Just get the parameter on server side Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
* | | Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-2/+2
|/ / | | | | | | | | | | | | | | | | | | 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 support for HLS playlists of type 'event'.Andreas Huber2012-11-271-12/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related-to-bug: 6870049 Squashed commit of the following: commit eee2f3ba6bb7335f4e285632726db85645669929 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 15:02:01 2012 -0800 Make everything a lot less verbose by default. Change-Id: I884d7a7901aa1e7d4ff590f065ca57a79d2af8b3 commit 6bbdb837ed5bd88008e45efb8faf595e4051ba26 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:34:46 2012 -0800 HLS now properly signals media time changes at discontinuities including the start of playback (which may not necessarily be at time 0 if the playlist is of type 'event' and hasn't completed yet). Change-Id: I5ab747d024f9b8d0df72a4e06a12ebb29f62802e commit 1555589832b1878a144a976a643e1af4d61f877c Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:32:28 2012 -0800 As part of a time discontinuity, clients of IStreamListener can now signal the corresponding media time after the discontinuity, i.e. the first PTS timestamp following the discontinuity will be considered equivalent to the specified media time and media buffers timestamped accordingly. Change-Id: Id7db7679b7faa6efd6270620ff52e34e884f3e92 commit 5c24c605c073a11c426d025b1e7478fc1ad8365a Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 13:00:56 2012 -0800 NuPlayer sources now expose flags() and can announce that duration may change (increase) dynamically, in which case duration will be polled at 1 second intervals and communicated to the upper layers. Change-Id: I45102909b7a19eed0dda576747e3814d742a0eea commit ecb71de8e281e61971a2cd73e7161a97540bc357 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 12:57:47 2012 -0800 Stop caching duration in MediaPlayer, duration could increase dynamically. Change-Id: I7bb2f16c0abe49debdf45c776d2266aa069d7791 commit 544aec5823e6d7a3e97e15b6b23546616bcd343e Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 08:46:28 2012 -0800 An attempt to add support for "event" style HLS playlists. Change-Id: I3dfb2e801ecaff8f5d8bdb3a4fca1b18aeeb2c60 Change-Id: I48cf7f65a654d33f2f49ded74f8be22aed9e3b98
* Merge "Gapless playback, step 1."Marco Nelissen2012-03-131-0/+7
|\
| * Gapless playback, step 1.Marco Nelissen2012-03-131-0/+7
| | | | | | | | | | | | | | 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-7/+7
|/ | | | | | | | | | | | | | 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-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update commentsGlenn Kasten2012-02-141-1/+1
| | | | | | We no longer put the filename at start of file. Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
* Fix incorrect includes of AudioTrack.hGlenn Kasten2012-01-181-1/+1
| | | | | | | Remove unnecessary includes of AudioTrack.h. Use forward declaration of class names in preference to #include when possible. Change-Id: I12982811fa75c2c7695d8bbfa595a7aaec047dc0
* 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
* Merge "Use audio_format_t consistently"Glenn Kasten2012-01-121-2/+2
|\
| * Use audio_format_t consistentlyGlenn Kasten2012-01-051-2/+2
| | | | | | | | | | | | | | | | 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
* | Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-18/+18
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-3/+3
|/ | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-2/+2
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* resolved conflicts for merge of 26f70db9 to masterAndreas Huber2011-11-081-8/+0
|\ | | | | | | Change-Id: Ib1536b1a4c9eeff80e0726b3e61cee12057cd120
| * Remove surface legacy APIs and code.Andreas Huber2011-10-281-8/+0
| | | | | | | | | | | | All surfaces are now supported through surface textures. Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
* | am fc9592f8: am 08479cee: Merge "Stagefright: ANW::connect in ↵Jamie Gennis2011-10-281-96/+2
|\ \ | |/ | | | | | | | | | | MediaPlayerService" into ics-mr0 * commit 'fc9592f8a5f2f75207e5e532655ac294eb2b334b': Stagefright: ANW::connect in MediaPlayerService
| * Stagefright: ANW::connect in MediaPlayerServiceJamie Gennis2011-10-261-96/+2
| | | | | | | | | | | | | | | | This change moves the ANativeWindow connect and disconnect logic from MediaPlayer to MediaPlayerService::Client. Bug: 5502654 Change-Id: Ifc43b98b01ad8f35d62d7ece43110724ec7fda3d
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-57/+57
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Handle setDataSource failures properly. #5261671Dave Burke2011-09-061-9/+9
| | | | Change-Id: Iea0aa474d1939db23da9aabdfae2081e834f30d9
* Require INTERNET permission for network-based content.Dave Burke2011-09-021-7/+27
| | | | | | Bug #1870981 Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
* Keep effects sessions active when the caller dies.Marco Nelissen2011-08-091-1/+7
| | | | | | | | Don't remove effects until the session they are in goes away or all AudioEffects have been explicitly released. This allows the control panel process to die without stopping the effects. Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
* connect/disconnect is now called from our EGL wrapperMathias Agopian2011-08-011-4/+4
| | | | | | | | | | | the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
* Merge "Log setVideoSurface() and setVideoSurfaceTexture() failures."James Dong2011-07-221-0/+2
|\
| * Log setVideoSurface() and setVideoSurfaceTexture() failures.James Dong2011-07-211-0/+2
| | | | | | | | | | Change-Id: Iaea34e74a0cf569fc85b926949253dea6baa6142 related-to-bug: 5063370
* | MediaPlayer: add a disconnect from ANativeWindowJamie Gennis2011-07-191-0/+2
|/ | | | | | | This change makes MediaPlayer::disconnect disconnect from the ANativeWindow once the player has been disconnected. Change-Id: I6744559030d1edc520cf77402d1f5ce841742340
* MediaPlayer: add ANativeWindow (dis)connect callsJamie Gennis2011-07-141-5/+101
| | | | | | | This change makes MediaPlayer connect to the ANativeWindow to which it is going to render video frames and disconnect when it is done. Change-Id: I88ab5c2fe62493aabdc84a283ff31634f795d415
* update for new audio.h header locationDima Zavin2011-05-121-1/+1
| | | | | Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876 Signed-off-by: Dima Zavin <dima@android.com>
* Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-291-0/+22
| | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-1/+3
| | | | | 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-2/+5
| | | | | | | | through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939. Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
* Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-231-0/+10
| | | | | | | | | | | | | | 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