summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Avoid parsing CC SEI payload beyond buffer endPatrik2 Carlsson2016-03-221-0/+6
| | | | | | | Break CC SEI parsing when payload size exceeds buffer size to avoid a CHECK that have been seen in MTBF statistics. Change-Id: Ifd97648678a935ac815dd616301d46f9bf583838
* Merge branch 'dr15' into cm-13.0Steve Kondik2016-03-121-2/+7
|\
| * Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-101-2/+7
| |\ | | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 22
| | * fix deadlock in MediaPlayerServiceErik Wolsheimer2015-10-301-2/+7
| | | | | | | | | | | | | | | | | | BUG: 25263909 Change-Id: I3f08c02a851b67ab269e9aef7b2fb17eda09ea5d
* | | nuplayer: Allow devices to force a flush when surface changesChristopher R. Palmer2016-03-112-1/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes some playback problems on the Zenfone2 (running on 5.0 based blobs). The problems are easily reproduced by viewing a video in Chrome and then switching to full-screen mode. The change in surface causes the log to get flooded with messages like: dc_device_post: Buffer ID=14460 not imported by D until Android crashes. With this change, it ends up correctly mapping the surfaces after the flush fixing the problem. The code that is being #ifdef'ed out was added in M in commit commit a81c6229638a4db56752dd77a6610e0f0971e877 Author: Lajos Molnar <lajos@google.com> Date: Fri Jul 10 19:17:45 2015 -0700 nuplayer: use codec->setSurface when possible to avoid seeking Bug: 22414719 Change-Id: I0442e12af960f86a0fc090b4a469c62ba638a1a0 and it appears that our blobs simply cannot handle this optimization and therefore we need a means by which to disable it. Change-Id: I105d647e724f5b63ef5cb0852481ecd2990c2d5e
* | Nuplayer: Flush the decoder if seamless format change is supportedLi Sun2016-03-083-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | In smooth streaming enabled case, flush the decoder if seamless format change is supported. Otherwise,ramdomly video frames with old resolution are queued to the new surface and results in green frames. Calling flush ensures that all the old video frames are cleared. Change-Id: Ia020a01fd0eaa8af8e48b6edb526a3f53875b068
* | stagefright: Support audio in slow motionKeith Mok2016-03-071-0/+24
| | | | | | | | | | | | | | | | | | | | | | We need to query AVUtil for slow motion recording to support audio in slow motion recording instead of using mCaptureFps and mCaptureFpsEnable, since qcom camera1 HAL don't call setCaptureRate for slow motion recording. CYNGNOS-2196 Change-Id: I7b75ab44499ed13cb1e4e6f527103ec0f09ffcc8
* | audio: omx encoder isn't expected for raw recordingWeiyin Jiang2016-02-251-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raw recording doesn't require any encoder, so no OMX encoder will be created and audio source will be directly used as media source. UNKNOWN_ERROR error will be threwn if call AudioSource::start() continuously, so we should avoid omx encoder operations if it's not created for raw recording. CYNGNOS-1679 Change-Id: Ib38c4e42b7667e9bf882cddb15422d0dd598b60e CRs-Fixed: 752419 (cherry picked from commit 587267232a2829936510bbe46591863403782d1a)
* | 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: looping playback only if it was runningWeiyin Jiang2016-01-181-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Audio buffer filling in renderer is still happening, though pause was issued. As a result, EOS was reported irrespective of renderer state. If nuplayer driver receives playback complete after stopped, it will again be activated, which appears stop is not taking effect. Add a check for driver state to allow looping only if it was in running state. Change-Id: Ic9f8eac635a774cd805b3978fab640d73ae35744 CRs-Fixed: 958311
* | stagefright: Fix crash on mediaserverKeith Mok2016-01-061-1/+3
| | | | | | | | | | | | | | CameraSource can be null when we do setupCustomVideoEncoderParams, add a null pointer checking for it. Change-Id: Ie28018e67d623b03bb7c3c7dbc8a92669158b84b
* | stagefright: Forward-port HFR and HSR supportSteve Kondik2016-01-052-4/+13
| | | | | | | | | | | | * CAF commit bd42a7ac3a60c0d8a079b4567484c9b006bac8ad upstream Change-Id: I457ccab603647f3139ea2199a544f64ac3d1a214
* | nuplayer: Enable PCM offload for any sourceSteve Kondik2015-12-291-4/+10
| | | | | | | | | | | | | | | | | | * Use the raw PCM format to perform the early open of the audio sink. This ensures that the renderer will do the same. * Fill in stubs for timestamp and position calculation. This fixes underruns and other issues. Change-Id: I8d761e523194cc12f387b4b2aa1594536e56da01
* | nuplayer: Pass along the sniffed metadata from GenericSourceSteve Kondik2015-12-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * When the extended sniffer detects a file type that only it can handle, it will set a flag in the metadata. In some cases, an extractor exists in Android already for the filetype however it may be known to fail or we may want different behavior. * This flag is checked in MediaExtractor, but GenericSource does a little dance in order to stack DataSources for DRM and was throwing out this metadata (it's not really used by AOSP), so the desired behavior was not seen for some cases. * Add a new optional argument when creating the MediaExtractor to pass in the metadata from the original sniff so that the extended extractor is used where necessary for streaming formats. * This fixes FLAC offload with Tidal. Change-Id: I7d6b875346ce63b60cd3c37572b779665bfe217c
* | 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
* | Fix: "NuPlayerDecoder: add synchronous call pause() to ensure decoder will ↵Luca Stefani2015-12-211-1/+0
| | | | | | | | | | | | | | | | not request or send out data." * Missing from backport Change-Id: I562d28a4770aec2f9c547c482e79cca49be9dbb9
* | NuPlayerDecoder: add synchronous call pause() to ensure decoder will not ↵Wei Jia2015-12-196-3/+25
| | | | | | | | | | | | | | | | | | | | request or send out data. Port of AOSP commit: 3bc667014875aba35102941b3997d242c303aa0d Bug: 25372978 CRs-Fixed: 941002 Change-Id: Id66ab9b9961d5a3b9fb783ae73c27ed1c8054db8
* | Revert "NuPlayer: Teardown sequence for pcm offload"Haynes Mathew George2015-12-192-49/+0
| | | | | | | | | | | | | | This reverts commit 00208bc4c6d725ea9ce0795a897d42b5a32360c3. CRs-Fixed: 941002 Change-Id: I22c9954fc3ed3207f218dde0c02f7dddc8751df9
* | Revert "nuplayer: Perform proper shutdown sequence for offload teardown"Haynes Mathew George2015-12-192-10/+43
| | | | | | | | | | | | | | This reverts commit 9944bae1fda19634b04cd4e2b755c3d368405a8b. CRs-Fixed: 941002 Change-Id: Ief7c6a1a8d9fd290da49867b1fef9f6e9e2a51a1
* | frameworks/av: fix channelmask and source format for pcm filesAmit Shekhar2015-12-191-0/+1
| | | | | | | | | | | | | | | | | | -Update channel mask from channel count if parser reports channel mask to be 0 -Update source format for each buffer by extending call to setPcmFormat when aggregation is not done Change-Id: I1f4ce07e3e784d85e63be03a69ac1395bfa913e2 CRs-Fixed: 948222
* | nuplayer: Do not drop corrupt EOS frameShalaj Jain2015-12-191-8/+6
| | | | | | | | | | | | | | Do not drop EOS frame even if DATACORRUPT flag is associated with it. Change-Id: Ib231dd8eb89aa14f824760562fcc371246d7ba9d
* | Fix potential double close in IMediaMetadataRetriever::setDataSourceTaiju Tsuiki2015-12-182-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IMediaMetadataRetriever::setDataSource(fd, offset, length) takes the ownership of |fd| on the direct invocation, and doesn't take the ownership on invocation from Binder. This is inconsintent to other similar methods like IMediaPlayer::setDataSource, and causes potential double close of |fd|. This CL changes the caller and implementations to leave the ownership to make them consistent. Also, fixes a double close in IMediaPlayerService::setDataSource in an error case. Change-Id: Id551a1e725c4392b0fe6b7293871212eb101c0a5
* | nuplayer: Fix priority inversionSteve Kondik2015-12-181-1/+1
| | | | | | | | | | | | * Found using "perf sched latency" Change-Id: I358a6f9baf3d52b9ed7f010c06893dbf839e1973
* | nuplayer: Error checks for PCM format extensionsSteve Kondik2015-12-171-1/+1
| | | | | | | | Change-Id: Ie9a3a8c335611d11c84bf24cb50c73c1644ad381
* | nuplayer: Improve offload format conversionsSteve Kondik2015-12-152-3/+10
| | | | | | | | | | | | | | * Annotate source buffers with the audio format * Add support for 32-bit signed PCM offload (zero copy) Change-Id: Id758830784740c0a038452d383c8ec8e3e4593bb
* | nuplayer: Avoid crash when codec fails to loadSteve Kondik2015-12-151-3/+0
| | | | | | | | | | | | * Remove unnecessary check condition. Change-Id: I3267a0c13165d74a2ea90333b42f000b51ace98b
* | 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-142-10/+13
| | | | | | | | | | | | | | * 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
* | NuPlayer: Don't maintain timeStamp if state is runningSharad Sangle2015-12-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | While offload playback is going on, if user seeks to new position and after playback for some time, pauses till offload tear-down happens then playback resumes with old seek position The book-keeping of seektime for start of playback mStartupSeekTimeUs is also done in running state, it should be done only if current state is paused. Change-Id: I4173a2ee4244bcc6794822dde24c467f0189b84f
* | NuPlayerDriver: Maintain the timeStamp after seekSharad Sangle2015-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While offload playback is going on, if user pause and seeks to new position before offload tear-down, on resume playback starts from old time-stamp Once tear-down happens NuPlayer loses updated time-stamp so while resuming it resumes playback with stale time-stamp. Make sure the updated time-stamp is maintained in NuPlayerDriver wich is used while starting the playback after resume. Change-Id: I3451051f569264b21a43be81b01798fabed0182e
* | stagefright: Additional fixes for extended offload supportSteve Kondik2015-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Fix compilation with debug enabled * Allow FLAC offload to be enabled independent of QCOM_HARDWARE, tested with the Nexus 5X and is working! * Disable the FLACExtractor if offload is enabled since it can only output decoded PCM. This will force FFMPEG to be used, which does everything we need for FLAC offload Change-Id: I7d71c153a6a6ea7df8e32bc73f5cbe9f51cdcf64
* | stagefright: Check vendor list for allowed encodersSteve Kondik2015-12-131-1/+2
| | | | | | | | Change-Id: Ie9ff0d275fc5f853c18fe4d5e590443d0c316e99
* | stagefright: Finish support for HEVC muxingSteve Kondik2015-12-131-5/+12
| | | | | | | | | | | | * Forward-port CAF L-MR1 code to fill in stubs. Change-Id: I6c07e803ad4fe3ef5286f61667b5ca11380db984
* | stagefright: Resurrect PCM offloadSteve Kondik2015-12-137-108/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | stagefright: Fix a few format strings on 64-bitSteve Kondik2015-12-131-1/+1
| | | | | | | | Change-Id: I25708df616fe53d709b80c65ddecbdddef303124
* | StagefrightRecorder: Add support for WAVE recordingMichael Bestas2015-12-122-0/+20
| | | | | | | | | | | | * Forward port the cm-12.1 code Change-Id: I77373a236108507b8fa76cc8d3016de36aade301
* | Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-076-12/+31
|\ \ | |/ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * GenericSource: reset mDecryptHandle when mDataSource is cleared.Wei Jia2015-10-221-0/+1
| | | | | | | | | | Bug: 25070434 Change-Id: Ib0eb6a419683a0e686a4f63b82e9300cb1f69484
| * GenericSource: reset mDrmManagerClient when mDataSource is cleared.Wei Jia2015-10-191-0/+1
| | | | | | | | | | Bug: 25070434 Change-Id: Iade3472c496ac42456e42db35e402f7b66416f5b
| * NuPlayerDecoder: report error in case of audio sink open error.Eric Laurent2015-10-141-1/+4
| | | | | | | | | | | | Bug: 21093153. Change-Id: I77e03a620b43967991dcee9d6ca01f67c8b7a02e (cherry picked from commit 15ce09dddf830d6a6ca097c5ec0a7ec7c35b6b3a)
| * NuPlayerRenderer: do not send rendering started message when pausedAndy Hung2015-10-132-1/+11
| | | | | | | | | | | | | | Delay until resume. Bug: 23669269 Change-Id: I0a805812d80b1aad561425442bca0fc05a05752f
| * Merge "Don't send OnCompletion events when looping" into mnc-dr-devMarco Nelissen2015-10-131-1/+2
| |\
| | * Don't send OnCompletion events when loopingMarco Nelissen2015-10-131-1/+2
| | | | | | | | | | | | | | | | | | | | | AwesomePlayer never did, and neither should NuPlayer. Bug: 18656047 Change-Id: Ia9abe42cfe6ea643633cec859e9da770092569bb
| * | NuPlayer: reset mAudioEOS and mVideoEOS when renderer is flushed.Wei Jia2015-10-131-0/+6
| | | | | | | | | | | | | | | | | | Bug: 24749881 Change-Id: I0d3a757262446ac702dfebd464d5e59f1a98eba8 (cherry picked from commit 3261f0db54e31e652af9bd3b76a8e85174f5ee87)
| * | Merge "NuPlayerDriver: acquire mLock when needed." into mnc-dr-devWei Jia2015-10-131-1/+1
| |\ \
| | * | NuPlayerDriver: acquire mLock when needed.Wei Jia2015-10-131-1/+1
| | |/ | | | | | | | | | | | | | | | Bug: 24338126 Change-Id: Ic55d1a551c18255423423079b6c2bf045dea6e44 (cherry picked from commit f3631d2921ee0738f87427848e38873370ef9ec0)
| * | NuPlayerRenderer: always update MediaClock with max media duration.Wei Jia2015-10-131-9/+7
| |/ | | | | | | | | | | Bug: 24345295 Change-Id: I868c9c44ea22de98a083432262e485d0f134203f (cherry picked from commit d005c5ddb4842369979df7b76f1d0f5f1380fcd9)
* | Protect data source access with mutex during disconnectRobert Shih2015-12-072-8/+15
| | | | | | | | | | Bug: 23658148 Change-Id: Ic37cac7b5d166143e0b77e9919b0aaef486e4fdd