summaryrefslogtreecommitdiffstats
path: root/include/media
Commit message (Collapse)AuthorAgeFilesLines
* Make frameworks/av 64-bit compatibleKévin PETIT2014-02-112-4/+4
| | | | | | | | | | | | 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
* fix deadlock issues that arise when there are simultaneousjpadmana2014-01-311-24/+0
| | | | | | | | | | | | | | | | | | | effect control interface calls to proxy and to non sub-effect wrappers(eg., bundlewrapper) from audioflinger Also, return NO_ERROR when CMD_OFFLOAD succeeds Whenever there are parallel calls to proxy and non sub-effects wrappers, some of the calls are not completed. This is due to deadlock arsing out of Proxy waiting for the subeffect call to return and subeffect waiting for proxy to release lock. The call flow is changed to a cleaner and simple one - Proxy gets the aeli(effect library info) of subeffects during the EffectGetSubEffects() call. Therby, proxy will manage the sub effects by itself rather than going through effects factory. Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com> Bug: 12424044 Change-Id: I16852222f1d0e94e433a19177729323a4bb1c090
* Added support for ID3v2 meta data in 3gp filesOscar Rydhé2014-01-161-0/+2
| | | | | | | | Added support for parsing ID3v2 meta data from the ID32 chunk in 3gp files. The priority will be 3gpp -> ID3v2 -> iTunes per field. Change-Id: I0282ecab58e3e5fa6bd738078d562c8bb8ce00ed
* stagefright: do not offload LD-AAC decodingEric Laurent2013-12-211-0/+1
| | | | | | | | | | For now, do not offload LD and ELD AAC decoding because there is no way to know if it is supported by the audio DSP implementation. The longer term fix will be to have mapMimeToAudioFormat() use the audio object type in track metadata to refine the AAC format and the audio HAL list supported AAC profiles. Change-Id: Iaa88ecf3f4ae42ad48c1b42a9b007dd80eb88147
* update offloaded audio track sampling rateEric Laurent2013-12-173-2/+3
| | | | | | | | 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
* AwesomePlayer: correct stream type for offloadEric Laurent2013-11-142-1/+3
| | | | | | | | | | | | canOffloadStream() function in stagefright utils forces the stream type to AUDIO_STREAM_MUSIC when querying the audio policy manager if a particular track is offloadable or not. This causes MP3 ringtones to be offloaded which is not a validated use case. The fix consists in using the actual stream type read from the AudioSink. Bug: 11410937. Change-Id: I44b8e033a8e785a79cdc291b142f80b5580bdc4d
* Merge "Only initialize sniffers once, don't hold mutex while sniffing" into ↵Marco Nelissen2013-11-131-1/+3
|\ | | | | | | klp-dev
| * Only initialize sniffers once, don't hold mutex while sniffingMarco Nelissen2013-11-111-1/+3
| | | | | | | | | | | | b/11482896 Change-Id: Ie036554b4c9e7e8863cb07901d414ea457f1b2f1 (cherry picked from commit 377fce69297a0e5b7c3b266a7602b17146785635)
* | Merge "configure bitrate and bitrate mode at encoder initialization for ↵Andreas Huber2013-11-121-0/+1
|\ \ | |/ |/| | | VP8/9" into klp-dev
| * configure bitrate and bitrate mode at encoder initialization for VP8/9Andreas Huber2013-11-051-0/+1
| | | | | | | | | | Change-Id: I0389264db4102cabb0c6fcb4ca223d85cc9e86fb related-to-bug: 11536167
* | StageFrightRecorder: do not use meta-data mode for software encodersLajos Molnar2013-10-301-2/+4
|/ | | | | | | | | | Camera HAL v1 uses vendor-specific camera-source meta-data mode, but software encoders use generic gralloc-source mode, so they are not compatible. Change-Id: I0d1bab8eada26dcb70c97b1eec83f06d1f331239 Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 11446505
* Assign blame for playback wakelocks.Marco Nelissen2013-10-252-3/+8
| | | | | | | | | | | 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
* Fix race condition in AudioTrack::pause followed by startGlenn Kasten2013-10-161-0/+1
| | | | | Bug: 11148722 Change-Id: Iec88f00c8510363d4418e4b8d5b34feb06ecf04d
* Merge "Cleanup openRecord error handling" into klp-devGlenn Kasten2013-10-071-0/+3
|\
| * Cleanup openRecord error handlingGlenn Kasten2013-09-241-0/+3
| | | | | | | | | | Bug: 10888816 Change-Id: I84897dd7d30b370640b54e928f230604b873cb68
* | IOMX: Add prepareForAdaptivePlayback methodLajos Molnar2013-10-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | prepareForAdaptivePlayback is the fallback mechanism to support seamless resolution change for devices that do not support dynamic output buffers. It is up to the codecs to handle this appropriately, but codecs that do not handle dynamic output buffers would request enough buffers up to the requested size in this method to avoid port reconfiguration on resolution changes. Change-Id: I58d4aa8ef1359ea3472735bbe9140c3132039b3d Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 10192531 Related-to-bug: 7093648
* | Merge "MediaTimeProvider support fixes" into klp-devLajos Molnar2013-10-011-0/+1
|\ \
| * | 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
* | | fix volume and effect enable delay on offloaded tracksEric Laurent2013-09-301-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Volume: add a method to wake up the mediaserver playback thread when a volume command is received on an offloaded track. Effects: call effect chain process on offloaded playback threads asynchronously from writes to allow effect state updates while waiting for async write callback. Bug: 10796540. Change-Id: Id2747ae88783575d1d7ffd6fc86fbd054ab2c739
* | Effects Factory changes for effects offloadjpadmana2013-09-271-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | audio_effects.conf - commented changes to illustrate the addition of Proxy and sub effects to the conf file Added an effectFactoryApi - EffectGetSubEffects for querying the sub effect descriptors from the factory. This api is used by the Proxy to get the sub effects Added functions and data structures in factory code for loading the sub effects gSubEffectList - has the Proxies and their corresponding sub effects - addSubEffect() - reads a sub effect node and adds to the gSubEffectList - findSubEffect() - searches through the gSubEffectList to find a SubEffect Bug: 8174034. Change-Id: Id7f6aa67c41db370d32beaf43a979ba4ac925928 Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
* | Revert "Effects Factory changes for effects offload"Eric Laurent2013-09-271-24/+0
| | | | | | | | | | | | This reverts commit 284c17e73bbff51cb5b1adcee98386d47733757a. Change-Id: I31db21e1ad4758b21356bfe4c4c64f15b2da8737
* | soundpool: allocate shared memory heap by clientEric Laurent2013-09-243-4/+15
|/ | | | | | | | | | | | | | | | | | | | | | | 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
* Add support for level measurements in VisualizerJean-Michel Trivi2013-09-231-0/+9
| | | | | | | | | New commands to set a measurement mode and perform peak + RMS measurements. Bug 8413913 Change-Id: Ib25254065c79d365ebb34f9dc9caa0490e2d300d
* Fix slow AudioTrack and AudioRecord destructionGlenn Kasten2013-09-202-8/+12
| | | | | | | | | | | | | | | | | | | | There were two causes for the slowness: When thread was paused, it used nanosleep and sleep. These usually run to completion (except for POSIX signal, which we avoid because it is low-level). Instead, replace the nanosleep and sleep by condition timed wait, as that can be made to return early by a condition signal. Another advantage of condition timed wait is that a condition wait was already being used at top of thread loop, so it is a simpler change. The AudioRecord destructor was missing a proxy interrupt that was correct in AudioTrack. This proxy interrupt is needed in case another thread is blocked in proxy obtainBuffer. Does not address the 1 second polling for NS_WHENEVER. Bug: 10822765 Change-Id: Id665994551e87e4d7da9c7b015f424fd7a0b5560
* MediaMuxer: Hook up setLocation methodZhijun He2013-09-091-0/+10
| | | | | | | This method is needed when mediamuxer is used for camera video recording. Bug: 10594784 Change-Id: I9bd006a07e5e2ac7019849e3f4f7cf7b8356d669
* Effects Factory changes for effects offloadjpadmana2013-09-061-0/+24
| | | | | | | | | | | | | | | | | | | | | | audio_effects.conf - commented changes to illustrate the addition of Proxy and sub effects to the conf file Added an effectFactoryApi - EffectGetSubEffects for querying the sub effect descriptors from the factory. This api is used by the Proxy to get the sub effects Added functions and data structures in factory code for loading the sub effects gSubEffectList - has the Proxies and their corresponding sub effects - addSubEffect() - reads a sub effect node and adds to the gSubEffectList - findSubEffect() - searches through the gSubEffectList to find a SubEffect Bug: 8174034. Change-Id: I25b0c62b2ad523a52337128b51469e628209ea3e Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
* Merge "wifi-display: do not use HDCP's encryptNative method if its ↵Chong Zhang2013-09-041-0/+11
|\ | | | | | | unsupported" into klp-dev
| * wifi-display: do not use HDCP's encryptNative method if its unsupportedChong Zhang2013-09-031-0/+11
| | | | | | | | | | Bug: 10609422 Change-Id: I005f1d04a4191b1503b5f3e895a98b8d6560c402
* | Add ExtendedAudioBufferProvider::framesReleased and onTimestampGlenn Kasten2013-09-032-0/+11
| | | | | | | | | | | | | | and implement them in SourceAudioBufferProvider using the associated NBAIO_Source, and in Track using the associated AudioTrackServerProxy. Change-Id: I60dc4adba63fc1dc452ff16caf347e4a7c8242c2
* | Add NBAIO_Source::onTimestamp()Glenn Kasten2013-09-032-0/+6
| | | | | | | | | | | | | | | | with dummy default implementation, and implement in MonoPipeReader. onTimestamp is meant to be called by the corresponding sink when it has a new timestamp available. Change-Id: I8a90d24d1061e4a592ce5bd8ee1c9fce6bdd8a84
* | Instantiate SingleStateQueue<AudioTimestamp>Glenn Kasten2013-09-031-0/+7
| | | | | | | | | | | | as typedef AudioTimestampSingleStateQueue and use it in MonoPipe. Change-Id: Idaebb362bd9d0a81a7ed83792ab9369dc37c0e74
* | Add NBAIO_Sink::getTimestamp()Glenn Kasten2013-09-033-0/+11
|/ | | | | | | | | | with a real implementation in AudioStreamOutSink for dummy implementation initially in MonoPipe. Use in AudioFlinger::PlaybackThread::threadLoop_write() to keep the input to the timestamp latch up-to-date. Change-Id: I10ef277991b63bb43d55d6f3df75116ef32246cd
* Add IAudioTrack::getTimestamp()Glenn Kasten2013-08-292-2/+7
| | | | | | | | | | with dummy implementation in AudioFlinger::TrackHandle, and implement AudioTrack::getTimestamp() using IAudioTrack. Also document invariant that mAudioTrack and control block are always non-0 after successful initialization. Change-Id: I9861d1454cff7decf795d5d5898ac7999a9f3b7e
* New AudioTrack C++ API for audio timestampsGlenn Kasten2013-08-282-0/+49
| | | | | | | | | | | | | | | | | | | | This new API is intended to replace latency(), especially for A/V sync. The application will receive periodic timestamp notifications. The period is unspecified, but will likely be more frequent after a pause or stop, set position, underrun, display on/off change, route change, or when audio framework notices drift. It will be up to the higher level application (e.g. Stagefright) to reconstruct a clock that updates more frequently. The current latency() method doesn't indicate when latency changes due to screen on/off state, route changes, etc. Includes squahsed change-Id: I2082f8752040be0c234b1a6f1be2e269abf2ce7c Dummy implementation of AudioTrack:getTimestamp() Rename AudioTrack::Timestamp to AudioTimestamp. Renaming and pulling up to a higher level allows more modules to use it. Change-Id: Ibf7f6a207c3f8d8697f25ede2cd5200697fadb86 (cherry picked from commit dd69eb893867634fd169c03204a6ad7c74b351e7)
* Merge "wifi-display: pass session info to wifi display settings" into klp-devChong Zhang2013-08-231-1/+1
|\
| * wifi-display: pass session info to wifi display settingsChong Zhang2013-08-211-1/+1
| | | | | | | | | | | | Bug: 9371882 Change-Id: I9e4b8c2154b03ce8ff3e14c465a5224bb6e8db9a
* | Merge "MediaPlayer: add listener for raw track data" into klp-devChong Zhang2013-08-231-0/+2
|\ \
| * | MediaPlayer: add listener for raw track dataChong Zhang2013-08-191-0/+2
| | | | | | | | | | | | | | | | | | Bug: 10326117 Change-Id: I2c0bdf8adc67b11f8dc633423bee66897548f181
* | | Merge "Add ability to test supported content types to MediaDrm" into klp-devJeff Tinker2013-08-221-1/+1
|\ \ \ | |_|/ |/| |
| * | Add ability to test supported content types to MediaDrmJeff Tinker2013-08-221-1/+1
| | | | | | | | | | | | | | | bug: 10244066 Change-Id: I317f05b146db962c271893f6208890a5a6c396f1
* | | AudioSystem: new audioflinger restart detectionEric Laurent2013-08-191-0/+3
| |/ |/| | | | | | | | | | | | | | | Add a specific method to AudioSystem for AudioService to poll for AudioFlinger service restart instead of relying on current callback mechanism which is flaky. Bug: 9693068. Change-Id: Ie88bc9d25033503bc5cd2fa9d8c754d0f8045b8f
* | Merge "Add MEDIA_STARTED/PAUSED/STOPPED events to media players" into klp-devLajos Molnar2013-08-161-0/+3
|\ \ | |/ |/|
| * 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
* | Merge "You can now opt-in to having the video decoder push blank buffers to ↵Andreas Huber2013-08-151-1/+2
|\ \ | | | | | | | | | the" into klp-dev
| * | You can now opt-in to having the video decoder push blank buffers to theAndreas Huber2013-08-141-1/+2
| | | | | | | | | | | | | | | | | | | | | surface on the transition from executing->idle by specifying the key "push-blank-buffers-on-shutdown" with a value of 1 in the call to configure. Change-Id: I1155fccf89f18e717728c985e590651597595515
* | | Merge "Check adaptive playback support via CodecCapabilities" into klp-devLajos Molnar2013-08-142-1/+7
|\ \ \ | |/ / |/| |
| * | Check adaptive playback support via CodecCapabilitiesLajos Molnar2013-08-132-1/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added flags field to CodecCapabilities, so that applications can query whether codecs support various features. For now added one video-decoder feature: kFlagSupportsAdaptivePlayback Media playback applications can query it to see if a codec supports seamless resolution changes, such as by supporting dynamic output buffers. Signed-off-by: Lajos Molnar <lajos@google.com> Change-Id: I09da46e8ab6b8645fa2749e33128e49eda2e865b Related-to-bug: 7093648
* | Merge "Optionally repeat the previously submitted frame to the encoder" into ↵Andreas Huber2013-08-132-0/+3
|\ \ | | | | | | | | | klp-dev
| * | Optionally repeat the previously submitted frame to the encoderAndreas Huber2013-08-132-0/+3
| |/ | | | | | | | | | | | | if no new frame has been delivered by surface flinger within the timeout interval. Change-Id: I282f1b726dfe5646b178d7858d6f5d4f5a264fde
* | Fix potential leak of audio input handle.Jeff Brown2013-08-091-8/+1
|/ | | | | | | | | | | | | The audio input handle is ultimately owned by the audio recorder object but it could be dropped on the floor if an error occurred before that object was fully initialized. Rearranged some of the argument validation and merged getInput_l with openRecord_l to simplify the code and prevent such a leak from occurring. Bug: 10265163 Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2