summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/MediaPlayerService.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix to parse audio_source_t member of audio_attributes_tHyejin Kim2014-09-051-0/+3
| | | | | | | | | | | | | | | | When unmarshalling audio_attributes_t typed data, it didn't parse the audio_source_t member between content_type and flags. Bug: 16906307 Change-Id: Ia0d8df9b5c31441d34dc82678bceccd8ce31423d
* | Fix SoundPool and MediaPlayerService buffer overflowAndy Hung2014-08-211-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | Overflow occurs when SoundPool sample tracks cannot fit in the MediaPlayerService AudioCache buffer. Unnecessary decoding occurred with AwesomePlayer and an assert failure occurred with NuPlayer. NuPlayerRenderer is also tweaked to handle the latter case. Bug: 17122639 Change-Id: I4d25d3e2c0c62e36a91da6bf969edabddc2ebbb0
* | stagefright: Do not add silence data for compress offloadaarti jadhav-gaikwad2014-08-181-1/+2
| | | | | | | | | | | | Bug: 16683770 Bug: 17035257 Change-Id: I7aef543c47214cc2854d143167b02f1603cf8bea
* | media/playerservice: add getCodecList() to MediaPlayerServiceLajos Molnar2014-08-071-0/+5
| | | | | | | | | | Bug: 11990470 Change-Id: I8fa45946fd9b76f9b975fc59062819c57e6881ef
* | reset battery stats when media player service is startedChong Zhang2014-07-231-0/+15
| | | | | | | | | | Bug: 12979595 Change-Id: Ia800de3e65ed4dec8334c6fde566edab12d23c42
* | Support for audio attributes on audio output of media playerJean-Michel Trivi2014-07-011-7/+101
| | | | | | | | Change-Id: Iae4995c98e64add1ab9e6c8ae6501515032755f5
* | libmediaplayerservice: 64-bit compile warningsMark Salyzyn2014-06-201-7/+7
| | | | | | | | Change-Id: I333e52dc377becc774f3fa971c230ecb55ea8d7b
* | Use LOG_ALWAYS_FATAL instead of LOG_FATALGlenn Kasten2014-03-261-1/+1
| | | | | | | | | | | | | | LOG_FATAL is compiled out in most builds, so the assertion checks were not being performed. Change-Id: I774f0985ab9c5ccecd8989a0f1c940386b73fc35
* | Fix type of AudioTrack/AudioRecord parameter frameCountGlenn Kasten2014-02-281-1/+1
| | | | | | | | | | | | It's size_t consistently Change-Id: I29638ef59ac773218025f2403a3508a307b487e0
* | Track pid for each sessionMarco Nelissen2014-02-111-4/+8
| | | | | | | | | | | | so they can be properly freed. Change-Id: I6f389035bc29e74e7c367c1c6d0252b180f666b3
* | resolved conflicts for merge of 566be7c3 to masterNarayan Kamath2014-02-111-1/+1
|\ \ | |/ | | | | Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
| * Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
| * update offloaded audio track sampling rateEric Laurent2013-12-171-0/+14
| | | | | | | | | | | | | | | | 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
| * Assign blame for playback wakelocks.Marco Nelissen2013-10-251-7/+12
| | | | | | | | | | | | | | | | | | | | | | Set a work source for the playback wakelock, so that playback is counted against the requesting app instead of the media server. Cherrypicked from master. b/9464621 Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
* | 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-6/+14
| | | | | | | | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* | update offloaded audio track sampling rateEric Laurent2013-11-221-0/+14
| | | | | | | | | | | | | | | | 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
* | Assign blame for playback wakelocks.Marco Nelissen2013-10-251-7/+12
|/ | | | | | | Set a work source for the playback wakelock, so that playback is counted against the requesting app instead of the media server. Change-Id: I7329f88a288a95a582a78005a1c3d16a5a611e31
* soundpool: allocate shared memory heap by clientEric Laurent2013-09-241-22/+27
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix hangMarco Nelissen2013-09-161-1/+1
| | | | | | | Specify that the surface is controlled by the app, to avoid a hang. b/10531761 Change-Id: Idccc2c73aa3d368d8e7fbdc071ce36e2382efea4
* libmediaplayerservice: offload playback supportRichard Fitzgerald2013-07-261-82/+202
| | | | | | | | | | | | | | | | | | 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>
* am 903871da: am 83790fcc: am bdf33c98: Merge "Fix compilation warning: ↵Glenn Kasten2013-06-281-1/+1
|\ | | | | | | | | | | | | incorrect format specifier for type \'ssize_t\'." * commit '903871da7a7c71b8718133e60e2f0835837b5f3f': Fix compilation warning: incorrect format specifier for type 'ssize_t'.
| * am bdf33c98: Merge "Fix compilation warning: incorrect format specifier for ↵Glenn Kasten2013-06-281-1/+1
| |\ | | | | | | | | | | | | | | | | | | type \'ssize_t\'." * commit 'bdf33c98912090176183d3e9b9a9217dbbdca6da': Fix compilation warning: incorrect format specifier for type 'ssize_t'.
| | * Fix compilation warning: incorrect format specifier for type 'ssize_t'.Scott Fan2013-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | warning: format '%ld' expects argument of type 'long int', but argument 7 has type 'ssize_t {aka int}' [-Wformat] Change-Id: I823835a26320a3abb82f8dff9fbe82e5132e7556 Signed-off-by: Scott Fan <fancp2007@gmail.com>
| | * Merge "fix a race condition of MediaPlayerServce::Client::mClient"Andreas Huber2013-04-241-1/+1
| | |\
| | * | 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
* | | | Public API changes for audio offload support.Richard Fitzgerald2013-06-271-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Use sp<AudioTrack> instead of raw AudioTrack *Glenn Kasten2013-06-031-22/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prepares for the new implementation of AudioTrack client, which will require clients to use only sp<AudioTrack>, not raw AudioTrack *. A raw delete will cause a race condition during AudioTrack destruction. AudioTrack was made a RefBase by commit b68a91a70bc8d0d18e7404e14443d4e4020b3635 on 2011/11/15, when it was needed by OpenSL ES (for the callback protector). At that time, the only other client that was also converted from AudioTrack * to sp<AudioTrack> was android.media.AudioTrack JNI in project frameworks/base (file android_media_AudioTrack.cpp). Details: * Use .clear() instead of delete followed by = NULL. * ALOG %p need .get(). * sp<> don't need to be listed in constructor initializer, if initially 0. * Use == 0 for sp<> vs == NULL for raw pointers. * Use if (sp != 0) instead of if (raw). Change-Id: Ic7cad25795d6e862e112abdc227b6d33afdfce17
* | | am b7319a7e: Update HTTP proxy configuration for all media playback inside ↵Andreas Huber2013-06-031-0/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | stagefright. * commit 'b7319a7eb0a06ef4fd3a0c9157ee63e637ad7aa1': Update HTTP proxy configuration for all media playback inside stagefright.
| * | | Update HTTP proxy configuration for all media playback inside stagefright.Andreas Huber2013-05-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie0dd00045aba668d8b49da73224e7a7c9c04f69b related-to-bug: 8873723 (cherry picked from commit 2704965b8a1ff3b7450ff58ccecf86d8ec688c40)
* | | | am 628a8c0e: Merge "fix a race condition of MediaPlayerServce::Client::mClient"Andreas Huber2013-04-241-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | * commit '628a8c0ed91531468f5c615fea8745f63cc812aa': fix a race condition of MediaPlayerServce::Client::mClient
| * | | Merge "fix a race condition of MediaPlayerServce::Client::mClient"Andreas Huber2013-04-241-1/+1
| |\ \ \ | | | |/ | | |/|
| | * | fix a race condition of MediaPlayerServce::Client::mClientbeanz2012-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there will be race condition between mClient.clear in MediaPlayerServce::Client::disconnect method and c=client->mClient in in MediaPlayerServce::Client::notify method Change-Id: I767294c4cb864c08e9c0e9f23d6d304a39016205 Signed-off-by: beanz <beanz@marvell.com>
* | | | Implementing MediaDrm APIsJeff Tinker2013-03-131-0/+5
| | | | | | | | | | | | | | | | Change-Id: I9ff8eeb7d0c383b5c0c68cd54eb54ce7d2d22fe6
* | | | Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-151-2/+2
| | | | | | | | | | | | | | | | Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
* | | | Plumbing to reflect minor changes in the HDCP module API that allow forAndreas Huber2013-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | support of _decryption_ modules in addition to what we already supported. Change-Id: Ic37b87dc170ba8def3817991d25df798f21e950b
* | | | Merge "Remove unnecessary parameter"Glenn Kasten2012-12-211-3/+6
|\ \ \ \
| * | | | Remove unnecessary parameterGlenn Kasten2012-12-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just get the parameter on server side Change-Id: I433a63104dbb257e0d862be2ab61847cb36d1c15
* | | | | Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-8/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Use size_t for frame countsGlenn Kasten2012-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Also fix typo: bufferCount should be frameCount. Change-Id: Ibed539504db75ef99dc21c8ff1bf2987122063a5
* | | | Use uint32_t for sample rateGlenn Kasten2012-11-141-1/+1
|/ / / | | | | | | | | | Change-Id: Ie240b48fb54b08359f69ecd4e5f8bda3d15cbe80
* | | Remove legacy code and APIs in wifi display related code.Andreas Huber2012-09-211-25/+0
| | | | | | | | | | | | Change-Id: Ia010e7a00534f9356b3247369d0ffd65591d91aa