summaryrefslogtreecommitdiffstats
path: root/media/jni/android_media_MediaPlayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Improve notifying TimedText by reducing marshall/unmarshalling.Insun Kang2012-05-091-8/+14
| | | | | | | | | | | | o Removes mParcel from TimedText class. o Converts native parcel into java parcel object directly without copying to an intermediate byte array. o JNIMediaPlayerListener::notify checks for Java exceptions, logs them, and clears the exception state. related-to-bug: 6405934 Change-Id: I8b82d3cd5b9b3ef8cad27e805202a0e445a88a45
* Fix failure from setDataSource(String path) when path is a local fileJames Dong2012-04-121-8/+0
| | | | | | | o the failure was because the mediaserver does not have read permission to sdcard o related-to-bug: 6325960,6322913 Change-Id: I4feec01b8165c78563eee8aab69cb24df3244d03
* New Crypto JAVA class to facilitate decryption via MediaCodec.Andreas Huber2012-04-041-0/+6
| | | | | Change-Id: Ic4e395faa84f003793c2804f2badabab9e7f1034 related-to-bug: 6275919
* New API to query available codecs and their capabilities.Andreas Huber2012-04-021-0/+6
| | | | Change-Id: I448ba443a96d8fee2bc9179750d57362ed31d9d9
* Gapless playback, step 1.Marco Nelissen2012-03-131-0/+28
| | | | | | | Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly by reusing the initial AudioTrack for subsequent players. Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
* Split Parcel JNI details away from Binder.Jeff Sharkey2012-03-081-0/+1
| | | | | | | This is purely a refactoring, with no change to the underlying functionality. Change-Id: I41b59f14e57d1cc144274a01f77658d99a1bfe02
* Switch the way we configure for MediaPlayer retransmission.John Grossman2012-03-011-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Implementation of a java media codec interface and associated tools.Andreas Huber2012-02-221-0/+12
| | | | Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b
* 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
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-14/+14
| | | | | | | 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-1/+1
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-25/+25
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* MediaPlayer: properly handle released surfacesJamie Gennis2011-10-141-2/+8
| | | | | Bug: 5396571 Change-Id: I6af87cb04f09f9ae6ea77cd7ba31108a3e93d24a
* Log a warning when a MediaPlayer is finalized without having being released.Marco Nelissen2011-09-281-0/+4
| | | | | | b/5382634 Change-Id: I756d09d16a92ab8ce736c16a24e319a87be6c8de
* If media player has died already, do not dec the old surface texture reference.Gloria Wang2011-09-151-0/+5
| | | | | | | Otherwise segfault will occur. For bug 5327664. Change-Id: I03ea7bc047aa99a106f1e010dac74f75a833ef84
* Do not need to reset surface as NULL in MediaPlayer's _release.Gloria Wang2011-09-141-5/+13
| | | | | | Related to bug 5252296. Change-Id: Ieab063cee70e072fcc4d861abe0f7979a7bab1ec
* Require INTERNET permission for network-based content.Dave Burke2011-09-021-0/+2
| | | | | | Bug #1870981 Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
* If release has been called before finalize, do not expect MediaPlayer still ↵James Dong2011-08-121-5/+13
| | | | | | | | | | exists o also, we should releae the surface object when release is called, not wait until finalize is called. related-to-bug: 5157956 Change-Id: I0233ad61d8349c3e3800de68b752b9548ece1742
* Remove ParcelSurfaceTexture and update MediaPlayerTed Bonkenburg2011-08-111-56/+41
| | | | | | | | | This removes the ParcelSurfaceTexture class since that functionality has been folded into Surface.java. The change also updates the MediaPlayer to get rid of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface functionality in order to simplify the code. Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
* To support for switching from a non-null surface/ surface texture toGloria Wang2011-08-091-3/+4
| | | | | | | a null one, and vice versa. Fix for bug 5137445. Change-Id: Ifca2997f8ad27a843abbdaa7e89a56329bc40fde
* Support for setting a ParcelSurfaceTexture as the MediaPlayer sink.tedbo2011-06-131-31/+10
| | | | | | | | | This adds support for setting a SurfaceTexture as the MediaPlayer video sink by using a ParcelSurfaceTexture object. The goal is to enable a SurfaceTexture to pass through Binder (via ParcelSurfaceTexture) and then be set on the MediaPlayer. Change-Id: Ife5689ce673eb4bee1c377019db761685217b71d
* Refactor to share code between MediaPlayer and MediaMetadataRetriever JNIJames Dong2011-05-051-32/+6
| | | | Change-Id: Ib847213f566dee79126d7c14d00750a9a8dedeb9
* Clean up JNI codeJames Dong2011-05-051-95/+37
| | | | | | | | o Move the Set/Map/Iterator calls from JNI to Java o The JNI function receives arrays instead of Maps o Removed Set/Iterator calls from the Java code as suggested Change-Id: I34068bf24b61abaf2833dad1f65abc733ed760dd
* Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-291-0/+35
| | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* Merge "- Add another parameter in notify() to be able to send timed text ↵Gloria Wang2011-04-131-3/+16
|\ | | | | | | sample through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939."
| * - Add another parameter in notify() to be able to send timed text sampleGloria Wang2011-04-131-3/+16
| | | | | | | | | | | | | | | | through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939. Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
* | You don't need to poke around inside FileDescriptor manually.Elliott Hughes2011-04-111-1/+1
|/ | | | | | | | | | We can help you with that. Note also that getParcelFileDescriptorFD did no such thing. All its callers were passing in a regular java.io.FileDescriptor and expecting the int. No ParcelFileDescriptors involved. Change-Id: Idc233626f20c092e719f152562601f406cc1b64a
* Media JNI code cleanupJames Dong2011-04-071-32/+49
| | | | | | | | o Don't throw exception again because an exception was already thrown o Check on return values from FindClass() and GetMethodID Change-Id: Id92bb8228f1f0d2798d1cdf7de73cbb43816060b related-to-bug: 4139926
* ISurfaceTexture does not have a method getIdentity()James Dong2011-04-011-2/+1
| | | | Change-Id: I81e6b0335747bd5c2c4b15c9f8c99100842a06c1
* Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-231-15/+60
| | | | | | | | | | | | | | 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
* - Add method in MediaPlayerService to collect and pullGloria Wang2011-02-221-0/+18
| | | | | | | codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
* New APIs for MTP and PTP host supportMike Lockwood2011-01-221-0/+6
| | | | | | | This replaces the previous ContentProvider based interface Change-Id: I4cea2544854adb9fdcc04345e4d73d8ef05380f3 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Remove support for obsolete PTP content providerMike Lockwood2011-01-061-12/+0
| | | | | | | This will be replaced by a new PTP host API in an upcoming commit. Change-Id: Ib914194e332b5c090cb8e34ed35bd691bc9f85d1 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Move MTP Java classes to android.mtp.* package.Mike Lockwood2010-12-301-8/+8
| | | | | Change-Id: Ib18bcaabf314241a95e517d0b93be5845d988e2c Signed-off-by: Mike Lockwood <lockwood@android.com>
* Rename MtpClient and MtpCursor to PtpClient and PtpCursorMike Lockwood2010-11-231-6/+6
| | | | | Change-Id: I26fce3bf32c8e9c8d592106af7ab4c35b19e0996 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Squashed commit of the following:Andreas Huber2010-10-291-14/+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
* am 4f21e517: am b37fcbfd: Merge "Added getter for session Id to AudioSink" ↵Eric Laurent2010-10-101-1/+1
|\ | | | | | | | | | | | | | | | | into gingerbread Merge commit '4f21e517d09b9d793d20d64547df330fba705b3c' * commit '4f21e517d09b9d793d20d64547df330fba705b3c': Added getter for session Id to AudioSink
| * Added getter for session Id to AudioSinkEric Laurent2010-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | Added a method to expose the audio session id at AudioSink interface so that the AudioPlayer in stagefright can retrieve it. Also: - Fixed audio effect send level not being initialized in mediaplayer. - Fixed compilation error when LOGV is enabled in mediaplayer JNI Change-Id: I4bb55454fd63d646e0e677692d737c4843fb05fb
* | resolved conflicts for merge of 71c908c4 to masterAndreas Huber2010-09-011-5/+0
|\ \ | |/ | | | | Change-Id: I5a462c8e8ee0acfe2cecbfd58cb9aa2b360da047
| * Now that AmrInputStream no longer relies on opencore, make sure it's ↵Andreas Huber2010-09-011-5/+0
| | | | | | | | | | | | | | registered in non-opencore builds. Change-Id: Ia9748691ba60d3c4b5fcaf319ed0b4493d69abc6 related-to-bug: 2963846
* | am 34161132: am 7070b365: Added support for auxiliary audio effects to ↵Eric Laurent2010-07-211-0/+24
|\ \ | |/ | | | | | | | | | | | | | | AudioTrack and MediaPlayer. Merge commit '34161132030254bac7dd64c9713832e2f961a061' * commit '34161132030254bac7dd64c9713832e2f961a061': Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
| * Added support for auxiliary audio effects to AudioTrack and MediaPlayer.Eric Laurent2010-07-211-0/+24
| | | | | | | | | | | | | | | | 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
* | MTP: Use media provider database to implement MTP device support.Mike Lockwood2010-07-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Uses a new "MTP objects" table in the media provider to support basic enumeration of the external storage file system. Support for accessing audio, video and image metadata in the existing media provider tables will be added in a later commit. The C++ MtpDatabase class is now abstract, to support a proxy subclass that calls through JNI to the Java MtpDatabase class in the media provider. Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | am b91881fd: am dacabf97: Merge "Added Visualizer effect." into gingerbreadEric Laurent2010-07-071-13/+0
|\ \ | |/ | | | | | | | | | | Merge commit 'b91881fdd1608cc922f105ec552b5505da1fecb9' * commit 'b91881fdd1608cc922f105ec552b5505da1fecb9': Added Visualizer effect.
| * Added Visualizer effect.Eric Laurent2010-07-071-13/+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
* | Move MTP JNI code from libandroid_runtime to libmedia_jniMike Lockwood2010-06-301-0/+18
|/ | | | | | Signed-off-by: Mike Lockwood <lockwood@android.com> Change-Id: I0c54bbe4e6146beba7d22e782e02ded420f50dbd
* Added support for audio sessions in MediaPlayer and AudioTrack.Eric Laurent2010-06-221-2/+25
| | | | | | Audio sessions are used to associate audio effects to particular instances (or groups) of MediaPlayers or AudioTracks. Change-Id: Ib94eec43241cfcb416590f435ddce7ab39a07640
* don't hardcode "mSurface" throughout our source codeMathias Agopian2010-04-121-1/+1
| | | | | | | this is used in a few places to get access to the android.view.Surface native surface. use a macro instead. Also rename the field to mNativeSurface. Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
* New API on java's MediaPlayer to suspend/resume a session.Andreas Huber2010-02-121-0/+14
| | | | related-to-bug: 2231576