summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/MediaPlayerService.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove legacy code and APIs in wifi display related code.Andreas Huber2012-09-211-25/+0
| | | | Change-Id: Ia010e7a00534f9356b3247369d0ffd65591d91aa
* HDCP module binderizedAndreas Huber2012-09-191-0/+5
| | | | Change-Id: I866768b1e3f3b232f1934a35b65f66befc12f3f6
* Add a permission for controlling wifi display.Jeff Brown2012-09-071-0/+9
| | | | Change-Id: I321b6c1a0223e0c3d5df04fde7a13ab91c08c7bc
* Add a small hook to support gapless in AAH.John Grossman2012-09-061-5/+12
| | | | Change-Id: Ie07eca6b45142bdd83412ee0e38d732a4c355630
* Update remote display API.Jeff Brown2012-09-051-2/+2
| | | | | | | | | | | Renamed disconnect() to dispose() to emphasize the fact that this method is intended to clean up the IRemoteDisplay completely, not just temporarily disconnect the current client (which might be useful someday). Other minor tweaks. Change-Id: I1209639eb0cd8af09c724206642d7e52aab48257
* Expose an IRemoteDisplay to trigger wifi display connections setup and feedback.Andreas Huber2012-09-051-12/+3
| | | | Change-Id: I7602cda0e38073c9f0e63fa4de238ca0d4b4ce8e
* Implement remote display service stubs.Jeff Brown2012-09-051-0/+8
| | | | Change-Id: I582ed000026bba6d116db8304e15a3c52f8a9a01
* Only run the wifi display RTSP server on demand, and only on the wifi directAndreas Huber2012-08-301-4/+10
| | | | | | interface. Change-Id: I7d3c44cb79cd40e73499f2d7ccf35c69b628e6d7
* Initial checkin of support for acting as a wifi display sourceAndreas Huber2012-08-291-0/+23
| | | | Change-Id: I08f17efa0c7d007e17408feb7d4fbef0a19f531a
* Fixed a potential/rare race condtion in MediaPlayerService::Client::notify() ↵James Dong2012-08-261-2/+10
| | | | | | | | | | | method o The mClient could be disconnected before the notify message is sent out. Use a local reference could help resolve this issue. o related-to-bug: 6782035 Change-Id: Ia2047bd7f2666100fed83c6e5417a3bf2e20cd2c
* Add a missing NULL check.John Grossman2012-08-231-1/+2
| | | | | | | | | Don't crash if its time to start the next media player in a media player chain, but the current player's client has a NULL mAudioOutput, as is the case when the low level player implements MediaPlayerHWInterface. Change-Id: If555da3a46960cbee91ff26e5b1fd05e52c8ef28
* Add the ability to dynamicaly register MediaPlayer types.John Grossman2012-08-131-204/+37
| | | | | | | | | | | | 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>
* Fix gapless for deep buffersMarco Nelissen2012-06-111-0/+1
| | | | | | | Forward current flags to next output. b/6645676 Change-Id: I584f7a67472d99cbd6bc38f3fe84763331d115d1
* Fix gapless playbackMarco Nelissen2012-06-111-38/+47
| | | | | | | | | | | | On some devices the actual framecount per buffer of an AudioTrack will be different than what was requested, which prevented the track from being reused. Now we create a new AudioTrack with the requested parameters, and then compare it to the track we already have. If they match, we throw away the new track and reuse the existing one. b/6644559 Change-Id: Id3e8c4460436f52e59b98ecaeb01c94f02877c1d
* Use new sd card mount point for dumpsysMarco Nelissen2012-05-071-2/+2
| | | | | | b/6455962 Change-Id: I5c9f8c16c50587b25cafab03c48662e63855868e
* Add support for deep audio buffersEric Laurent2012-04-201-6/+13
| | | | | | | | | | 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
* rename audio policy output flagsEric Laurent2012-04-181-2/+2
| | | | Change-Id: I27c46bd1d1b2b5f96b87af7d05b951fef18a1312
* Allow AudioTrack to start at nonzero positionMarco Nelissen2012-04-041-0/+4
| | | | | | | | | | When creating a new AudioTrack (not inheriting one from a previous play), the AudioSink should take the AudioTrack's position as the initial starting point for mBytesWritten, since otherwise NuPlayer's calculations will be off. Normally this position will be 0, but if the test code for 32 bit wraparound in AudioFlinger.cpp is enabled, it might be (much) larger. Change-Id: I1e4f906d529861c3dea996de8afc6dbd491589af
* New Crypto services talking to the new crypto "HAL".Andreas Huber2012-04-031-7/+1
| | | | | Change-Id: I69ed31e7a8b4d69d1209d2d516f94d258f072566 related-to-bug: 6275919
* Add gapless playback support for NuPlayerMarco Nelissen2012-04-021-4/+21
| | | | | | | | | 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
* AV Android make files changesJames Dong2012-03-281-2/+1
| | | | | | | o plus a few file relocation: ActivityManager.cpp/h, SoundPool.h, etc o remove some runtime dependencies to libandroid, libandroid_runtime, etc Change-Id: I047a47c5fb361dd5cf85cd98798c39f629a75d10
* Provisional support for secure decryption of media streams.Andreas Huber2012-03-261-0/+12
| | | | Change-Id: Ib3982a9c960bfdb0cb7e1b174440b141b194cfbe
* Use NuPlayer for media playback everywhereAndreas Huber2012-03-221-0/+6
| | | | | | if media.stagefright.use-nuplayer is set to true. Change-Id: Ibb217e7d7d5195b7feeea557554fe78e1585744c
* Update commentsGlenn Kasten2012-03-191-1/+1
| | | | Change-Id: I327663a020670d0a72ff57bd0b682e2ce0528650
* audio_channel_in/out_mask_from_countGlenn Kasten2012-03-151-1/+1
| | | | | | | and avoid ambiguous term "channels" where it might be confusing as to whether it is a channel mask or channel count Change-Id: I744fa08ccb6001a98c97bd638d2c9d56836c4234
* Merge "Gapless playback, step 1."Marco Nelissen2012-03-131-4/+101
|\
| * Gapless playback, step 1.Marco Nelissen2012-03-131-4/+101
| | | | | | | | | | | | | | Currently able to play Ogg Vorbis, PCM WAV and other lossless files seamlessly by reusing the initial AudioTrack for subsequent players. Change-Id: Ie7cf6b9076bdf4f9211574456d192c02c04fecc7
* | Use audio_policy_output_flags_t consistentlyGlenn Kasten2012-03-091-2/+2
|/ | | | | | | | | | This affects: - IAudioFlinger::openOutput - AudioTrack::AudioTrack - AudioTrack::set - apps that call these Change-Id: I26fb281bac6cb87593d17697bc9cb37a835af205
* Merge "MediaPlayerService: fix AudioSink latency"Eric Laurent2012-03-061-4/+3
|\
| * MediaPlayerService: fix AudioSink latencyEric Laurent2012-03-051-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The AudioSink latency is currently cached when the associated AudioTrack is created. However, the AudioTrack latency can change if the AudioTrack is moved from one output stream to another. The AudioPlayer must also periodically update its view of the latency as it is needed to compensate the real audio time used for A/V sync. This fixes an A/V sync problem seen when switching A2DP on and off while playing a video. Change-Id: I28b24049ca114e1af3e24791dcc900f463536ba4
* | Add channel mask in AudioSinkJean-Michel Trivi2012-03-021-6/+17
|/ | | | | | | | | | | | | | | | 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-46/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+36
| | | | | | | | 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-1/+24
| | | | | | | | | 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
* Merge "Use audio_format_t consistently"Glenn Kasten2012-01-121-6/+6
|\
| * Use audio_format_t consistentlyGlenn Kasten2012-01-051-6/+6
| | | | | | | | | | | | | | | | 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-20/+20
| | | | | | | | | | | | | | 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-7/+7
| | | | | | | 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-1/+58
|\ \ | |/ | | | | | | | | | | MediaPlayerService" into ics-mr0 * commit 'fc9592f8a5f2f75207e5e532655ac294eb2b334b': Stagefright: ANW::connect in MediaPlayerService
| * am 08479cee: Merge "Stagefright: ANW::connect in MediaPlayerService" into ↵Jamie Gennis2011-10-281-1/+58
| |\ | | | | | | | | | | | | | | | | | | ics-mr0 * commit '08479ceeba56c460fb52f60a24df27776f1936c3': Stagefright: ANW::connect in MediaPlayerService
| | * Stagefright: ANW::connect in MediaPlayerServiceJamie Gennis2011-10-261-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | 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-83/+83
|/ / | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* | am b3cdadb6: Merge "Check whether media recorder client exists before ↵James Dong2011-10-191-5/+7
|\ \ | |/ | | | | | | | | | | dumping." into ics-mr0 * commit 'b3cdadb639027f62c7c1637ca962a70d2d1f3b4d': Check whether media recorder client exists before dumping.
| * Check whether media recorder client exists before dumping.James Dong2011-10-181-5/+7
| | | | | | | | | | Change-Id: I1f3a644a958975e4cf6c02099c53e30cc4d2fd82 related-to-bug: 5477177
* | NuPlayer is now taking on the task of streaming over RTSP.Andreas Huber2011-10-131-0/+4
|/ | | | Change-Id: Ie204db8810807f1e7981959e34dc0149e5d9563a
* Fix issue 5373048: AudioCache decode errorsEric Laurent2011-09-271-2/+11
| | | | | | | | When decoding a file for the SoundPool, do not reject the entire file in case of error but return what was decoded so far instead. Change-Id: Iff199a1b6a4c8e064e42a0dfe0704e0ae36a27fd