summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix compile error in NuPlayerRenderer debug printOscar Rydhé2014-01-031-1/+3
| | | | | | | | When activating verbose log prints in NuPlayerRenderer the build fails because a variable have changed but the log print hasn't been updated. Change-Id: I3089b087d296c37dfe6379d7e75d5892912fef96
* Merge "NuPlayer: Use a software renderer when using software codecs"Marco Nelissen2013-11-281-0/+12
|\
| * NuPlayer: Use a software renderer when using software codecsMartin Storsjo2013-09-251-0/+12
| | | | | | | | | | | | | | | | | | | | 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-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * RTSP buffering improvementsRoger Jönsson2013-02-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Added buffering start and end notifications for RTSP. MEDIA_INFO_BUFFERING_START is sent when buffering is started and MEDIA_INFO_BUFFERING_END is sent when the buffer has filled up. This patch also adds RTSP end of stream handling. EOS is signalled when BYE is received OR when detecting end of stream even if no actual EOS is received. Change-Id: I5cccb6845060ae6afd66d9f735b89da81476cd13
* | Add MEDIA_STARTED/PAUSED/STOPPED events to media playersLajos Molnar2013-08-151-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | New HLS implementation supporting independent stream sources, audio-only streamsAndreas Huber2013-05-311-3/+3
| | | | | | | | | | | | and more. Change-Id: Icfc45a0100243b2f7a14a9e65696be45b67d6495
* | Squashed commit of the following:Andreas Huber2013-03-121-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | RTSP buffering improvementsRoger Jönsson2013-02-061-0/+6
|/ | | | | | | | | | | | | Added buffering start and end notifications for RTSP. MEDIA_INFO_BUFFERING_START is sent when buffering is started and MEDIA_INFO_BUFFERING_END is sent when the buffer has filled up. This patch also adds RTSP end of stream handling. EOS is signalled when BYE is received OR when detecting end of stream even if no actual EOS is received. Change-Id: I5cccb6845060ae6afd66d9f735b89da81476cd13
* Added a callback in nuplayer via informational event to signal the start of ↵James Dong2012-07-201-0/+12
| | | | | | video rendering Change-Id: Id7b9b82d4e5467ad8701bfbad4dcc5070f3703cf
* Add gapless playback support for NuPlayerMarco Nelissen2012-04-021-0/+4
| | | | | | | | | This makes NuPlayer use a SkipCutBuffer when needed, and adds a new AudioSink method to retrieve the number of frames written so far, so NuPlayerRenderer can calculate how much data it can write without blocking. Also make some more methods const. Change-Id: Id7d253ad8a7b85e9a84ca2baafbe32817b16c744
* Use NuPlayer for media playback everywhereAndreas Huber2012-03-221-1/+2
| | | | | | if media.stagefright.use-nuplayer is set to true. Change-Id: Ibb217e7d7d5195b7feeea557554fe78e1585744c
* Add new APIs AMessage::(set|find)Buffer to make it safer to passAndreas Huber2012-02-221-4/+3
| | | | | | ABuffer objects through messages. Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-2/+2
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Fix build error when verbose logging is enabledGlenn Kasten2011-12-151-1/+1
| | | | Change-Id: I30f4e5d35d1b24dce2e6152a13fd0fb61414a3e2
* resolved conflicts for merge of 3d630e86 to masterAndreas Huber2011-11-301-1/+6
|\ | | | | | | Change-Id: I9eb7b7c1668b5f0de85ec8b1e9257cf1ec4d8b9e
| * Make sure we can properly shutdown even ifAndreas Huber2011-11-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a) one of the two decoders has a pending discontinuity b) the renderer holds on to all output buffers for that decoder c) the renderer is paused if all three conditions are met the decoder won't ask for more input data and therefore never see the discontinuity. To avoid this we briefly resume the renderer just before shutting down. Change-Id: I9e08af2a1eb4298d1cd00497d6aa33f4ad184e9a related-to-bug: 5655016
| * am 19998120: Merge "Bug 5478024 drop after decode if can\'t drop before" ↵Glenn Kasten2011-11-091-1/+1
| |\ | | | | | | | | | | | | | | | | | | into ics-mr0 * commit '19998120f53caceb620f138c6eea182f1e693660': Bug 5478024 drop after decode if can't drop before
* | \ am bb1b7d5c: am 19998120: Merge "Bug 5478024 drop after decode if can\'t ↵Glenn Kasten2011-11-091-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | drop before" into ics-mr0 * commit 'bb1b7d5cb3c5502484269bfd0cdcd0d5a6d6bfad': Bug 5478024 drop after decode if can't drop before
| * \ \ am 19998120: Merge "Bug 5478024 drop after decode if can\'t drop before" ↵Glenn Kasten2011-11-091-1/+1
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | into ics-mr0 * commit '19998120f53caceb620f138c6eea182f1e693660': Bug 5478024 drop after decode if can't drop before
| | * Bug 5478024 drop after decode if can't drop beforeGlenn Kasten2011-11-041-1/+1
| | | | | | | | | | | | Change-Id: Iaa64553be1a710da5d42be4e3a1e1d6dc873e371
* | | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-5/+5
|/ / | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* | NuPlayer is now taking on the task of streaming over RTSP.Andreas Huber2011-10-131-1/+3
|/ | | | Change-Id: Ie204db8810807f1e7981959e34dc0149e5d9563a
* In order to recover from video lagging behind audio, drop avc framesAndreas Huber2011-09-161-6/+12
| | | | | | that are not referenced by other frames before feeding them into the decoder. Change-Id: I822190af8f8329567bff8da1ea23136d0a765481
* Various improvements to nuplayer playbackAndreas Huber2011-09-161-26/+53
| | | | | | | | | | | | | | | | | | | | - 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-3/+13
| | | | | | | i.e. don't hog my message queue. related-to-bug: 5284760 Change-Id: I8e2d36a11dbee1567b18ed13dc5257a65c6eeda7
* Signal errors to the client instead of asserting in ACodec.Andreas Huber2011-08-261-17/+28
| | | | | | Also make sure NuPlayer can properly shutdown in certain edge cases. Change-Id: Iceb16d600d87ba66c802e60e95bf62f66487a453
* Error handling in ACodec and Nuplayer.Andreas Huber2011-08-161-16/+17
| | | | | | | Codec errors (and codec not found errors) now trigger a controlled shutdown of playback and signal errors to the MediaPlayer client. Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
* Fix issue 3483718: audio streaming and A2DP.Eric Laurent2011-03-211-9/+12
| | | | | | | | | | | | | | | | | | | | The problem is that when switching from A2DP to device speakers or headset, The AudioTrack binder interface to AudioFlinger must be destroyed and restored to accomodate new buffer size requirements. Current AudioTrack implementation did not restore properly the PCM buffer write index which caused a mismatch between the written frame count in the mediaplayer renderer and the AudioTrack. The renderer could then believe the AudioTrack buffer was full and stop writing data preventing the AudioTrack to reach a bufffer full condition and resume playback. The rendered was also modified to refresh the AudioTrack frame count (buffer size) inside the write loop in NuPlayer::Renderer::onDrainAudioQueue() as this count can change from one write to the next. Also modified AudioTrack::obtainBuffer() to check for track invalidated status before querying for available space in the buffer. This avoids writing to the old track's buffer until full before detecting the invalidated condition and create a new track. Change-Id: I16a857e464e466880847f52f640820aa271539ad
* Some tweaks to HTTP live / nuplayer behaviourAndreas Huber2011-01-211-3/+9
| | | | | | | | | | - play audio-only streams again - workaround for malformed streams that switch PIDs across bandwidths - attempt to pick a different bandwidth stream if the previously chosen one appears to be malformed/unsupported. Change-Id: I426d0a40dc725aa242f619d4c9d048b69aca55c9 related-to-bug: 2368598
* Implement missing pause/resume support for NuPlayer.Andreas Huber2011-01-201-3/+58
| | | | | Change-Id: Ia3f1ce521dd4b70e134ef03aa7c9db8e8d39a134 related-to-bug: 2368598
* Seek/Duration support for completed http live streams in NuPlayer.Andreas Huber2011-01-051-0/+18
| | | | | Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463 related-to-bug: 3321475
* Squashed commit of the following:Andreas Huber2010-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+496
Change-Id: I153eec439d260a5524b21270e16d36940ec3161a