summaryrefslogtreecommitdiffstats
path: root/include/media/mediaplayer.h
Commit message (Collapse)AuthorAgeFilesLines
* Add MediaPlayer::getAudioStreamType.John Spurlock2014-03-191-0/+1
| | | | Change-Id: I9cd8a718d2873543609aa651fd85749478f4f89f
* Remove no longer needed http proxy handling code, it's obsolete nowAndreas Huber2014-02-051-3/+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-3/+11
| | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* MediaTimeProvider support fixesLajos Molnar2013-09-301-0/+1
| | | | | | | | | | | | Add MEDIA_SKIPPED event when resuming at a different time than seeked to. Send MEDIA_STARTED/PAUSED events only when playing (vs. when doing seek previews) Change-Id: I243ebf054303755ea8863229c3211694f2c204a7 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 10954008
* soundpool: allocate shared memory heap by clientEric Laurent2013-09-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | 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/+2
| | | | | | Bug: 10326117 Change-Id: I2c0bdf8adc67b11f8dc633423bee66897548f181
* Add MEDIA_STARTED/PAUSED/STOPPED events to media playersLajos Molnar2013-08-151-0/+3
| | | | | | | | | | | | This is needed for the MediaTimeProvider java interface, so it does not continually poll for current media time. Note: NuPlayer and AwesomePlayer do not correctly handle stop (pause instead), so for those we will signal PAUSED. Signed-off-by: Lajos Molnar <lajos@google.com> Change-Id: I3c61e1bda475f131323f475c18a42e3ec66c9ae1 Bug: 10326117
* Update HTTP proxy configuration for all media playback inside stagefright.Andreas Huber2013-05-311-0/+3
| | | | | | Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b related-to-bug: 8873723 (cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
* 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-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Added a callback to signal when the rendering of the video frame just occurredJames Dong2012-07-201-0/+2
| | | | | Change-Id: Ifbd78606ffc33483aecebf02cb18e0e52af9624d related-to-bug: 6851811
* Impl for supporting two video scaling modesJames Dong2012-05-011-0/+1
| | | | | | | | | o allows the video scaling mode to change at any time o also remove the scaling mode logic in OMXCodec.cpp o related-to-bug: 5454345 Change-Id: I6f1714eb0c2774591ce650d56c1e779b8afd085f
* Defines MediaPlayer APIs to support multiple audio/video/timedtextInsun Kang2012-03-151-3/+20
| | | | | | | | | | | | | | | | | | tracks. o Newly introduced APIs are (MediaPlayer): getTrackInfo() / addExternalSource() / enableTrack() / disableTrack(). o Timed text tracks are supported only, for now. o TODOs: - Define the audio/video behavior for enableTrack and disableTrack. - Refactoring AwesomePlayer / TimedTextDriver so that all types of track index can be managed in the correct order and be ready for supporting audio/video tracks. (MediaExtractor and MediaSource for text file might be necessary.) Change-Id: Idb85e1b3f2ed49a64f377d05472dd6663ce94e07
* Gapless playback, step 1.Marco Nelissen2012-03-131-0/+4
| | | | | | | Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly by reusing the initial AudioTrack for subsequent players. Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
* Switch the way we configure for MediaPlayer retransmission.John Grossman2012-03-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Playback rate on MediaPlayerJean-Michel Trivi2012-02-131-0/+3
| | | | | | | | | 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-2/+2
| | | | | | | | | 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-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
* Remove surface legacy APIs and code.Andreas Huber2011-10-281-1/+0
| | | | | | All surfaces are now supported through surface textures. Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
* Stagefright: ANW::connect in MediaPlayerServiceJamie Gennis2011-10-261-3/+0
| | | | | | | | This change moves the ANativeWindow connect and disconnect logic from MediaPlayer to MediaPlayerService::Client. Bug: 5502654 Change-Id: Ifc43b98b01ad8f35d62d7ece43110724ec7fda3d
* Require INTERNET permission for network-based content.Dave Burke2011-09-021-1/+3
| | | | | | Bug #1870981 Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
* Bug 4599730 Get audio channel count on MediaPlayerGlenn Kasten2011-07-271-4/+13
| | | | | | | Related changes: - Fix bug in get/setParameter* to recycle Parcels when done with them. Change-Id: Iaff05e91bbd99a14fccb79d816dd873359b6ae65
* MediaPlayer: add ANativeWindow (dis)connect callsJamie Gennis2011-07-141-0/+6
| | | | | | | 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
* Send estimated bandwidth value as informational event when cache fetcher pausesJames Dong2011-05-311-0/+6
| | | | | | | | | | o Application can make informed decision about the available network bandwidth when cache fetcher pauses. o Application can also adjust how frequently the bandwidth is estimated within a range from one second to one minute. Change-Id: I90068001343e79da1886de03c565537787e1580b
* For out of band timed text support (timed text in a separate file).Gloria Wang2011-05-251-0/+1
| | | | Change-Id: I9e024a63eb9bf6f839deee3c7766a66e63126c96
* Initial CL for the timed text support:Gloria Wang2011-05-031-0/+3
| | | | | | | | - Add support for MP4 timed text - Add API for app to turn on/off a text track - Add timed text metadata(language) in the MediaMetadataRetriever Change-Id: I0055beba38ac761627dbcc6d581ae9582d68bb94
* Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-291-0/+3
| | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* - Add another parameter in notify() to be able to send timed text sampleGloria Wang2011-04-131-2/+3
| | | | | | | | 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/+3
| | | | | | | | | | | | | | 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
* Seek/Duration support for completed http live streams in NuPlayer.Andreas Huber2011-01-051-1/+0
| | | | | Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463 related-to-bug: 3321475
* Properly shutdown the decoders on a reset() in NuPlayer's implementation.Andreas Huber2011-01-041-0/+1
| | | | | related-to-bug: 3321470 Change-Id: Ida6d2171c5a3a407188d4633602b764f8fe7086a
* 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
* Added support for auxiliary audio effects to AudioTrack and MediaPlayer.Eric Laurent2010-07-211-0/+3
| | | | | | | | 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
* Added Visualizer effect.Eric Laurent2010-07-071-1/+0
| | | | | | | | | | | | | | The visualizer enables application to retrieve part of the currently playing audio for visualization purpose. It is not an audio recording interface and only returns partial and low quality audio content as a waveform or a frequency representation (FFT). Removed temporary hack made in MediaPlayer for animated wall papers based on audio visualization (snoop() method. This commit also includes a change in AudioEffect class: - the enable()/disable() methods have been replaced bya more standard setEnabled() method. - some fixes in javadoc Change-Id: Id092a1340e9e38dae68646ade7be054e3a36980e
* Added support for audio sessions in MediaPlayer and AudioTrack.Eric Laurent2010-06-221-0/+3
| | | | | | Audio sessions are used to associate audio effects to particular instances (or groups) of MediaPlayers or AudioTracks. Change-Id: Ib94eec43241cfcb416590f435ddce7ab39a07640
* Switch stagefright's approach to prefetching to the new model. The java ↵Andreas Huber2010-06-101-0/+5
| | | | | | MediaPlayer is now notified about rebuffering start/end via info messages. Change-Id: If8185ba329ce8b6663b1ad39a4efb0ad3be81df2
* New API on java's MediaPlayer to suspend/resume a session.Andreas Huber2010-02-121-0/+2
| | | | related-to-bug: 2231576
* split libsurfaceflinger_client and libcamera_client out of libuiMathias Agopian2010-02-111-1/+2
|
* API Extension: Support for optionally specifying a map of extra request ↵Andreas Huber2010-01-281-1/+8
| | | | | | | | headers when specifying the uri of media data to be played. related-to-bug: 2393577 Original change by Andrei Popescu <andreip@google.com>
* Media server death nodificationJames Dong2010-01-151-24/+4
|
* am a97402e1: am c39d2e3c: Music visualizer support hack. This currently ↵Marco Nelissen2009-10-061-0/+1
|\ | | | | | | | | | | | | | | | | assumes 44k stereo (won\'t crash on other formats, but won\'t give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb. Merge commit 'a97402e1cbadbdc874afa9ffdbd23f1c62fb8177' into eclair-mr2-plus-aosp * commit 'a97402e1cbadbdc874afa9ffdbd23f1c62fb8177': Music visualizer support hack.
| * Music visualizer support hack.Marco Nelissen2009-10-061-0/+1
| | | | | | | | This currently assumes 44k stereo (won't crash on other formats, but won't give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.
* | merge from open-source masterJean-Baptiste Queru2009-09-161-1/+1
|\ \ | |/ |/|
| * Update comment in mediaplayer.h.Ravi K Yenduri2009-09-161-1/+1
| | | | | | | | | | When sending a MEDIA_INFO message, the second integer is supposed to be an "info" code instead of an "error" code.
| * donut snapshotJean-Baptiste Queru2009-07-211-1/+1
| |
| * auto import from //branches/cupcake_rel/...@141571The Android Open Source Project2009-03-191-0/+1
| |
* | Basic plumbing to retrieve metadata from the native player.Nicolas Catania2009-07-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | am d670b8c6: Merge change 3981 into donutAndroid (Google) Code Review2009-06-121-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Merge commit 'd670b8c61ebd13324ac21bdbc08d8a02fc0a765a' * commit 'd670b8c61ebd13324ac21bdbc08d8a02fc0a765a': Removed trailing whitespaces.