summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/httplive
Commit message (Collapse)AuthorAgeFilesLines
* Prevent integer underflows in ID3::IteratorJoshua J. Drake2016-03-221-0/+3
| | | | | | | | | | | If mFrameSize is less than or equal to getHeaderLength(), an integer underflow will occur. This typically leads to a crash reading out of bounds in the following code. Prevent this from happening by validating mFrameSize. Also add NULL checks after references to ID3::Iterator::getData. Bug: 23285887 Change-Id: I35eeda3c5349ebbd9ffb3ea49b79af6a940d1395
* Fix benign unsigned integer overflowsVishwath Mohan2015-11-051-2/+4
| | | | | | Bug: 23110888 Change-Id: I1894a61e94a274795cab7fb23a81f3a611717c1d (cherry picked from 25f191c5cb2ec532e534be646c32806f9f85e196)
* Benign integer overflow in PlaylistFetcherDan Austin2015-11-051-1/+2
| | | | | | | | | There is a benign integer overflow in the loop that finds the smallest first PTS from all streams in the current parser. The loop has been refactored to eliminate the integer overflow. Bug: 25008541 Change-Id: Ie2c0f1d360023cad960e071d810dddb1b5420470
* httplive: Add default implementation in HLS for custom changesSanthosh Behara2015-10-123-2/+5
| | | | | | | | Add getSeqNumberInLiveStreaming() function in PlayListFetcher Make getBandwidthIndex() function to be virtual. Change-Id: I5e2bc7a42e0d4a16d5b5ea5f2ec3d78a7d019ad3
* httplive: refactor for HLS customizationLi Sun2015-10-064-10/+21
| | | | | | Change access modifiers and add overridable methods in HLS stack. Change-Id: Iae8e77246cc6643735af18617717fba713d0038c
* httplive: Do not remove audio only playlistSanthosh Behara2015-10-061-1/+2
| | | | | | | | Do not remove audio only playlist. This will enable the player to switch to Audio only from Audio Video and vice versa. Change-Id: I56b9245f3d28ef9f8e31651cc59b494b763f3feb
* HLS: preserve old format in onChangeConfiguration2Robert Shih2015-07-291-1/+10
| | | | | | | `onChangeConfiguration2` is only called during seek. Bug: 22698650 Change-Id: I715fa51d04d503f49d678eaea08f2b63dce4e01e
* HLS: temporarily blacklist a variant if failed to fetchChong Zhang2015-07-143-14/+145
| | | | | | | | | | | | | | - abort high bandwidth immediately when bandwidth is fluctuating - use short-term bandwidth estimate for downswitch if bandwidth is not stable - discard bandwidth samples that's too old in absolute time - if already underflow, switch to lowest bandwidth to catch up - if error happened during bandwidth switch (likely due to new variant link is broken), switch to lowest bandwidth to catch up bug: 21754330 Change-Id: Ifd16d75e261cefb93b989829bf35a36783142ae0
* Merge "Change mime for HLS timed ID3 stream to application/x-id3v4" into mnc-devRobert Shih2015-05-151-1/+1
|\
| * Change mime for HLS timed ID3 stream to application/x-id3v4Robert Shih2015-05-141-1/+1
| | | | | | | | | | Bug: 21151892 Change-Id: I6a243b0edbbb445df0caf65f395f81926fd515f0
* | Merge "HLS: invoke signalEOS on ATSParser to flush out final samples" into ↵Robert Shih2015-05-111-0/+10
|\ \ | |/ |/| | | mnc-dev
| * HLS: invoke signalEOS on ATSParser to flush out final samplesRobert Shih2015-05-111-0/+10
| | | | | | | | | | | | | | Also clear EOS status when we reset ATSParser. Bug: 20959760 Change-Id: I730234acf3cdbee08affe0f28b7e8759e11059cb
* | nuplayer: fixes for subtitle pause/resumeChong Zhang2015-05-062-3/+11
|/ | | | | | | | | | - pause after the current block when select track - ignore metadata timestamps as they're too sparse - use smaller range when searching for next segment to prevent resumeUntil from downloading too much data bug: 20500732 Change-Id: Ibda57a39ec86efd96a8dd0db95adeb92d076697a
* HLS: make disconnect faster to prevent ANRChong Zhang2015-04-237-329/+509
| | | | | | | disconnect HTTP connection when we absolutely won't resume bug: 19890444 Change-Id: Idee36b48741f6f8eb1d65bca32156e9e18349c67
* AnotherPacketSource: make getBufferedDurationUs more discontinuity-awareRobert Shih2015-04-211-1/+2
| | | | | | | | | The new getBufferedDurationUs implementation obsoletes the purpose of getEstimatedDurationUs; remove getEstimatedDurationUs and its associated member variables. Finally replace calls to getEstimatedDurationUs with getBufferedDurationUs. Change-Id: I38f20df8e177ffbfe299b203d99076fc98dcd274
* HLS: remove no more than 10% of bandwidth history at a timeChong Zhang2015-04-212-11/+51
| | | | | | | | | | | | | | | | | | - 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
* Merge "HLS: reduce number of guessed wrong seq numbers"Chong Zhang2015-04-185-187/+245
|\
| * HLS: reduce number of guessed wrong seq numbersChong Zhang2015-04-175-187/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - account for playlist age in live streaming when calculating segment time - be more conservative on downswitching if bandwidth is unstable - adjust forward or backward if guessed wrong seq number - code refactor bug: 19567254 Change-Id: I0b61cea888fdffd1b3ee2446747ed10152e9e7d7
* | stagefright: make more warnings errorsLajos Molnar2015-04-172-3/+1
| | | | | | | | Change-Id: I9b1ad60fbfb866dbf9c00843e06553c3eb25c113
* | stagefright: warnings be gone, some are now errors, use clangLajos Molnar2015-04-173-2/+3
|/ | | | Change-Id: I81f438ae444f04c12ae27ae4ef6d073033de172c
* stagefright: initial timed id3 support in hlsRobert Shih2015-04-164-52/+192
| | | | Change-Id: I00a8a786b3f4b74742c34770edd94e937abe20a8
* HLS: parse stream resolution and set maxWidth/maxHeightChong Zhang2015-04-143-0/+44
| | | | | | bug: 20160436 Change-Id: Ic3adb84d3c65cc65f62fc509a99d09602db862a1
* Merge "HLS: allow down switch during prepare"Chong Zhang2015-04-102-25/+44
|\
| * HLS: allow down switch during prepareChong Zhang2015-04-092-25/+44
| | | | | | | | | | | | | | | | | | | | | | to avoid having to immediately down switch (and pause) after playback starts. do not count "discard" packet when estimating duration. bug: 19567254 Change-Id: I0cdd37a06ca800dd81a91cca5eb9b46a1eab7b20
* | stagefright: LiveSession: delay consuming reply ID for seekLajos Molnar2015-04-082-17/+10
|/ | | | | | | Only consume reply ID when actually handling the seek. Bug: 20123914 Change-Id: I2112ee1b89f8193b487ea2b0b3b7050ba3413864
* HLS: traces in LiveSession and PlaylistFetcher for easier debuggingChong Zhang2015-04-084-56/+170
| | | | | bug: 19567254 Change-Id: I4305d37cb74279ccd435f99483231cd1dcf42fc9
* HLS: misc bug fixesChong Zhang2015-04-025-238/+188
| | | | | | | | | | | | | | | | | - fix no target-duration case - fix for audio-only <=> audio/video switching - disable audio-only variants if there is at least one variant with video - fix mpeg2ts PTS wraparound when bandwidth adapting - tweak up/down switch marks bug: 19567254 Change-Id: Ib46144203c56dfc96eccd6ddaa3867e8a4f2c6a9
* 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