summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* mediaplayer: get/set PlaybackRate only when AudioSink has been opened.Wei Jia2015-05-121-3/+3
| | | | Change-Id: I676567fc029b9f82d039990e629374bd48168cec
* Merge "mediaplayer: flush audio sink when renderer is flushed." into mnc-devWei Jia2015-05-021-0/+10
|\
| * mediaplayer: flush audio sink when renderer is flushed.Wei Jia2015-05-011-0/+10
| | | | | | | | | | Bug: 17488729 Change-Id: Ie56018367cb6aec1749ca148e94173e6c5864b27
* | stagefright: support setting/getting playback/sync config in MediaSyncLajos Molnar2015-04-301-20/+177
|/ | | | | | | Bug: 18249558 Bug: 19666434 Bug: 20057497 Change-Id: I5868b17423d7c20cfaf4a399f3eb67bfba440605
* HLS: remove no more than 10% of bandwidth history at a timeChong Zhang2015-04-211-1/+2
| | | | | | | | | | | | | | | | | | - fix a 'possible video time jump' after seek, don't update renderer anchor time for 0-sized audio buffers - fix another 'possible video time jump' caused by some states not reset in mStreams - bandwidth estimator changes to not remove more than 10% of total transfer duration at a time to avoid jumping up too quickly bug: 20267388 related-to-bug: 19864613 related-to-bug: 20138395 Change-Id: I8812332cd1e26bf562acfaf086fd679a3549debc
* libmediaplayerservice: fix warnings, make warnings errors, use clangLajos Molnar2015-04-171-4/+4
| | | | Change-Id: I1b2f6b65c5abbc366068a60b8909104f31b94228
* NuPlayerRenderer: adjust delay of posting drain audio message based on ↵Wei Jia2015-04-101-0/+3
| | | | | | | playback rate. Bug: 19196501 Change-Id: I2a98e877ed946e899af0974a0c2397c4146ce349
* mediaplayer: check existence of AudioTrack before trying to access it.Wei Jia2015-03-191-1/+11
| | | | | Bug: 19828971 Change-Id: Ib7fdb8bf36e33ef95d21fa5342cd1647fd81ff24
* Merge "mediaplayer: update mAnchorNumFramesWritten when anchor time is updated."Wei Jia2015-03-111-0/+1
|\
| * mediaplayer: update mAnchorNumFramesWritten when anchor time is updated.Wei Jia2015-03-111-0/+1
| | | | | | | | | | | | | | This will fix the max duration for anchor time. Bug: 19196501 Change-Id: I9b8e0775105e31d47d919afaf49ca1e3d608a2f6
* | stagefright: don't use ALooperRoster mutex for reply handlingLajos Molnar2015-03-101-2/+2
|/ | | | | | | | Change replyID-s from uint32_t to an object Move reply handling into the loopers (to reuse a common mutex) Bug: 19607784 Change-Id: Iaa035b846c424c5687ed17ce1079b325e86c54be
* Merge "mediaplayer: move MediaClock from NuPlayer to libstagefright."Wei Jia2015-03-101-2/+1
|\
| * mediaplayer: move MediaClock from NuPlayer to libstagefright.Wei Jia2015-03-091-2/+1
| | | | | | | | | | Bug: 19666434 Change-Id: I86865e594226419bbbbee217098f96434e43afbe
* | media: switch to new AMessage handlingLajos Molnar2015-03-051-16/+16
|/ | | | | Bug: 19607784 Change-Id: I94cddcb81f671422ad4982a23dc4acfe57a9f1aa
* mediaplayer: use non-blocking mode for AudioSink::write().Wei Jia2015-03-031-16/+16
| | | | | | | This cherry picks https://googleplex-android-review.git.corp.google.com/#/c/643541/ to master. Bug: 19448263 Change-Id: I43dea830212de79c2b080185b6c6b36078f517d2
* mediaplayer: support dynamic playback rateWei Jia2015-02-241-23/+50
| | | | | | Bug: 19196501 Change-Id: I856b1507d5fa2cedfb645706d2435683a7d3e050
* resolved conflicts for merge of 157defdd to masterLajos Molnar2015-02-101-1/+6
|\ | | | | | | Change-Id: I14fd8063fa052f16868b8053a211190092131317
| * nuplayer: acquire wakelock during offload pause timeoutWeiyin Jiang2015-02-061-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Hold a wakelock while paused in audio offload mode, until audio teardown event is received, or pause is canceled. Since ARM cores are sleeping, the delayed AMessage will not be received, and the audio output driver will not be closed. This blocks XO shutdown. Bug: 19297092 Change-Id: I3d11fef633e3f2783f4aa31e71285e2fa09d234c
* | mediaplayer: Add MediaClock component and use it in NuPlayerRenderer.Wei Jia2015-02-031-262/+176
|/ | | | | | | | | Also fix some racing conditions, remove unused code in NuPlayerRenderer. This obsoletes https://googleplex-android-review.git.corp.google.com/#/c/609880/. Bug: 19196501 Change-Id: I0eebeb573ce7229dd8bacecd0e1c5d6f5634a72f
* NuPlayerRenderer: return current real time as render time for video frame ↵Wei Jia2015-01-271-14/+17
| | | | | | | | | | when paused. This allows video to display immediately during seeking in paused state. Also fix some racing condition. Bug: 19153026 Change-Id: I0d7a8981ca3c121f5dbc430c2c6d8b7522edc24a
* Merge "do not use paused postition if it's not available" into lmp-mr1-devChong Zhang2015-01-161-2/+8
|\
| * do not use paused postition if it's not availableChong Zhang2015-01-151-2/+8
| | | | | | | | | | | | bug: 18896133 bug: 18996505 Change-Id: I1e24fabe3fe8f2275b1ccc0df100cb2c4ba2264b
* | Merge "NuPlayer: Do not recreate AudioTrack if not needed" into lmp-mr1-devAndy Hung2014-12-231-0/+29
|\ \ | |/ |/|
| * NuPlayer: Do not recreate AudioTrack if not neededAndy Hung2014-12-191-0/+29
| | | | | | | | | | | | | | | | | | On output format change from the decoder, check if a new audio track is really needed. This prevents excessive track creation/destruction during seeks. Bug: 18817027 Change-Id: I4290dcb90cb35bc1303b025e162f6b813d49a05b
* | Merge "NuPlayer: reports paused position in paused state." into lmp-mr1-devWei Jia2014-12-191-4/+48
|\ \
| * | NuPlayer: reports paused position in paused state.Wei Jia2014-12-191-4/+48
| |/ | | | | | | | | Bug: 18733773 Change-Id: I993a4bf108913ab98a0294d7dcf7605349f7029b
* | NuPlayer: Fix failure to stop audio playbackAndy Hung2014-12-181-4/+7
|/ | | | | | | | | Don't stop audio sink if gapless - it's not necessary and has a side effect of resetting the AudioTrack frames written without resetting the AudioSink frames written. Bug: 18787619 Change-Id: I71063b9e3aad9a6dfd7d46ea614e107c815e4c57
* NuPlayerRenderer: Update mAnchorMaxMediaUs when anchor time is changed to ↵Wei Jia2014-12-051-0/+1
| | | | | | | | | | | | | fix pause-seek-getCurrentPosition. NuPlayerDecoder: Notify resume is done when EOS is reached. GenericSource: add code to signal pre-roll for seek so that it will seek to the requested position, not only I-frame. This code is disabled temporarily till we have a full solution to handle both single seek and continous seek gracefully. Bug: 18625723 Change-Id: I99a54d4d549e0d805e3abcc227fbf96c16405af0
* Fix NuPlayer assertion on failure to create AudioTrackAndy Hung2014-12-031-16/+27
| | | | | | | | | | Under heavy media load or monkey/stress testing, more than 32 AudioTracks may be created or memory resources may be scarce. Remove the assertion on failure to create AudioTrack and signal MEDIA_ERROR. Bug: 17319843 Change-Id: I5d4e200b5f50d800046851a33e035cdc6ff10075
* Merge "tunnel NuPlayer source and decoder input" into lmp-mr1-devChong Zhang2014-11-211-3/+14
|\
| * tunnel NuPlayer source and decoder inputChong Zhang2014-11-201-3/+14
| | | | | | | | | | | | Bug: 18342383 Change-Id: Ieff1cd3bad2b39d46f127ddd5d5139b919992461
* | Merge "NuPlayer: invalid anchor time when render is flushed." into lmp-mr1-devRonghua Wu2014-11-201-0/+1
|\ \ | |/ |/|
| * NuPlayer: invalid anchor time when render is flushed.Ronghua Wu2014-11-191-0/+1
| | | | | | | | | | | | | | Also rememeber the pause time in NuPlayerDriver. Bug: 18436336 Change-Id: If09f680a0d0f9137bd55c5f94201eb3aa783278a
* | NuPlayer: open audio sink in offload mode when resuming from timeout teardown.Ronghua Wu2014-11-181-0/+19
|/ | | | | | | Also always recheck if a new stream can do offload. Bug: 18154425 Change-Id: I121877834bd963eeeba91a2b951fd30d5dc36a8b
* Merge "Revert "mediaplayer: make frame-accurate avsync configurable"" into ↵Lajos Molnar2014-11-131-20/+0
|\ | | | | | | lmp-mr1-dev
| * Revert "mediaplayer: make frame-accurate avsync configurable"Lajos Molnar2014-11-071-20/+0
| | | | | | | | | | | | | | | | | | Reenable PTS scheduling for all playback. This reverts commit 274084f7bfd3f6bdf5a55cf16ceefed345aa0060. Bug: 18111837 Change-Id: Ia734ad304c1f85d2ac302261866be82b8f2a30d4
* | Merge "Fix short sound playback" into lmp-mr1-devMarco Nelissen2014-11-101-0/+4
|\ \ | |/ |/|
| * Fix short sound playbackMarco Nelissen2014-11-051-0/+4
| | | | | | | | | | | | | | | | AudioTrack needs to be stopped, not paused, at the end of the file, since otherwise the last bit of queued up audio will not be played. Bug: 18188921 Change-Id: I038aad74a105e163963929c7002b55f377de1442
* | Merge "NuPlayer: reduce offload pause teardown timeout." into lmp-mr1-devEric Laurent2014-10-291-1/+1
|\ \
| * | NuPlayer: reduce offload pause teardown timeout.Eric Laurent2014-10-291-1/+1
| |/ | | | | | | | | | | | | | | | | | | Waiting 60 seconds to teardown an offloaded path when paused is not needed and causes unecessary battery drain. 10 seconds is enough to avaoid teardown when it would be problematic (seek, pause for notifications, buffering...). Bug: 13505340. Change-Id: Ibcaa609b59e86ba2bc49539620bd77504d534c0c
* | fix deep buffer logic in NuPlayer.Eric Laurent2014-10-281-6/+7
|/ | | | | | | | | | | Deep buffer output should be requested when there is no video track, not when there is one. Also make sure that the deep buffer flag is restored after a failure to offload audio decoding. Bug: 18114624. Change-Id: If3c04c784bc20d77926993ee475fbf961aeba7ae
* mediaplayer: don't report position past last queued positionLajos Molnar2014-10-211-6/+39
| | | | | | | also reanchor offloaded audio track correctly Bug: 17653702 Change-Id: If05394d3b119be8d80b7764847496246d34a2133
* mediaplayer: limit scheduling video frames into the futureLajos Molnar2014-10-201-1/+38
| | | | | | | | | | | | This addresses when video timestamps jumps before an audio timestamp, but still works on slideshow video clips (<=1fps). This, however, will not skip time-changes on video-only live video streams, as we cannot distinguish live slideshow video clips from non-slideshow ones. Bug: 18032127 Change-Id: I959a714edfe1c8cf3b84704c693dcd1b3e5b7855
* NuPlayer: set anchor time for each audio buffer.Ronghua Wu2014-10-201-33/+44
| | | | | | | | | And use anchor time to compute current position Bug: 17999949 Bug: 18008307 Bug: 18032127 Change-Id: Ie493c9a1d45d7b788aef65d863f710da6326fcc1
* move audio sink open/close to NuPlayerRendererChong Zhang2014-10-161-1/+198
| | | | | Bug: 17675112 Change-Id: I7eb3d02380658f848baedafe2aea287586ccf016
* NuPlayer: query current position from NuPlayerRenderer.Ronghua Wu2014-10-131-108/+124
| | | | | Bug: 17653702 Change-Id: Ie0b1f92420b071a0cfcd389f5e7917a54d332541
* NuPlayerRenderer: adjust anchor time correctly for video only case.Wei Jia2014-10-091-1/+18
| | | | | Bug: 17922171 Change-Id: I4c7e9e7f5ab96d3675d012ae30f78ef945394103
* Merge "NuPlayer: don't restart AudioSink when torn down due to pause ↵Ronghua Wu2014-10-031-3/+5
|\ | | | | | | timeout." into lmp-dev
| * NuPlayer: don't restart AudioSink when torn down due to pause timeout.Ronghua Wu2014-10-031-3/+5
| | | | | | | | | | Bug: 17752358 Change-Id: I232d105480139bfc0b991bcd8e001930e577cf30
* | Merge "NuPlayer: Fix flush mode decoder error handling" into lmp-devAndy Hung2014-10-021-2/+2
|\ \ | |/ |/|