summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h
Commit message (Collapse)AuthorAgeFilesLines
* mediaplayer: support dynamic playback rateWei Jia2015-02-241-0/+6
| | | | | | Bug: 19196501 Change-Id: I856b1507d5fa2cedfb645706d2435683a7d3e050
* resolved conflicts for merge of 157defdd to masterLajos Molnar2015-02-101-0/+10
|\ | | | | | | Change-Id: I14fd8063fa052f16868b8053a211190092131317
| * nuplayer: acquire wakelock during offload pause timeoutWeiyin Jiang2015-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-33/+16
|/ | | | | | | | | 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-1/+1
| | | | | | | | | | when paused. This allows video to display immediately during seeking in paused state. Also fix some racing condition. Bug: 19153026 Change-Id: I0d7a8981ca3c121f5dbc430c2c6d8b7522edc24a
* Merge "NuPlayer: Do not recreate AudioTrack if not needed" into lmp-mr1-devAndy Hung2014-12-231-0/+10
|\
| * NuPlayer: Do not recreate AudioTrack if not neededAndy Hung2014-12-191-0/+10
| | | | | | | | | | | | | | | | | | 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
* | NuPlayer: reports paused position in paused state.Wei Jia2014-12-191-2/+9
|/ | | | | Bug: 18733773 Change-Id: I993a4bf108913ab98a0294d7dcf7605349f7029b
* Fix NuPlayer assertion on failure to create AudioTrackAndy Hung2014-12-031-3/+4
| | | | | | | | | | 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
* tunnel NuPlayer source and decoder inputChong Zhang2014-11-201-1/+3
| | | | | | Bug: 18342383 Change-Id: Ieff1cd3bad2b39d46f127ddd5d5139b919992461
* NuPlayer: open audio sink in offload mode when resuming from timeout teardown.Ronghua Wu2014-11-181-0/+3
| | | | | | | Also always recheck if a new stream can do offload. Bug: 18154425 Change-Id: I121877834bd963eeeba91a2b951fd30d5dc36a8b
* mediaplayer: don't report position past last queued positionLajos Molnar2014-10-211-2/+7
| | | | | | | also reanchor offloaded audio track correctly Bug: 17653702 Change-Id: If05394d3b119be8d80b7764847496246d34a2133
* mediaplayer: limit scheduling video frames into the futureLajos Molnar2014-10-201-0/+5
| | | | | | | | | | | | 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-3/+4
| | | | | | | | | 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-0/+16
| | | | | Bug: 17675112 Change-Id: I7eb3d02380658f848baedafe2aea287586ccf016
* NuPlayer: query current position from NuPlayerRenderer.Ronghua Wu2014-10-131-7/+26
| | | | | Bug: 17653702 Change-Id: Ie0b1f92420b071a0cfcd389f5e7917a54d332541
* NuPlayerRenderer: adjust anchor time correctly for video only case.Wei Jia2014-10-091-0/+1
| | | | | Bug: 17922171 Change-Id: I4c7e9e7f5ab96d3675d012ae30f78ef945394103
* NuPlayer: don't restart AudioSink when torn down due to pause timeout.Ronghua Wu2014-10-031-1/+6
| | | | | Bug: 17752358 Change-Id: I232d105480139bfc0b991bcd8e001930e577cf30
* Merge "NuPlayer: add pause timeout event for offload audio." into lmp-devRonghua Wu2014-09-231-0/+7
|\
| * NuPlayer: add pause timeout event for offload audio.Ronghua Wu2014-09-221-0/+7
| | | | | | | | | | Bug: 17375249 Change-Id: Ie59c6b372e9ad2aace3d1e27b9896d79de35d722
* | mediaplayer: smooth out videoplayback based on framerateLajos Molnar2014-09-191-0/+4
| | | | | | | | | | Bug: 14659809 Change-Id: I73f6c7224c51ac06487475f9ed395379111ad71f
* | mediaplayer: schedule video frames in VSYNC valleysLajos Molnar2014-09-191-0/+2
|/ | | | | Bug: 14659809 Change-Id: Ic340ac61ad4778b493625c79c2cb4f747ff54ede
* NuPlayer: update timestamp handlingAndy Hung2014-09-171-1/+1
| | | | | | | | | | | | Use getTimestamp WOULD_BLOCK error return code to clean up initial playback/start timestamp handling. Account for pause time and seeks. Only send notification from driver when the media time changes. Bug: 14659809 Bug: 17428188 Change-Id: I051bb5e2dd4fd5990474f8fb635615ad8d18eb2c
* NuPlayer: use getTimestamp instead of getPositionLajos Molnar2014-09-171-1/+2
| | | | | Bug: 14659809 Bug: 16985287 Change-Id: I59ec72fbd40a9b8d28fe548ddad082c03000c045
* render one video frame after flush even when we're pausedChong Zhang2014-09-031-0/+1
| | | | | | | | allows the video to get some update when user seeks while paused. Bug: 17140448 Change-Id: I064806bfd566585eeb4150a508422c9775e08f99
* AudioPlayback: delay the post of EOS based on pending playout.Ronghua Wu2014-08-271-1/+2
| | | | | Bug: 16840522 Change-Id: Icdc8888f5a8a77e2e5ebeb8a6934c7d79bd9e71a
* Fall back to s/w decoding when audio offloading fails.Wei Jia2014-07-221-0/+3
| | | | Change-Id: Icde3d65c964b2a13fb1c6636adcce52ae048a3fb
* Add support of audio offloading for NuPlayer.Wei Jia2014-07-091-10/+27
| | | | Change-Id: Ic83973339fb46a83b48382e6097925f45d200867
* Revert "NuPlayer: Use a software renderer when using software codecs"Lajos Molnar2014-03-101-4/+0
| | | | | | | Remove software renderer support from NuPlayer because it is included in MediaCodec. Change-Id: I06e001df76df2e18ea8169620ff33aeec57e5ca2
* Merge "NuPlayer: Use a software renderer when using software codecs"Marco Nelissen2013-11-281-0/+4
|\
| * NuPlayer: Use a software renderer when using software codecsMartin Storsjo2013-09-251-0/+4
| | | | | | | | | | | | | | | | | | | | This mimics what is done in AwesomePlayer and MediaCodec - ideally this logic perhaps should be moved into ACodec to avoid having to replicate it in every caller. This makes HLS and RTSP playback work in the emulator. Change-Id: I18027dc3e469889baaae3e1c4afb559de7d0f7d3
| * Squashed commit of the following:Andreas Huber2013-03-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f4edf442741886cdbe071e2d15f6e6247269f7c5 Author: Andreas Huber <andih@google.com> Date: Tue Mar 12 09:09:18 2013 -0700 Pass additional flags to the sink, use TCP by default in wolfiecast mode. Change-Id: I41e11a2375d4199656e45c4f149d8441d0016092 commit 6302602ed280a38287f507159abfb40a1da38c5a Author: Andreas Huber <andih@google.com> Date: Tue Mar 12 08:51:58 2013 -0700 tweaks Change-Id: Ie29e422d7258be522f4bb1f6c5afcf74c937e547 commit a38a860e4979ba563cadbaafa21b084439449d26 Author: Andreas Huber <andih@google.com> Date: Mon Mar 11 16:57:43 2013 -0700 Report average lateness all the way from NuPlayerRenderer... Change-Id: I2e7700703ae656515e44b9c25610d26c75778111 commit a7d49b11675ea88be4029dd8451d1649db94571d Author: Andreas Huber <andih@google.com> Date: Mon Mar 11 14:54:19 2013 -0700 Make TimeSyncer smarter, enable TunnelRenderer Change-Id: I27377a60cd8feb01589da456967fddd34532c20e commit 0f214c8ef68179f7b61512c37040939554013151 Author: Andreas Huber <andih@google.com> Date: Thu Mar 7 15:57:56 2013 -0800 convert source timestamps to sink timestamps, report lateness. Change-Id: I051a60fbbceca2f7b508ae3dac6e01e402bae39e commit 04a4f8e16bad09157b5615a5fa45310438955832 Author: Andreas Huber <andih@google.com> Date: Thu Mar 7 09:00:28 2013 -0800 Sync time between sink and source. Change-Id: Ie8b4d75c957aa48310e7c81d1279761b9f821efe commit aebe20e6184e3636a99082f8ece08e708015cb8d Author: Andreas Huber <andih@google.com> Date: Wed Mar 6 09:03:12 2013 -0800 play with back pressure Change-Id: I51eb69257e6a79e76f5f9c75ff99d8adbd083947 Change-Id: Ifdf57228667fed7fc71c5090a2c3f7cea1037c5c
* | Add MEDIA_STARTED/PAUSED/STOPPED events to media playersLajos Molnar2013-08-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Squashed commit of the following:Andreas Huber2013-03-121-1/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f4edf442741886cdbe071e2d15f6e6247269f7c5 Author: Andreas Huber <andih@google.com> Date: Tue Mar 12 09:09:18 2013 -0700 Pass additional flags to the sink, use TCP by default in wolfiecast mode. Change-Id: I41e11a2375d4199656e45c4f149d8441d0016092 commit 6302602ed280a38287f507159abfb40a1da38c5a Author: Andreas Huber <andih@google.com> Date: Tue Mar 12 08:51:58 2013 -0700 tweaks Change-Id: Ie29e422d7258be522f4bb1f6c5afcf74c937e547 commit a38a860e4979ba563cadbaafa21b084439449d26 Author: Andreas Huber <andih@google.com> Date: Mon Mar 11 16:57:43 2013 -0700 Report average lateness all the way from NuPlayerRenderer... Change-Id: I2e7700703ae656515e44b9c25610d26c75778111 commit a7d49b11675ea88be4029dd8451d1649db94571d Author: Andreas Huber <andih@google.com> Date: Mon Mar 11 14:54:19 2013 -0700 Make TimeSyncer smarter, enable TunnelRenderer Change-Id: I27377a60cd8feb01589da456967fddd34532c20e commit 0f214c8ef68179f7b61512c37040939554013151 Author: Andreas Huber <andih@google.com> Date: Thu Mar 7 15:57:56 2013 -0800 convert source timestamps to sink timestamps, report lateness. Change-Id: I051a60fbbceca2f7b508ae3dac6e01e402bae39e commit 04a4f8e16bad09157b5615a5fa45310438955832 Author: Andreas Huber <andih@google.com> Date: Thu Mar 7 09:00:28 2013 -0800 Sync time between sink and source. Change-Id: Ie8b4d75c957aa48310e7c81d1279761b9f821efe commit aebe20e6184e3636a99082f8ece08e708015cb8d Author: Andreas Huber <andih@google.com> Date: Wed Mar 6 09:03:12 2013 -0800 play with back pressure Change-Id: I51eb69257e6a79e76f5f9c75ff99d8adbd083947 Change-Id: Ifdf57228667fed7fc71c5090a2c3f7cea1037c5c
* Added a callback in nuplayer via informational event to signal the start of ↵James Dong2012-07-201-3/+6
| | | | | | video rendering Change-Id: Id7b9b82d4e5467ad8701bfbad4dcc5070f3703cf
* In order to recover from video lagging behind audio, drop avc framesAndreas Huber2011-09-161-0/+2
| | | | | | that are not referenced by other frames before feeding them into the decoder. Change-Id: I822190af8f8329567bff8da1ea23136d0a765481
* Various improvements to nuplayer playbackAndreas Huber2011-09-161-13/+13
| | | | | | | | | | | | | | | | | | | | - Drastically cut down the number of times we supply the AudioSink with data by estimating the time until the sink would run out of data and then scheduling a refill in advance of that. - Use a dedicated looper for video decoders since they are currently taking too long to return from OMX_FillThisBuffer (bug 5325201) - Revise thread priorities for the OMX dispatcher and software codecs, instead of running them at ANDROID_PRIORITY_AUDIO, they now only run at ANDROID_PRIORITY_FOREGROUND - Since threads created by pthread_create inherit all of the parent threads attributes including thread priority, briefly reset thread priority to ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then restore it. Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
* Don't post position updates too frequentlyAndreas Huber2011-09-131-0/+4
| | | | | | | i.e. don't hog my message queue. related-to-bug: 5284760 Change-Id: I8e2d36a11dbee1567b18ed13dc5257a65c6eeda7
* Error handling in ACodec and Nuplayer.Andreas Huber2011-08-161-1/+1
| | | | | | | Codec errors (and codec not found errors) now trigger a controlled shutdown of playback and signal errors to the MediaPlayer client. Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
* Implement missing pause/resume support for NuPlayer.Andreas Huber2011-01-201-0/+9
| | | | | Change-Id: Ia3f1ce521dd4b70e134ef03aa7c9db8e8d39a134 related-to-bug: 2368598
* Seek/Duration support for completed http live streams in NuPlayer.Andreas Huber2011-01-051-0/+2
| | | | | Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463 related-to-bug: 3321475
* Squashed commit of the following:Andreas Huber2010-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit eaeaa2672d4e0a82891493b2bde8bdd0c0e79a1b Author: Andreas Huber <andih@google.com> Date: Thu Dec 23 10:26:48 2010 -0800 Remove lowest bandwidth stream if using the legacy player. Change-Id: I2f885e26344996de9152f8fda9fd6bdef89bf953 commit 7d652972615b2750fd8f1c21b9fab0e136df2b82 Author: Andreas Huber <andih@google.com> Date: Thu Dec 23 10:14:36 2010 -0800 Don't clear the packet source's format for legacy discontinuities. Change-Id: I9bd5a21b9bd28043ad38bd0658ccc8eda3c1079a commit 2b18a45aac17cbfe1aa089d0f6510957d438dd64 Author: Andreas Huber <andih@google.com> Date: Thu Dec 23 10:13:55 2010 -0800 Use NuPlayer for HTTP live streaming based on runtime property. adb shell setprop media.httplive.enable-nuplayer true Change-Id: I22738df3403985dc8e6992b1ab5da5747309f773 commit 50d899fb7b9ea52c3994b0a58e993998d926aeed Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 16:25:22 2010 -0800 Make ACodec a lot less verbose. Change-Id: I94c7e499b61032321ffaf999f5ad2c913cde6a48 commit b19e1740cb4d02990a56844654b5d019987c6405 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 16:22:22 2010 -0800 Wait until we have fresh codec-specific-data before instantiating the decoders after a discontinuity involving a format change. Change-Id: I7bcf9b5ae3319f08bf8978a117e8ee5220902e37 commit 06428c006906c9099e430aface3b439ff1d36ecc Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 15:20:38 2010 -0800 Disable random seeks in the streaming tool for now. Change-Id: Ie86fde422dcfc4b2c7a01be51a193fda9c88cd71 commit e19db68f3bea8a61c191f60f6940f30e3a0d5f1b Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 15:20:27 2010 -0800 Tweak HTTP live parameters. Change-Id: If4b71e12485facc523a8a43d8213d0feb190daab commit 1e9942791538c2256b579d96c6c04264b0d8b087 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 14:48:23 2010 -0800 Enable http live streaming through NuPlayer for http URLs containing the string m3u8 Change-Id: I1691fe12ae8f1507fe3673313959cd50bc324624 commit 4c33f96a6e499ee0efe0e70b687094430cb7c1c0 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 14:40:27 2010 -0800 Support for HTTP live streaming in NuPlayer. Change-Id: Iacba1c3ebaeb8d3b972185deaf4cff18c8009c54 commit ddf705ce553708bc5b13d89a878484cf839bd674 Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 13:42:47 2010 -0800 StreamingSource now a subclass of abstract NuPlayer::Source Change-Id: Ia6c7c639628910b9d1f37decc55da48b07a70de3 commit 9e04a8406b1882a8e3fdeb7b4d52db5ae70b970a Author: Andreas Huber <andih@google.com> Date: Wed Dec 22 13:33:52 2010 -0800 Refactor media data sourcing to NuPlayer::Source. Change-Id: I1db9fb08c4e527bf7b19c29978cf342c2b0a0bc9 Change-Id: I9610a097481dda58f22142eacda3ac2dba0b63f9
* Squashed commit of the following:Andreas Huber2010-12-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 63be8ceb8b2354fb997a277c0092abae015ecf10 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:45:34 2010 -0800 Enable handling of discontinuities that involve potential format changes. Change-Id: I21848a113db8764abb54bdcf302b0923253eaf4d commit d18a7f80ec09af382026809263dcbbfa9e7a9ec8 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:45:01 2010 -0800 Signal whether or not a format change occured as part of the discontinuity. Change-Id: I06e64f542f4369549c9cebbb892dc612346ae43d commit c400adbd5fdbd65cfef7aed9ec65bcaace4bb69b Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:44:46 2010 -0800 A little more instrumentation of ACodec Change-Id: I07f4aeccbbd15cdd9f80f48c3f92ee984ef6d92b commit 1d802ee01f47b3cdc5b89502cec7fbb595e197a3 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:43:58 2010 -0800 Only sync audio/video queues if both types of media are actually present. Change-Id: Ic88edf9bb1ebd4034c08747cce9877a4e28e0d35 commit e402da39d9a4d8b75653a78f728e20a3ef0fb497 Author: Andreas Huber <andih@google.com> Date: Fri Dec 17 13:42:24 2010 -0800 Disable the random seek for now. Change-Id: Iddd597b546e2f229e88214f9bdd6452bb188105e Change-Id: I27c4d9ba916080be94ce6117dbb095e9022ed62b
* Initial support for a true streaming player for mpeg2 transport streams.Andreas Huber2010-12-151-0/+108
Change-Id: I153eec439d260a5524b21270e16d36940ec3161a