summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/NuCachedSource2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* media: 64 bit compile issuesMark Salyzyn2014-04-151-1/+1
| | | | | | | | - change internal sized types to use stdint.h - printf & scanf formats - size_t or unsigned int for iterators Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
* warnings be gone.Andreas Huber2014-04-111-2/+2
| | | | | | | | (cherry picked from commit 84333e0475bc911adc16417f4ca327c975cf6c36) Modified by Mark Salyzyn <salyzyn@google.com> to keep merge conflicts or errors downstream to a minimum. Change-Id: Ic3b272f9cbf3155001aabd2f79728f1bc31de613
* Fix retries when server doesn't support range requests.Andreas Huber2012-08-281-2/+10
| | | | | Change-Id: I2d137f3e799b87af36a279473c0077d860c14477 related-to-bug: 7021436
* Add the ability to query the amount of cached data to NuMediaExtractor.Andreas Huber2012-04-191-2/+2
| | | | | Change-Id: I0966270a2bd36698330beaa03f47d02fc6a40c44 related-to-bug: 6364341
* Make sure seek triggers a reconnect if needed.Bryan Mawhinney2012-01-181-2/+3
| | | | | | | | Previously, if we had disconnected at the high watermark, the read immediately following a seek would fail, and would not be retried, resulting in an error. Change-Id: I45a53563fe17d6b54893815abc7750a7dfb0a124
* Separate sniffing from session initializationJames Dong2012-01-121-2/+2
| | | | | | | | | | | | This avoid lengthy/duplicate sniffing for drm plugins when a decrypt session is opened o The change is backward compatibile in that no update is required for existing drm plug-ins if they do not plan to provide separate sniffer/extractor related-to-bug: 5725548 Change-Id: I7fc4caf82d77472da4e2bc7b5d31060fb54fd84c
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-3/+3
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-7/+7
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-12/+12
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Don't hold onto the lock while reconnecting to the serverAndreas Huber2011-10-171-10/+18
| | | | | | to avoid stalling the readers. Change-Id: I73b646587c8a654a73ff7d800c0f17bd78001855
* YouTube can now request custom cache/prefetch parameters and ↵Andreas Huber2011-10-101-2/+56
| | | | | | | | | | | | | | | | disconnect-at-highwater through the use of pseudo http headers specified in the setDataSource call. x-cache-config: -1/-1/0 x-disconnect-at-highwatermark: 1 turns off keep-alives and disconnects every time the cache is full (will attempt to reconnect once it run below lowwater mark) related-to-bug: 5433309 Change-Id: Id2f942fc956e0e156834cfcd6bb08dae6a29fae1
* Specifying -1 for both low and highwater marks would not actually do the ↵Andreas Huber2011-10-071-5/+15
| | | | | | | | | right thing before this change. Also make it more consistent in that specifying -1 for the keepalive settings specifies the default. Change-Id: I086f530fbf42abce66d1c8e61157215cb474e044
* Allow a system property "media.stagefright.cache-params" to override ↵Andreas Huber2011-10-061-5/+52
| | | | | | | | | | | | | | | | | cache/prefetcher default parameters. To override specify a property adb shell setprop media.stagefright.cache-params "4096/20480/15" to set the low water threshold to 4096 KB, the high water threshold to 20 MB and the keepalive interval to 15 secs. if high and/or lowwater mark are negative, the default values are used for the respective value. if keep-alive interval is 0, keep-alives are disabled. Change-Id: I89a4a06836e4a2f473d7a92b567ab07818c2f87d
* Retry datasource fetches a few times before giving up (NuCachedSource2).Andreas Huber2011-07-221-7/+54
| | | | | Change-Id: I147fc18ef55bc89d2e2fee69b7869c45abbfdd6b related-to-bug: 3405354
* Do not call getEstimatedBandwidth if the streaming is not HTTP-basedJames Dong2011-06-021-5/+13
| | | | Change-Id: I4ab6c57e5b2b989676b8dfbb98402d10a5752261
* Send estimated bandwidth value as informational event when cache fetcher pausesJames Dong2011-05-311-0/+11
| | | | | | | | | | o Application can make informed decision about the available network bandwidth when cache fetcher pauses. o Application can also adjust how frequently the bandwidth is estimated within a range from one second to one minute. Change-Id: I90068001343e79da1886de03c565537787e1580b
* Fix potential memory corruption in NuCachedSource2.Andreas Huber2011-05-041-0/+5
| | | | | Change-Id: Ia6bd2d4966287228a3ac1b067ee1f1ccad965dbb related-to-bug: 4354845
* Make sure a read restarts the prefetcher if necessary.Andreas Huber2011-04-191-6/+18
| | | | | Change-Id: I87cac0e61e4dce7987ddf29c32f51e1672d1bbed related-to-bug: 4286618
* Stagefright DataSources now expose the underlying content mime type.Andreas Huber2011-03-301-0/+4
| | | | | | | | Use that mime type to determine if we should do upfront buffering at the start of playback and don't for audio streams to ensure playback starts fairly instantly. Change-Id: If21e36d1b024f0e5c723911bceadaa2e0307ab42 related-to-bug: 4090916
* am 6834f061: am 970d7dd9: am e2c32e9f: If nothing is to be copied, return ↵Andreas Huber2011-03-221-0/+4
|\ | | | | | | | | | | | | right away. * commit '6834f0617aea626dfc0f306c9fa3610f32cee1f7': If nothing is to be copied, return right away.
| * If nothing is to be copied, return right away.Andreas Huber2011-03-211-0/+4
| | | | | | | | | | | | | | This avoids a potential out-of-bounds problem in the code below. Change-Id: I942d55da0a5288b37512cb74407f900a2d824c0c related-to-bug: 4139974
* | Fix for bug 3477330Gloria Wang2011-03-101-2/+2
|/ | | | | | | This patch fixs a crash bug caused by using a NULL DecryptHandle pointer. Fix by using sp<DecryptHandle> instead. Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
* - Do not use global DrmManagerClientGloria Wang2011-02-071-2/+2
| | | | | | | - Release the DrmManagerClient and DecryptHandle in DataSource Fix for bug 3429811 Change-Id: I549f72b75225751877eb0e630ce8098f8ec6316f
* Prefill the cache before trying to instantiate the media extractor.Andreas Huber2011-01-191-0/+2
| | | | | | | | | The latter is an operation that otherwise could block on the datasource for a significant amount of time. During that time we'd be unable to abort the preparation phase without this prefill. Change-Id: Ia42496d88a11314386ea8797d665bf4e94871e30 related-to-bug: 3362836
* Don't report 100% buffered when the stream ends prematurely.Bryan Mawhinney2011-01-181-5/+4
| | | | Change-Id: Ia4e80d02f28104427a3309e3d5b155faa5702757
* Fixed thrashing in the cached buffer during 720p YT video streamingJames Dong2011-01-141-2/+2
| | | | | | bug - 3340194 Change-Id: Ic59bb18ab1731d7dd7cae7cc8aeb393900bce7f6
* Increase cache size and low-watermark threshold, alsoAndreas Huber2011-01-111-2/+2
| | | | | | | | | MediaPlayer now sends out MEDIA_INFO,MEDIA_INFO_VIDEO_TRACK_LAGGING messages to the JAVA client informing it how much (if at all) the video lags behind audio (arg2 is the media delay in ms). Change-Id: I6933f573d8597a35112e4b5ee0fcb826a7f6ddd1 related-to-bug: 3335220
* Squashed commit of the following:Andreas Huber2010-12-061-44/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 9254c845d7c82976fd4b8be406ce4b17eeb0e119 Author: Andreas Huber <andih@google.com> Date: Fri Dec 3 15:26:12 2010 -0800 Remove obsolete code from the cached data source. Change-Id: I794b986ac8977cbc834dff189221a636ba564e36 commit 2ee33711064c58c53ba65ed9e63dd4b01ec2380e Author: Andreas Huber <andih@google.com> Date: Fri Dec 3 15:23:13 2010 -0800 LiveSource is dead, long live LiveSession. Change-Id: Ibcd0731ecf9c94f0b3e5db3d53d012d9da2a1c66 commit 9eabb2c3cd8571ab859bdeae0aa7f655c414d8fa Author: Andreas Huber <andih@google.com> Date: Fri Dec 3 12:49:31 2010 -0800 Respect explicitly signalled discontinuities. Change-Id: I3c0c16a2de7a99742d25db7d1b2ff0258de52271 commit 7f7f7b6b906b6ece6e4d43af7fd5f494e805c5e5 Author: Andreas Huber <andih@google.com> Date: Fri Dec 3 11:45:57 2010 -0800 Better protection against syncword emulation in AAC ADTS content. Change-Id: I867e80a4556dd46d24ab3e781177c248a5221719 commit fe765766582efcc350aed01135ea603576adccf6 Author: Andreas Huber <andih@google.com> Date: Fri Dec 3 09:15:59 2010 -0800 New implementation of http live driving code. Change-Id: I31ddf3d6a0d5929b121be704a2b9c3d6775f7737 Change-Id: Id8d1829c8fcb173756965013f848c1d426ef1048
* Fix an artifact of going from off_t to off64_tAndreas Huber2010-11-191-1/+1
| | | | Change-Id: I999fb60a290f9b2db5b73bf926392c8f4e1b7829
* 64-bit file size/offset support for media frameworkJames Dong2010-11-181-9/+9
| | | | Change-Id: I3452bc2c0f1d990cc67285df2fce1f9f86ff8e10
* Add getUri() for streamingGloria Wang2010-11-181-0/+3
| | | | Change-Id: I56e15e67cc5f4d0f41c9e2985404a4d89d757e7e
* Make sure the prefetcher is actively fetching data if we pause playback due ↵Andreas Huber2010-11-111-3/+11
| | | | | | | | | | to cache underrun. Change-Id: Id5f4b7a0387137380dcd39995390a8e0d084b4b3 Conflicts: media/libstagefright/AwesomePlayer.cpp
* Add support for WV DRMGloria Wang2010-11-051-0/+8
| | | | Change-Id: I0408c5e0a488f112a84337b21b0cd4613a4da461
* HTTP Live content that are tagged as complete are now seekable.Andreas Huber2010-10-121-3/+45
| | | | | Change-Id: I9d0d2f009f883e5baf3e9de8c5c0aa05760e4bde related-to-bug: 2368598
* Remove stagefright foundation's incompatible logging interface and update ↵Andreas Huber2010-09-211-14/+14
| | | | | | callsites. Change-Id: I45fba7d60530ea0f233ac3695a97306b6dc1795c
* ALoopers can now be named (useful to distinguish threads).Andreas Huber2010-08-271-0/+1
| | | | Change-Id: Ieabaddb2e3a9e3a7a5bc36e55cd0721b60dbd50e
* Make the prefetcher read packets from the network after a keep-alive timeout ↵Andreas Huber2010-06-221-3/+15
| | | | | | expires regardless of whether its currently actively fetching data or not. Change-Id: I7d022ac494e1cecdd7f656806b7ed45979c02840
* Must hold lock here...Andreas Huber2010-06-111-0/+1
| | | | Change-Id: I179a5582c9246f78c988f85e2f969f32d547ac89
* Fix a typo in NuCachedSource2 that would trigger an assert near the end of a ↵Andreas Huber2010-06-111-1/+1
| | | | | | stream. Change-Id: I963ad7074b830d553b67c8925efd5369d0b7a5b9
* Initial check-in of new caching/prefetching data source implementation.Andreas Huber2010-06-101-0/+458
Change-Id: I97a6e3f03c69c9b1219f1f06bd109c0102f2c504