summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive
Commit message (Collapse)AuthorAgeFilesLines
* fix build break in clangChong Zhang2015-03-302-15/+26
| | | | Change-Id: Iff2ca5d1e800d30943de12191bfe6c43d6a2c7f6
* HLS: faster switching and pause/resume on low bufferChong Zhang2015-03-274-315/+752
| | | | | | | | | | | | | | | | | | | | | - when upswitching, discard excessive buffering on low bandwidth variant, switch to new variant earlier - when downswitching, report newly found IDR positions continuously, and switch as soon as new fetcher passes playback position. This allows us to skip time-consuming resumeUntil() of old fetcher most of the time - implement pause/resume on low buffering, and notify buffering percentage - buffering parameter tuning, separate pause/resume/ready buffer level and up/down switch buffer level, boost up fetcher buffering significantly bug: 19567254 Change-Id: I750dfcc6f861d78d16a71f501beb86d8129cb048
* HLS: allow pause/resume in the middle of a segmentChong Zhang2015-03-204-277/+563
| | | | | | | | | | | | | | | | | | - when down switching, decide whether to finish current segment based on bandwidth settings, abort current segment if needed. - when switching, pause new fetcher after the first 47K chunk, and go back to resume old fethcer to stop point immediately. - when old fetcher reaches stop point, swap packet sources and resume new fetcher. - mark switching as done as soon as old fecther reaches stop point. This allows us to resume bandwidth monitoring earlier, and do subsequent switches sooner. bug: 19567254 Change-Id: Iba4b5fb9b06541bb1e49592536648f5d4cbc69ab
* HLS: bandwidth estimator changesChong Zhang2015-03-193-69/+149
| | | | | | | | | | | | | | | | - separate bandwidth estimator from HTTPBase, so that we have better control on which samples to use, it also allows bandiwdth history across multiple HTTPBase objects (which we'll use later). - use min buffer duration among the streams to decide whether to download next segment. - maintain constant buffer level, time next download to happen when buffer just goes below kMinBufferedDurationUs. bug: 19567254 Change-Id: I5c481ad1f7ff3f084d57ec68856e12ae6b40ce41
* Fix 64-bit build break caused by print typeChong Zhang2015-03-172-4/+4
| | | | Change-Id: I2239d875420f6926918c1a0dcab31b71c8329d1f
* HLS: some fixes for seek with discontinuity.Chong Zhang2015-03-175-100/+165
| | | | | | | | | | | | | | | | | | | | | | - keep old fetcher when seeking, unless the URI is changing. - when restarting after a seek, check discontinuity seq, and queue format change if it's changed. - add a simple kill switch to abort when stop (or pause for seek). - when seeking, if searching for start time goes into 2nd segment, do not signal time discontinuity or reset first PTS. - use setFormat() to set format in AnotherPacketSource, otherwise video/audio flags are not updated and format are not cleared on discontinuities. - do not start queueing video access unit until first IDR after start bug: 19656539 Change-Id: I79108d26964f59ea00d2eeac8f5f9318747f8541
* Merge "HLS: misc changes in LiveSession buffering logic"Chong Zhang2015-03-104-264/+181
|\
| * HLS: misc changes in LiveSession buffering logicChong Zhang2015-03-104-264/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove unnecessary time discontinuity move fetcher to separate looper so that download won't block LiveSession poll buffering at 1 sec interval in LiveSession, and switch bandwidth if necessary use fixed 100ms threshold for resumeUntil bug: 19567254 Change-Id: I911e5041364f0858b43f2312756e173db5870a1e
* | stagefright: don't use ALooperRoster mutex for reply handlingLajos Molnar2015-03-102-3/+4
|/ | | | | | | | 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
* media: switch to new AMessage handlingLajos Molnar2015-03-052-19/+19
| | | | | Bug: 19607784 Change-Id: I94cddcb81f671422ad4982a23dc4acfe57a9f1aa
* Fix mismatched type tag clang warning.Dan Albert2015-02-191-1/+0
| | | | | | | Parcel is a struct, not a class. However, Parcel isn't used in this file, so just kill it. Change-Id: I575cae8b3c5dd13dd9b03fccfe7423e1f17f62f5
* am 29eb8045: am 99cef1ef: allow HLS streams with CLOSED-CAPTIONS tag to playChong Zhang2015-02-061-0/+10
|\ | | | | | | | | * commit '29eb804501a993ecdd4d1073240f2998264508ff': allow HLS streams with CLOSED-CAPTIONS tag to play
| * allow HLS streams with CLOSED-CAPTIONS tag to playChong Zhang2015-02-051-0/+10
| | | | | | | | | | bug: 19284568 Change-Id: I2ccf1c5952c13d1332b6a91f967af0bd3ee67451
* | am a291dabc: am 6fbcf633: Merge "httplive: Set start time and segment start ↵Robert Shih2015-02-042-6/+14
|\ \ | |/ | | | | | | | | | | time in conjunction." into lmp-mr1-dev * commit 'a291dabcab10cafc1749d1d9493d269049502256': httplive: Set start time and segment start time in conjunction.
| * Merge "httplive: Set start time and segment start time in conjunction." into ↵Robert Shih2015-02-042-6/+14
| |\ | | | | | | | | | lmp-mr1-dev
| | * httplive: Set start time and segment start time in conjunction.Robert Shih2015-02-042-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add comments describing how start time and segment start time are used. Based on AOSP CL https://android-review.googlesource.com/127653 by Joakim Johansson <joakim.c.johansson@sonymobile.com> but uses the lowest segment start time instead of highest. Bug: 18821145 Change-Id: I14cf1186d0daf517a24e8423c3a708b4c9ba06c4
* | | am 6a025acb: am ec0472ba: Merge "Move AString\'s StringPrintf out of the way."Elliott Hughes2015-02-041-2/+2
|\ \ \ | | | | | | | | | | | | | | | | * commit '6a025acb630a3ac4a84715d188aeb48f1946bc3f': Move AString's StringPrintf out of the way.
| * | | Move AString's StringPrintf out of the way.Elliott Hughes2015-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should come back and replace AString with std::string and switch to the "real" StringPrintf family, but this fixes the ODR violation that was preventing us from booting. Bug: 19265750 Change-Id: I798eb9ca5dd634e44625af5e583439ef9f0cdc35
* | | | am 9787254f: am 296a0d03: Merge "PlaylistFetcher: clear packet sources when ↵Robert Shih2015-02-021-0/+4
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | adjusting starting sequence number" into lmp-mr1-dev * commit '9787254f1ef27e86390a31a7ef05d94ff2f65232': PlaylistFetcher: clear packet sources when adjusting starting sequence number
| * | | Merge "PlaylistFetcher: clear packet sources when adjusting starting ↵Robert Shih2015-01-311-0/+4
| |\ \ \ | | | | | | | | | | | | | | | sequence number" into lmp-mr1-dev
| | * | | PlaylistFetcher: clear packet sources when adjusting starting sequence numberRobert Shih2015-01-301-0/+4
| | | |/ | | |/| | | | | | | | | | | | | Bug: 19215971 Change-Id: I4ad29cf0ac24dea330017a1b0159b06922d768ae
* | | | am e3ada5d5: am 678bcdc8: httplive: Defer switch down if a switch is in progressApurupa Pattapu2015-02-021-1/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'e3ada5d580a32b0133ac3db881e1574af57cb4fc': httplive: Defer switch down if a switch is in progress
| * | | httplive: Defer switch down if a switch is in progressApurupa Pattapu2015-01-301-1/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bandwidth switch down is triggered if the buffered duration in any of the current packet sources is below a threshold. When a switch is in progress, all the packet sources are drained until they are empty or until stop time is dequeued. Hence buffered duration keeps going down during switch. Defering check switch down will avoid unnecessary switches. Do not switch down if estimated bandwidth index is more than the current one. Bug: 18821145 Change-Id: I655a308462503cf9df10672ecd904a51b2cba691
* | | am ce25d85a: am a93fd2be: stagefright: httplive: Decouple block size from ↵Leena Winterrowd2015-01-294-2/+15
|\ \ \ | |/ / | | | | | | | | | | | | | | | bandwidth estimate * commit 'ce25d85ad22e6df4b861d17e9e67cb6d0e62c363': stagefright: httplive: Decouple block size from bandwidth estimate
| * | stagefright: httplive: Decouple block size from bandwidth estimateLeena Winterrowd2015-01-284-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A very small block size in PlaylistFetcher can lead to framework overhead and difficulty streaming high bitrate content, but since HTTPBase keeps a constant history of the past 100 HTTP reads, the block size directly affects bandwidth estimation and in turn, switching latency. Add setBandwidthHistorySize() to HTTPBase to allow setting the history size for bandwidth estimation. Call this within LiveSession based on the current block size to ensure that the number of bytes used for estimating bandwidth does not change if the block size is changed in PlaylistFetcher. Since a single TCP/IP packet can contain up to 64k of data, increase the block size in PlaylistFetcher from 2k to lcm(188, 1024) or 47k to avoid inaccuracies in read timings due to up to a comparable 47 reads from the same locally-cached packet instead of from the network. Also make HTTPBase::addBandwidthMeasurement() virtual to allow bandwidth estimation extensions that do not rely on a history list. Bug: 18821145 Change-Id: I5f957be01f5346e74cfb7eeb150ca4b397ad5798
* | | am 0512881b: am 9aff25fb: stagefright: httplive: Reduce memcpy calls for ↵Leena Winterrowd2015-01-291-1/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | chunked content * commit '0512881b08d03d10d6f164566c9a787d2f56ab6d': stagefright: httplive: Reduce memcpy calls for chunked content
| * | stagefright: httplive: Reduce memcpy calls for chunked contentLeena Winterrowd2015-01-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Streams using http chunking will not report the segment's total content-length. In this case, a 64k buffer is allocated and is increased by 32k each time the buffer is filled again. For high bitrate content, this can lead to a large number of copies that affect the HLS framework delay. Increase fetchFile buffer size exponentially by 50% or at least 32k instead of by 32k each time to reduce the number of memcpy calls. Example for a chunked 6 MB 1080p segment (ie ~3s): Adding 32k: 190 copies with 572.97 MB copied Increasing by 50%: 12 copies with 16.09 MB copied Bug: 18821145 Change-Id: Iedf0e4437e96026a58d50bce2660f85ac90d0ada
* | | resolved conflicts for merge of 59d1d010 to lmp-mr1-dev-plus-aospLajos Molnar2015-01-291-3/+3
|\ \ \ | |/ / | | | | | | Change-Id: I52e17685b3aa058d6c6b0c023659231fa00a8f71
| * | httplive: Dont resume if we have almost fetched till stop timeApurupa Pattapu2015-01-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use the last enqueued instead of last dequeued time in ResumeUntil. - Set duration in access unit meta as timestamp difference between the last two queued access units. Bug: 18821145 Change-Id: If53ddee1d87775905a6d4f11a6219fe66f498450
* | | am 3606efd1: am 9dee2e59: stagefright: httplive: Propagate target duration ↵Leena Winterrowd2015-01-291-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | to LiveSession * commit '3606efd19a7dee847d3d4db41e8300ba7b451f81': stagefright: httplive: Propagate target duration to LiveSession
| * | stagefright: httplive: Propagate target duration to LiveSessionLeena Winterrowd2015-01-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | LiveSession's switch-down monitor requires the 'targetDuration' key to evaluate the switching threshold. Ensure that this key is set in the access unit metadata. Bug: 18821145 Change-Id: Ib30f3b4bd8185a77a06abd755822f96644968a21
* | | am 958a5432: am 17460976: stagefright: httplive: Fix deadlock for low ↵Leena Winterrowd2015-01-292-2/+17
|\ \ \ | |/ / | | | | | | | | | | | | | | | duration clips * commit '958a54322ea3ff2ad8ed0ac6e229c90c638f8a7f': stagefright: httplive: Fix deadlock for low duration clips
| * | stagefright: httplive: Fix deadlock for low duration clipsLeena Winterrowd2015-01-282-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PlaylistFetcher buffers up to 3 * target-duration bytes of data, but if a stream is slow (ie due to bad network conditions), a buffer threshold of 10s is used to resume playback. This results in an indefinite freeze as PlaylistFetcher has stopped buffering before this threshold. Reduce the 10s threshold to be more in-sync with PlaylistFetcher's buffering size. Bug: 18821145 Change-Id: Ife846e7c5b4f9645895873d08250c4bee0164972
* | | am 2899991e: am 5cf91c50: libstagefright: httplive: Add NULL check for empty ↵Leena Winterrowd2015-01-291-1/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | playlist * commit '2899991eb8ca8ebe5da7acd74e0b3bd9743a8724': libstagefright: httplive: Add NULL check for empty playlist
| * | libstagefright: httplive: Add NULL check for empty playlistLeena Winterrowd2015-01-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the source playlist is empty, the playlist meta will be NULL. Check for this case to avoid an invalid dereference. Also flag playlists without the required EXT-X-TARGETDURATION tag as malformed. Bug: 18821145 Change-Id: Idf74d890a89bbc6483a6d4060eb092dc7461be24
* | | resolved conflicts for merge of 44a2390b to lmp-mr1-dev-plus-aospLajos Molnar2015-01-294-51/+9
|\ \ \ | |/ / | | | | | | Change-Id: I39fdc2e8895e1e943749b9a2628656a8fa5bb72b
| * | Revert "HLS: QCom enhancements"Lajos Molnar2015-01-284-51/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is to restore patch attributions This reverts commit f580806d893c4631f5324ff0af5c2db68a40ef42. Bug: 18821145 Change-Id: Idc49385fffccfde2a3915388fe3fe4e2b740d787
* | | am 64b08d23: am cbb803a5: Merge "Remove superfluous OpenSSL include paths."Kenny Root2015-01-261-2/+1
|\ \ \ | | |/ | |/| | | | | | | * commit '64b08d230c94872e014831bdb7b8a323c4b584ec': Remove superfluous OpenSSL include paths.
| * | Remove superfluous OpenSSL include paths.Adam Langley2015-01-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The libcrypto and libssl modules (and their respective static and host versions) use LOCAL_EXPORT_C_INCLUDE_DIRS thus just including the module is sufficient. Change-Id: If9df76e6fefb7419cbb2fb33a0264626c748561e
* | | resolved conflicts for merge of 2efb9566 to lmp-mr1-dev-plus-aospNarayan Kamath2014-12-294-9/+51
|\ \ \ | | |/ | |/| | | | Change-Id: I4313941f3561176ce9f6ab055678fb626e570107
| * | HLS: QCom enhancementsRobert Shih2014-12-224-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit consists of: http://go/pag/c/188753 Add NULL check for empty playlist http://go/pag/c/188754 Fix deadlock for low duration clips http://go/pag/c/188757 Create a copy of last enqueued metadata http://go/pag/c/188755 Propagate target duration to LiveSession http://go/pag/c/188762 Decouple block size from bandwidth estimate http://go/pag/c/188756 Reduce memcpy calls for chunked content http://go/pag/c/188758 Dont resume if we have almost fetched till stop time Bug: 18821145 Change-Id: I7fd650999c6c50bbadffd65adee9020e669dfe62
* | | am a0b3a0a4: am 6e430fbd: Merge "NuPlayer: send NOT_SEEKABLE media info to ↵Wei Jia2014-12-151-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | client when the source is not seekable." into lmp-mr1-dev * commit 'a0b3a0a46dc42eafe620ffd053604515bbd9ca9a': NuPlayer: send NOT_SEEKABLE media info to client when the source is not seekable.
| * | NuPlayer: send NOT_SEEKABLE media info to client when the source is not ↵Wei Jia2014-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | seekable. LiveSession: return -1 for duration when it's not available. Bug: 18599325 Change-Id: Iecd040f48750806f98d1799e2aaab2f90c6f3887
* | | resolved conflicts for merge of e5ba80c5 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-272-6/+4
|\ \ \ | | |/ | |/| | | | Change-Id: Iea12c8a6cabf84584e4a89ad80e298c1f4ea3dd7
| * | Stagefright: Fix unused variables, functions, valuesAndreas Gampe2014-11-252-6/+4
| | | | | | | | | | | | | | | | | | | | | For build-system CFLAGS clean-up, remove unused functions and variables. Change-Id: Ic3dee56b589ea9a693efa1d72ba394036efff168
* | | am 2bbc61fe: am 408dba5f: Merge "HLS: fix live lock after missing the boat ↵Robert Shih2014-11-191-0/+20
|\ \ \ | | |/ | |/| | | | | | | | | | | | | during configuration change" into lmp-mr1-dev * commit '2bbc61fe75a98e39c844c034cdcaf4d01b311834': HLS: fix live lock after missing the boat during configuration change
| * | HLS: fix live lock after missing the boat during configuration changeRobert Shih2014-11-181-0/+20
| | | | | | | | | | | | | | | Bug:17488643 Change-Id: I4f5de42f86d6c616a67dc803f35c026b35347983
* | | am 811a92f6: am 39b109a1: Merge "NuPlayer HTTPLiveSource: impl ↵Robert Shih2014-11-184-0/+47
|\ \ \ | |/ / | | | | | | | | | | | | | | | getSelectedTrack" into lmp-mr1-dev * commit '811a92f68dbcab0f88b4be72099d783d3a44c9f6': NuPlayer HTTPLiveSource: impl getSelectedTrack
| * | Merge "NuPlayer HTTPLiveSource: impl getSelectedTrack" into lmp-mr1-devRobert Shih2014-11-174-0/+47
| |\ \
| | * | NuPlayer HTTPLiveSource: impl getSelectedTrackRobert Shih2014-11-064-0/+47
| | | | | | | | | | | | | | | | | | | | Bug: 17514665 Change-Id: I81c62553f2c5acb4d2436a9d8f04c10fdbe315d0