summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "nuplayer: Fix audio EOS notifiy on AudioSink not ready"Keith Mok2016-05-121-12/+0
| | | | | | | | | | | | This patch is buggy, and causing notifyConsume not called when the buffer is erased, causing audio discontinous cannot resume properly. This patch is not in 8994 CAF also. FEIJ-276 This reverts commit dc5f0eb0bb08885f63a97a111b02e234efc5c413. Change-Id: Idcb5ec9a419a979afe170d3a518ee7696a6fac6c
* nuplayer: ignore openAudioSink while waiting for teardown completionDhananjay Kumar2016-04-131-5/+23
| | | | | | | | | | | | | | | | | | | | - AudioSink is reopened on AudioTearDown event as well as on decoder output format change. These events are from different contexts, independent of each other and can occur concurrently, doing set of thread-unsafe operations on audioSink, which sometimes may result in fatal error. - Any request to openSink, after teardown event is received but before its completed, is redundant since once teardown is completed sink is anyway going to be opened again. Also ignoring sink reopen while in teardown would avoid concurrent processing of thread-unsafe operations on audioSink. - Update nuplayer to prevent reopening of sink while teardown is still going on. CRs-Fixed: 978013 Change-Id: Ieb3825f133c2099e07d6e92ef101dd5156af8a20
* nuplayer: update anchor time for offload usecaseSharad Sangle2016-04-131-0/+1
| | | | | | | | | | | In non-offload usecase, mAnchorTmeMediaUs is updated for every audio FillBufferDone. Added the same logic for offload case, otherwise video updates max media duration as ZERO, for clips which have small audio data, and all the buffers are sent to DSP before first video buffer is processed at NuPlayerRenderer level Change-Id: Ib6e0f251207c87ad1525041d07187cef91f4dda5
* audio: Update anchor time only when sink start is successfulPreetam Singh Ranawat2016-04-031-1/+1
| | | | | | | | | | | | | - During offload (WH) to non-offload fallback (BT), anchor time is getting updated incorrectly with offload renderer position when it tries to start sink using offload mode only. - update anchor time post resume only when sink is started successfully. Change-Id: I2c2992afa90506e08389226964b0bd5a5be07529 CRs-Fixed: 978596
* audio: Update anchor time for offload playback post resumePreetam Singh Ranawat2016-01-181-0/+7
| | | | | | | | | | | | | -AV sync is lost after multiple pasue/resume operatins. -Renderer does not update anchor time post resume and it may lead to AV sync loss after multiple pause/resume in offload playback case. -Get renderer position and update anchor time post resume for offload audio Change-Id: I2d9ba21c0e9b193ec77213de12229407cbf8dfd6
* NuPlayer: Avoid one more assertionHaynes Mathew George2015-12-231-1/+11
| | | | | | | | | | b/25372978 tracks an assertion in Renderer when the size of the buffer to be written is not a multiple of audio sink framesize. Until resolved, avoid assertion and notify an error back to the player CRs-Fixed: 941002 Change-Id: Id54b357dcbf7afe90e2290665392275d6dd5eaef
* nuplayer: Fix the neverending offloadSteve Kondik2015-12-151-95/+100
| | | | | | | | * This code should have been left inside the conditional * Also fix a misplaced flag which remained set even if opening in offload mode failed Change-Id: Id72c17051db601e37b2289e6d904ce8f75ba6878
* nuplayer: PCM offload fixesSteve Kondik2015-12-141-4/+6
| | | | | | | * Fix PCM offload when passthrough isn't used (OMX decoder) * Fix resume of PCM offload after pause timeout Change-Id: I742eafd6ae8656fb214ba6b81cc63af57590c28c
* nuplayer: Fix audio EOS notifiy on AudioSink not readyXiaoming Yang2015-12-141-0/+12
| | | | | | | | | | Audio EOS won't be notified by renderer if AudioSink is not ready and first buffer itself has EOS. Playback complete won't happen due to missing audio EOS. Hence, audio EOS needs to be handled and notified. Change-Id: I779c7034d1964485c2b064c0179d3cd341af5a5f CRs-Fixed: 801121
* stagefright: Resurrect PCM offloadSteve Kondik2015-12-131-96/+118
| | | | | | | | | | | | | * Forward-port the open-source code from L which was moved to closed-source in M. This is being done out of necessity- the architecture chosen by Qualcomm is not optimal and doesn't work well with a singular codebase which attempts to service a large number of devices. * This patch brings in the code to support PCM offload (AudioFlinger bypass). This allows for playback of high resolution clips without decimation stages, and enables reduced power consumption for audio pipelines which take advantage of the Hexagon DSP (effects). Change-Id: I0ef15fc3df538ab723f3c12ce0ed71d0e607c99e
* Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-071-10/+17
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * NuPlayerRenderer: do not send rendering started message when pausedAndy Hung2015-10-131-1/+10
| | | | | | | | | | | | | | Delay until resume. Bug: 23669269 Change-Id: I0a805812d80b1aad561425442bca0fc05a05752f
| * NuPlayerRenderer: always update MediaClock with max media duration.Wei Jia2015-10-131-9/+7
| | | | | | | | | | | | Bug: 24345295 Change-Id: I868c9c44ea22de98a083432262e485d0f134203f (cherry picked from commit d005c5ddb4842369979df7b76f1d0f5f1380fcd9)
* | NuPlayerRenderer: always display the first video frame without delay.Wei Jia2015-11-291-5/+10
| | | | | | | | | | Bug: 25357751 Change-Id: Iffd9af2ddf7626155d98caf086fe209600141585
* | stagefright: Act V: I am become death, the destroyer of worldsSteve Kondik2015-11-241-2/+2
| | | | | | | | | | | | | | | | * In which our hero unites the legions of distant worlds together as one at last to fight anew until the segfaults boil the lands and the New Version cometh. Change-Id: I869b2ab254968ed7a133827ea9e5ba6056f68a5c
* | stagefright: Welcome to my nightmare, act IVSteve Kondik2015-11-231-1/+1
| | | | | | | | | | | | | | | | * Standardize parameter names, clean up stub calls * Attempting to make QC's blob work. We've entered our last days on earth. All is lost, all is lost. Change-Id: Idef9aad100f414e64a737e0f0a8c9c112ad4cb46
* | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-2/+36
|\ \ | |/ | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * Merge "NuPlayerRenderer: Do not drain audio during teardown" into mnc-dr-devAndy Hung2015-09-151-0/+5
| |\
| | * NuPlayerRenderer: Do not drain audio during teardownAndy Hung2015-09-111-0/+5
| | | | | | | | | | | | | | | Bug: 23748678 Change-Id: I8b65786f25f4524e5e2e9476ecc2a4f4ab3aea9e
| * | Merge "NuPlayerRenderer: Do not deliver audio too soon after stop" into ↵Andy Hung2015-09-141-1/+18
| |\ \ | | |/ | |/| | | | mnc-dr-dev
| | * NuPlayerRenderer: Do not deliver audio too soon after stopAndy Hung2015-09-011-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For non-offloaded audio, do not deliver audio data too soon after stop when in paused mode. Otherwise the audio MixerThread will keep the track playing, instead of inactivating the track. Bug: 23167401 Change-Id: If376148c742fde2d20dc5d23bf0b894fe378e71a (cherry picked from commit b03dcb34cd44d77e5fe1559e72323e03c59931db)
| * | NuPlayerRenderer: avoid divison by zero when sample rate is 0.Wei Jia2015-09-031-0/+5
| | | | | | | | | | | | | | | | | | | | | Also close AudioSink when failing to set playback rate. Bug: 23624664 Change-Id: I5bf8bcca4a21c26fb52821db597d61f7f1273d5c
| * | nuplayer: let non-offload AudioSink to handle the reconnect when there's video.Ronghua Wu2015-09-021-1/+9
| |/ | | | | | | | | Bug: 23707144 Change-Id: Ie0e2db8dc91a78f82fb935d165aa11abe73697a3
* | libstagefright: Extended media support via FFMPEGSteve Kondik2015-10-281-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Original work by Michael Chen - https://github.com/omxcodec * Kitkat port by Chih-Wei Huang / Android X86 project * Additional fixes by Arcee and Cyanogen * High resolution support by Cyanogen * Lollipop port and refactoring by Cyanogen * Marshmallow port and refactoring by Cyanogen ------ libstagefright: add null checking to addPlugin libstagefright: fix error handling of dlsym() According 'man dlsym', a NULL return from dlsym() doesn't indicate an error. The correct way to test for an error is to call dlerror() to clear any old error conditions, then call dlsym(), and then call dlerror() again to check whether its return value is not NULL. libstagefright: add more media mimetypes This is the first step to add the ffmpeg plugins. libstagefright: add ExtractorPlugin The patch allows to load an ExtractorPlugin to extend the functions of DataSource::sniff and MediaExtractor. A plugin has to implement a C function getExtractorPlugin to fill the MediaExtractor::Plugin struct. The filename of the plugin could be specified by the media.stagefright.extractor-plugin property. Change-Id: I995a37a4f1ab4bba6ca3c24c7001a27a1e3ccb90 FLACExtractor: Add more sample rates support In FLACExtractor.cpp, it has function to check file's sample rate. If the input sample rate is not in its list, it will return "unsupported sample rate" issue. Modify code to make other sample rates (100,1k,42k,46k) pass the check Issue: AXIA-1441 Change-Id: I48f91119275560ec6d00feb0dedc70d10aa55262 Signed-off-by: Xiaobing Feng <xiaobing.feng@windriver.com> Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com> libstagefright: add ffmpeg components libstagefright: add more decoders Add support for wma, wmv, ra, ape, dts decoders. Change-Id: Iaf48a806aa0cef7d9bcb848383fc3d778c8bd248 libstagefright: allow to use the extended extractor in priority If the meta contains the string "extended-extractor-use", use the extended extractor first. add support for rv20, rv30 add ffmpeg heuristic decoder Change-Id: I5eed11b563ca7f15d44bacfb795d6f3da08ab883 add HEVC(H.265) decoder and cleanup Squashed the following commits of branch cm_maguro-10.1 from https://github.com/omxcodec/android_frameworks_av.git by Michael Chen <omxcodec@gmail.com> defb904 remove MEDIA_MIMETYPE_AUDIO_MP2 8036958 add fetchUriFromFd func to get file name 91bc7d5 fix videoCompressionFormatString and audioCodingTypeString funcs f03069f reset FRAME_DROP_FREQ to 0 718b99a add HEVC(H.265) decoder 84f8bf6 cleanup f026c93 cleanup 440614a add debug info Change-Id: Ie75db0778f633357e2280aef6d47a0fa3beb823e AwesomePlayer: use AwesomeLocalRenderer for OMX.ffmpeg.* components stagefright: Remove duplicate types from QC media defs Change-Id: I50ecafe79a2985d0868a1ac82464d6ca448aa2c5 Conflicts: media/libstagefright/ExtendedMediaDefs.cpp media/libstagefright/OMXCodec.cpp libstagefright: Re-introduce a QCOM_HARDWARE ifdef after the FFMPEG commit Fixes a build error on non QCOM hardware. Change-Id: I4a4268b351d0d8bf748dd03ccea0fbab20ed4314 DataSource: Split off ffmpeg sniffer to a second pass, and only if necessary ffmpeg's sniffer is intended as a grab-all-that-doesn't-work-elsewhere extractor. Unfortunately, this causes two issues: - As written, it requires ffmpeg to whitelist any extractors supported by stagefright, or else it will blindly override them. This has codebase sync issues, as shown by the VP9 and WAV accidental overrides - It imposes an in-depth analysis of _all_ media, even that which we want to be processed quickly by shipping stagefright plugins (hardware or not). This is mostly noticeable in network streams and thumbnail generation. This patch moves FFmpegExtractor to an independent sniffer queue, and it only invokes it when the regular MediaExtractor hits 1 of 3 conditions: 1 - The confidence in the identified container type is low 2 - No container is identified at all 3 - A video container was found by other extractors, but only 1 stream (audio or video) was identified. Change-Id: Ib96ff4f6bc06223fe0e819a57560d3c872a79ddd stagefright: OMX.ffmpeg.* are software decoders, ensure they're treated as such Wherever the component name for OMX.google soft decoders is used to identify a software-based component, do the same for ffmpeg. Things like memory management and window buffers care about this. Change-Id: Ib83561936c7383e8726edb073cea9d78f7d1312f libstagefright: Don't invoke FFMPEG for MP3 Change-Id: Ia30d25d1a994328827f14a286661cd2e1eaa1181 stagefright: Fix audio codec fallthru * We shouldn't return an error from setAudioFormat unless it's really an error since fallthru is necessary. * We don't even need to do this, since the component name is checked before calling into mm-parser or FFMPEG. * Fixes Vorbis decoding after FFMPEG patch. Change-Id: I4871c62044c6693e5698119dee3a10c20c26e2c7 stagefright: Fix codec lookup bugs on NuPlayer * Fix use of WMA/WMV software codecs * Fix mpeg2 software codec name * Don't override the component name in ACodec. This actually breaks stuff because the format isn't available in the kInit message. Change-Id: I93c292e039de5f24c2ccbd6ae2242b06d28fe518 stagefright: Cleanup and improve format parsing * Move FFMPEG-specific exceptions to FFMPEGSoftCodec * Add handling for AAC MAIN profile * Use the new OMX_AUDIO_CodingAndroidAC3 to handle AC3 Change-Id: Ibb806cd2b9dd23dc1e1b2c862fcde40605023a49 stagefright: Keep track of the bit width in the RAW codec * We need this to push 24-bit PCM around Stagefright and OMX Change-Id: Ic94ec972162a01545d5dd0ad0bf3eb6c6731f42e stagefright: Adjust confidence threshold for extended sniffers * Some sniffers return 0.2 for cases where they only find an audio track in some containers. * Change the comparison to also examine files right on this threshold. * This allows us to score ONE FUCKING HUNDRED PERCENT on the Antutu Video Test \o/ Change-Id: I78b6ab8a634771e0e290f669801f5b08d6a32a51 stagefright: Fix FFMPEG catchall decoders * Get this metadata properly flowing * Allows us to play tracks such as Apple Lossless :) Change-Id: I2990b30eef5b672da339d24444424c61a43b85c2 stagefright: Fix metadata/message conversion issues * Remove duplication of code between ExtendedCodec and FFMPEGSoftCodec, just call into ExtendedCodec and properly ifdef QCOM-only parts. * Fix CSD not being converted when AV_ENHANCEMENTS wasn't set- this was breaking the software video codecs on Hammerhead. Change-Id: I9cd4316ce19b15baabf12b78b992498ce48e2697 Fix compile error after I9cd4316ce19b15baabf12b78b992498ce48e2697 frameworks/av/media/libstagefright/ExtendedCodec.cpp:1187:1: error: expected '}' at end of input Change-Id: I7d75e69160f794b177f4235f4a6bb5a188dc0d08 stagefright: Fix AC3 playback * Skip setupAC3Codec in ACodec for non-Google components. Change-Id: I5090485ba020f7ad1c0962fc977e38675b4c8314 stagefright: Guard against crash with mismatched codecs * Return unsupported error if WMV file can't be scanned. Change-Id: Ia4a1ac7a299990f8b9c05a93736cb2fa9d0ee965 stagefright: Correct ifdeffage of some QC codecs Change-Id: Ie8cc7287967b84e09941283559ca542efd928d91 stagefright: Create native window for FFMPEG software codecs Change-Id: I178f334f1fa1ea9edc6898fb61e72902c2cb2651 stagefright: Don't ever try to use extended sniffers on DRM * This can cause long retry intervals during key exchange. Don't do it! Change-Id: Id9a87dcbe43cd0cc9919fe07f0a963e087baccad stagefright: Be more tolerant of missing metadata for FFMPEG codecs * If these codecs are instantiated programatically and required metadata isn't sent, just set some defaults instead of crashing on an assert. * This fixes testAllNonTunneledVideoCodecsSupportFlexibleYUV in MR1 CTS Change-Id: I69bf6105a1be529298de574bd5d3b6813e7a4e8f stagefright: Fix issues with software decoders * Fix MKV thumbnails * Fix VC1 thumbnails * Fix FFMPEG thumbnails * Fix trial decoder * Fix edge cases with WMV3/VC1 playback * Fix a state issue which caused some codecs to get wrong configuration Change-Id: I09599166aa24bcff53f91e43de096c4fad8ca7ad stagefright: ffmpeg: Slightly raise the threshold for the ffmpeg scanner 0.2 is the success value for the OMX.google soft audio sniffers, which was making ffmpeg own the unpacking of those streams needlessly. Fixes CYNGNOS-282 Change-Id: I75f50ed838cb8af9acdf99aa284b80a070555284 stagefright: Add support for loading a custom OMXPlugin * To facilitate moving the stagefright-plugins glue out of the framework, support is added to OMXMaster to load multiple external plugins besides internal/vendor versions. * This is currently limited to one plugin, defined by the "mm.sf.omx-plugin" system property. The code will allow any number of libraries to be loaded, though. * Should also be useful for nonstandard vendor implementations too. Change-Id: I27d7e16ad56baa17754d8ea47a8c608a0d73d6f1 stagefright: Move a bunch of FFMPEG stuff out of here * Get rid of some of the glue code for stagefright-plugins and use the new extension header and plugin. * Still a bunch of TODOs on this, but it works. Change-Id: If07d3213952b624d48035e5f58ad883b2a4049b0 stagefright: Remove deprecated FFMPEG config Change-Id: I1fcdb4eeba72e2420493b89ddd6fc718d170ced7 stagefright: Support for 24-bit audio in StageFright * Plumb bit depth thru ACodec and OMX * Add support for 24-bit PCM offload in NuPlayer on QC devices * Use new AudioFlinger features for mixing multi formats without offload * Clean up a bunch of code Change-Id: I018d3a995b63450a38c6c43eaa37c86be30fd893 nuplayer: Fix PCM offload turning on all the time * Remove the extra condition, since this will be set even if PCM offload was denied. Change-Id: I8f33ef68562d8e057e7a86c5ae6187d0049bf3aa stagefright: Cleanup of PCM offload checks * Put the checks in a single place. Change-Id: I2d0d5b542593896e78bf989296de1a1d1e3a4963 stagefright: Add bit-depth plumbing for new formats Change-Id: I13cfd75e4b4819543b64babf20cc9af57ea2978f nuplayer: Fix bitrate propagation * We use "bitrate" rather than "bit-rate". Change-Id: I4699194e3e3f7ef55b4eb554f5de7a6b5f6b80ce libstagefright: Implement fallback mechanism to SW decoder Implement fallback mechanism to software decoder when hardware decoder configuration fails in ACodec Change-Id: Idf4c445942b03e28b264c91a20e69d52224727bd
* | Revert "Revert "mediaplayer: make frame-accurate avsync configurable""Surajit Podder2015-10-061-0/+18
| | | | | | | | | | | | This reverts commit e17afa888040eb5fbd31249305efd88ee03bb5bc. Change-Id: I7afb6a055d3efb08fdbdff19f0bbad01934614e8
* | stagefright: Add support for custom size i/p buffervivek mehta2015-10-061-3/+16
| | | | | | | | | | | | | | - handle non default input buffer size - fix issues associated with non-default buffer size Change-Id: Iad31f5c85601983b01e18e130b1c3eecb3988e30
* | NuPlayerRenderer: Handle AMessage post error in openAudioSinkLeena Winterrowd2015-10-061-2/+2
| | | | | | | | | | | | | | | | | | AMessage::postAndAwaitResponse can fail if the target looper no longer exists or if allocation of the reply token fails. Check for error in these cases to avoid deferencing a NULL response. CRs-Fixed: 902117 Change-Id: I52d838e93768ba5b431a0ed8c74a67a5575f6685
* | NuPlayer : send the correct streaming info while opening audio sinkPreetam Singh Ranawat2015-10-061-4/+10
| | | | | | | | | | | | | | | | | | -For any offload playback NuPlayerRenderer always open the audio sink with isStreaming info as true. -Pass the streaming info to the NuPlayerRenderer while opening audio sink Change-Id: Ic9d5e7ae0b82a316ec4b4a72037519448f1a011c
* | audio: use updated method for getting sample bitsSharad Sangle2015-10-061-1/+1
| | | | | | | | | | | | | | method getPcmSampleBits is now getAudioSampleBits as it is extended for WMA, so use the updated method Change-Id: Ic0620fd009a8544db138f088cfd2e7e4a4ff390c
* | NuPlayer: Fix for audio mute after call terminationPreetam Singh Ranawat2015-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | - Audio is muted while resuming music after call termination - Offload track is tear down by audio flinger/policy manager during call & TEAR_DOWN event is propgated to audio track. Audio track returned error on resume of playback since track is already closed - Add error handling in nuplayer during resume & force recreation of audio track from NuPlayerRenderer if resume fails CRs-fixed: 759500 Change-Id: Ic84e692511b085e75a96ae711e5b1585fce47758
* | audio: Support for compress offload recoveryPreetam Singh Ranawat2015-10-061-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | - Add support for time stamp calculation on time stamp query failure during SSR for playback session - Make sure the timestamp query is made does not acquire the same lock. I2ea8eacb1269895f3254da356ed0eab3bc1c2b9b,n,z CRs-Fixed: 683288 Change-Id: I08a5ea333732b76bb9df110d905daae074b7864b
* | audio: add support for ALAC decoding.Sharad Sangle2015-10-061-0/+3
| | | | | | | | | | | | | | add support for decoding/offloading ALAC audio formats Change-Id: Id66f0cb6c140113741962e119148bf434de3d064
* | AVCustomizations: Enable 16 and 24 bit PCM offload.Preetam Singh Ranawat2015-10-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | -create extended decoder and renderer -add change to pass bit width and format info to renderer. -add change for PCM conversions -add changes for time calucation Conflicts: media/libmediaplayerservice/nuplayer/NuPlayer.cpp Change-Id: I3363140fad441a7746884076c40b46e777f2e06e
* | NuPlayerRenderer: Update position of AV stream even after audio EOSPraveen Chavan2015-10-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | For AV streams with shorter audio, anchorTime does not update beyond audio EOS causing MediaPlayer.getCurrentPosition to return the same fixed value (progress bar does not update). Allow updating the current position in renderer beyond the anchorTime to update the player's position if audio stream is present. CRs-Fixed: 808073 Change-Id: I75625d24a6c155ff12f27fd0848503657e9219aa
* | NuPlayer: DEBUG: Notify RENDERING_STARTED event after resumePraveen Chavan2015-10-061-0/+1
|/ | | | | | | notify MEDIA_INFO_RENDERING_START after resuming from pause, to enable java app to profile resume-latency. Change-Id: I06bd6307511b7dde8f6fe1a2d15009d3a543a318
* NuPlayerRenderer: handle error when resuming an offloaded trackEric Laurent2015-08-121-1/+4
| | | | | | | | | | | Make sure that an offloaded audio track is torn down if start() returns an error in onResume(). This makes sure that a track invalidated due to a potential audio path change while paused is re created on the correct output. Bug: 22256441. Change-Id: I6c7bfec6e7322415daffc0451bab46d0c558522a
* NuPlayer:seek handling on kWhatAudioTearDownRobert Shih2015-08-051-4/+3
| | | | | | | | Restart from previous seek time on kWhatAudioTearDown if mRenderer didn't supply a useful positionUs. Bug: 22662968 Change-Id: Ic21957f676ba25fb92694f71093bed60b630390b
* NuPlayerRenderer: prepareForMediaRenderingStart_l on en/disable offload audioRobert Shih2015-07-241-0/+6
| | | | | Bug: 22662910 Change-Id: I8fb4a9fce801295a4b251e27965aef048d217da6
* stagefright: MediaSync: use VideoFrameSchedulerLajos Molnar2015-07-161-2/+1
| | | | | | | Move VideoFrameScheduler to libstagefright as part of this change. Bug: 22234976 Change-Id: Ib23fb52399cb700a1dcf789e8486b94a3edf9d95
* NuPlayerRenderer: clear first audio anchor time only when audio is flushed.Wei Jia2015-07-131-1/+1
| | | | | | Bug: 22228075 Change-Id: I5914d7cfd2fb9c7ca5279964b530a404b20c8764
* stagefright: post audio EOS in NuPlayerRenderer if getPosition failsChong Zhang2015-06-121-0/+34
| | | | | bug: 20071480 Change-Id: I81f2a1fea0daa694a61be7f4a6d70d6847e9f183
* NuPlayerRenderer: discard pending kWhatDrainAudioQueue message when ↵Wei Jia2015-06-101-3/+8
| | | | | | | AudioSink is opened in callback mode. Bug: 21723010 Change-Id: Iddab8c1cbdf87714aa53315feba064fe101d8f98
* Merge "NuPlayerRenderer: change log from ALOGW to ALOGV when audio sink ↵Wei Jia2015-06-091-1/+1
|\ | | | | | | reports WOULD_BLOCK on writing." into mnc-dev
| * NuPlayerRenderer: change log from ALOGW to ALOGV when audio sink reports ↵Wei Jia2015-06-091-1/+1
| | | | | | | | | | | | | | WOULD_BLOCK on writing. Bug: 21726662 Change-Id: I4aa63df7f21e06473594dda30a935e0f1cb745ac
* | NuPlayer: Allow audio drain to fill buffer when pausedAndy Hung2015-06-031-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a pause lasts more than a few seconds, the audio device enters standby. When the audio device comes out of standby, it typically requests a large amount of data to fill its buffers (especially severe for deep buffer PCM mode). To avoid a glitch, continue to fill the buffer (until no more data can be written) when paused. Also, we do not start the audio sink if we are paused to avoid audio playback in video preview mode. Bug: 19062223 Bug: 21198655 Change-Id: Ifb3f181d5e810283381b65f2af16a4c71df0b04f
* | NuPlayer: Allow audio callback to fill buffer when pausedAndy Hung2015-06-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a pause lasts more than a few seconds, the audio device enters standby. When the audio device comes out of standby, it typically requests a large amount of data to fill its buffers (especially severe for deep buffer PCM mode). To avoid a glitch, continue to service the audio callback when paused. Also, we do not start the audio sink if we are paused to avoid audio playback in video preview mode. Bug: 19062223 Bug: 21198655 Change-Id: I987337a87e6c875aeb381df8ad37c7139c42dc72
* | NuPlayer: Add audio deep buffer configurationAndy Hung2015-06-031-0/+3
| | | | | | | | | | | | | | | | Disabled for video streams now. Enabled by property media.stagefright.audio.deep 1 Bug: 21198655 Change-Id: I03f3b43091f950637d46779e2e74c1321b2cd268
* | NuPlayer: Add audio sink buffer configurationAndy Hung2015-06-031-3/+18
| | | | | | | | | | | | | | | | Property media.stagefright.audio.sink (in milliseconds) Also change the default buffer size for PCM playback to 500 ms. Bug: 21198655 Change-Id: I5781288f59bf08fbecd9263a26c919570b58be0f
* | NuPlayer: Add audio callback mode for PCM audio.Andy Hung2015-06-031-13/+58
|/ | | | | | | Disabled for now. Enabled by property media.stagefright.audio.cbk 1 Bug: 21198655 Change-Id: I8f117b089fe019009f1615908d33720a93e1b21e
* libmediaplayerservice: try to open audio sink in offload mode in error.Ronghua Wu2015-05-221-15/+16
| | | | | | Bug: 19061432 Bug: 21370108 Change-Id: Iaa757555ef37fd1ac87b6e2d5a9969bb58cc5ebc