summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/mpeg2ts/ATSParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEADJessica Wagantall2016-07-071-0/+7
|\ | | | | | | | | | | Ticket: CYNGNOS-3020 Change-Id: I7e8d69c5f7041b66893ea643c4bc19c3b7bcdda5
| * Check section size when verifying CRCMarco Nelissen2016-05-271-0/+7
| | | | | | | | | | Bug: 28333006 Change-Id: Ief7a2da848face78f0edde21e2f2009316076679
* | Fix harmless unsigned overflow in recoverPTSChad Brubaker2016-03-221-1/+1
|/ | | | Change-Id: I89e3a827cf566421e8dd9b6a3c842e73a19c140f
* Merge "mpeg2ts: more error tolerance" into mnc-devWonsik Kim2015-06-111-5/+2
|\
| * mpeg2ts: more error toleranceWonsik Kim2015-06-111-5/+2
| | | | | | | | | | | | | | | | | | Be more tolerant with corrupt packet. Instead of reporting EOS, simply discard the damaged packet and continue. Bug: 21764375 Change-Id: Ibfd112db884732a082371c1abbd047077d1bf57e
* | Merge "stagefright: check the validity of the range of adaptation field" ↵Jaesung Chung2015-06-091-0/+5
|\ \ | |/ |/| | | into mnc-dev
| * stagefright: check the validity of the range of adaptation fieldJaesung Chung2015-05-151-0/+5
| | | | | | | | | | Bug: 20439174 Change-Id: I76a9a3cd1669164cee921191d27d4c669eeb9ae0
* | mpeg2ts: Fix SIGEGV on ATSParser::Stream::flush()Jaesung Chung2015-05-221-1/+1
| | | | | | | | | | Bug: 21340130 Change-Id: I4c7eeaf1e35a93400adc87af4eea1902d89d2630
* | Implement seek for MPEG2TSExtractorWonsik Kim2015-05-201-26/+68
|/ | | | | | | TODO: Use bandwidth-based estimation to seek forward long period. Bug: 20126845 Change-Id: I5e2f90784a9ce0dce348715dfcfc4f83ee196170
* HLS: invoke signalEOS on ATSParser to flush out final samplesRobert Shih2015-05-111-0/+1
| | | | | | | Also clear EOS status when we reset ATSParser. Bug: 20959760 Change-Id: I730234acf3cdbee08affe0f28b7e8759e11059cb
* DO NOT MERGE: Prevent crash at erroneous MPEG2TS bitstreamJinsuk Kim2015-04-291-62/+124
| | | | | | | | | | | | | Used new RCHECK_ macros for drop-in replacements for CHECK_ to avoid crashing at bit errors encountered while parsing MPEG2 transport packets. Also removed CHECK_ macros in PSI table processing as errors would have been already filtered out by CRC check. Bug: 20274977 Change-Id: I5ca810df3c4295142610bbd1d586d7529bb9f303 (cherry picked from commit e84ab89a2cdae1d1828225f88d895882d716f90e)
* stagefright: initial timed id3 support in hlsRobert Shih2015-04-161-0/+21
| | | | Change-Id: I00a8a786b3f4b74742c34770edd94e937abe20a8
* am 6705a49f: am 541a9ac7: am 8cd4132a: am 3f22f5a2: Merge "Signal EOS at end ↵Marco Nelissen2015-04-161-0/+8
|\ | | | | | | | | | | | | of mpeg video to flush out final sample" * commit '6705a49f6481ad1728215a2a72472fe43c786cd0': Signal EOS at end of mpeg video to flush out final sample
| * Signal EOS at end of mpeg video to flush out final sampleMarco Nelissen2015-04-151-0/+8
| | | | | | | | Change-Id: I27196a4a4b7fe37da52d3ee99da8cb80294d36d0
* | Merge "HLS: misc bug fixes"Chong Zhang2015-04-031-9/+22
|\ \
| * | HLS: misc bug fixesChong Zhang2015-04-021-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Do CRC check for MPEG2TS PSI sectionsJinsuk Kim2015-03-311-1/+112
|/ / | | | | | | | | | | | | | | CRC checking helps the parser avoid getting wrong values from corrupted data in the stream transmitted over a noisy channel. Bug: 19821428 Change-Id: I7f589a66a781298c039124a4bd1c9453e77b1bf3
* | Fix print format error.Chih-Hung Hsieh2015-03-121-1/+1
| | | | | | | | Change-Id: Ie3b754e22a4f858a35159abc8eaf00aa4949ab24
* | ATSParser: handle PID changeChong Zhang2015-03-091-47/+96
| | | | | | | | | | | | | | | | | | also use original 33bit PTS on first frame, only do wrap around starting from second frame. bug: 19656539 Change-Id: I3733e0f60fe4b9275bef4aef819777852c112710
* | handle mpeg2ts PTS wraparoundChong Zhang2015-03-031-1/+21
|/ | | | | bug: 19587682 Change-Id: I805ed6aa330bda3dc0ec8bd3519fb1ffeaa81ca9
* NuPlayer: tunnel decoder with renderer for data buffer passing.Wei Jia2014-11-141-1/+1
| | | | | | Bug: 18342383 Change-Id: I182928007814c146c01a86196c4fda1d46e74ea4
* PlaylistFetcher: check ts program streams before disabling a/vRobert Shih2014-11-121-3/+28
| | | | | Bug: 14648838 Change-Id: Ibf2b2cbb235f3d80bc33013e2afc053f13b9035f
* stagefright: return failure on malformed TS streamsDavid Yeh2014-10-211-9/+23
| | | | | Bug: 18075193 Change-Id: I7bd97dea263e972a8de3429ed000cbd4913164bf
* httplive: timestamp reporting, track selectionRobert Shih2014-08-051-0/+6
| | | | | | | Bug: 15153976 Bug: 15763638 Bug: 16351654 Change-Id: I4462276d4b7342647286a0ca4be11692ce52ff6d
* ATSParser: treat stream type 0x83 as TrueHD AC3Chong Zhang2014-07-301-6/+2
| | | | | Bug: 16668055 Change-Id: I11fd3f795bbb50113e1a1e28e682edd76f11e146
* HLS: do not discard packets when queuing explicit discontinuityChong Zhang2014-06-261-1/+1
| | | | | | | | | | | in case of explicit discontinuity (#EXT-X-DISCONTINUITY tag in the playlist), do not discard packets that's already queued. (when seeking, the old fetcher will be discarded so this won't affect seeking case.) Bug: 15020526 Change-Id: I5d3fc489df35e3bc44acb1ee7851571cb99cb56b
* do not drop TS packet on discontinuity at payload startChong Zhang2014-06-061-1/+3
| | | | | | Bug: 15470543 Change-Id: Ia96a295fbc7e9f1b1d5c0d9091ac62184d44dcfa
* libstagefright: fix 64-bit warningsColin Cross2014-03-191-9/+11
| | | | | | | | | %lld -> %" PRId64 " for int64_t %d -> %zu for size_t Also fixes some casts from void* to integer types, and some comparisons between signed and unsigned. Change-Id: I9c52f76240e39399da252c66459042a6fc626a90
* warnings be gone.Andreas Huber2014-02-111-2/+2
| | | | Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
* am 5274e21e: am 26c8f714: Merge "Ignore transport stream packets with the ↵Andreas Huber2013-11-131-1/+4
|\ | | | | | | | | | | | | "transport_error_indicator" bit set" into klp-dev * commit '5274e21ea6d9e8009c13817d75f9423735964700': Ignore transport stream packets with the "transport_error_indicator" bit set
| * Ignore transport stream packets with the "transport_error_indicator" bit setAndreas Huber2013-11-121-1/+4
| | | | | | | | | | | | | | | | which indicates that they contain at least one bitstream error that was unrecoverable. Change-Id: I10665fd190194fdd2568175fe00b6063d3fc10a5 related-to-bug: 11537029
* | Support TS + AC3 for ATSC standardChangwan Ryu2013-11-061-0/+6
|/ | | | Change-Id: I141667f3f54b242bafdf0ab9db86852c56f49ffa
* A reference to the psi section data could become invalid if moreAndreas Huber2013-04-291-3/+5
| | | | | | | sections were added to the KeyedVector. Change-Id: I095b5452ccfad89d69fc502fb21ce39495e201c3 related-to-bug: 8754565
* Squashed commit of the following:Andreas Huber2013-03-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Squashed commit of the following:Andreas Huber2013-01-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f2c38e5cf8cee3b597c744c9d6a9c0969ac8599a Author: Andreas Huber <andih@google.com> Date: Mon Jan 28 16:33:07 2013 -0800 Proper support for video format selection/negotiation. Change-Id: I7db86cef939d63b8064be1c74de9ad78e85d45d9 commit 488023b7bad086692ffe942114fa3cc0e59a16c0 Author: Andreas Huber <andih@google.com> Date: Mon Jan 28 11:21:23 2013 -0800 Sink now notifies clients once it is disconnected. Change-Id: I2f0a458ef1ec30dda1272ad5a013fee4ee70edc9 commit 783932e40dd904aa531c263ad51280d9ca814dcb Author: Andreas Huber <andih@google.com> Date: Tue Dec 18 15:03:40 2012 -0800 Alternative DirectRenderer implementation. Change-Id: I307beb913d7a61cb938bcb02696cc2e82d2b8b07 commit 1935cc9a87824aea71fc8ebe2162f62ec634ce5a Author: Andreas Huber <andih@google.com> Date: Tue Dec 18 10:24:27 2012 -0800 Experimenting with wifi sink timing. Change-Id: I059bae9762cf11777666988a8b4ab2012b5807be commit a859ee1eadd6a1d6a080667917e8b102c3770d61 Author: Andreas Huber <andih@google.com> Date: Thu Nov 15 11:16:30 2012 -0800 wfd sink update. Change-Id: I026dfc580be92aa40dbbe7c1bc061fadf3b08be8 Change-Id: I191d3d7015869ca99254d813d074328fb5b2f479
* Add support for HLS playlists of type 'event'.Andreas Huber2012-11-271-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related-to-bug: 6870049 Squashed commit of the following: commit eee2f3ba6bb7335f4e285632726db85645669929 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 15:02:01 2012 -0800 Make everything a lot less verbose by default. Change-Id: I884d7a7901aa1e7d4ff590f065ca57a79d2af8b3 commit 6bbdb837ed5bd88008e45efb8faf595e4051ba26 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:34:46 2012 -0800 HLS now properly signals media time changes at discontinuities including the start of playback (which may not necessarily be at time 0 if the playlist is of type 'event' and hasn't completed yet). Change-Id: I5ab747d024f9b8d0df72a4e06a12ebb29f62802e commit 1555589832b1878a144a976a643e1af4d61f877c Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 14:32:28 2012 -0800 As part of a time discontinuity, clients of IStreamListener can now signal the corresponding media time after the discontinuity, i.e. the first PTS timestamp following the discontinuity will be considered equivalent to the specified media time and media buffers timestamped accordingly. Change-Id: Id7db7679b7faa6efd6270620ff52e34e884f3e92 commit 5c24c605c073a11c426d025b1e7478fc1ad8365a Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 13:00:56 2012 -0800 NuPlayer sources now expose flags() and can announce that duration may change (increase) dynamically, in which case duration will be polled at 1 second intervals and communicated to the upper layers. Change-Id: I45102909b7a19eed0dda576747e3814d742a0eea commit ecb71de8e281e61971a2cd73e7161a97540bc357 Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 12:57:47 2012 -0800 Stop caching duration in MediaPlayer, duration could increase dynamically. Change-Id: I7bb2f16c0abe49debdf45c776d2266aa069d7791 commit 544aec5823e6d7a3e97e15b6b23546616bcd343e Author: Andreas Huber <andih@google.com> Date: Tue Nov 27 08:46:28 2012 -0800 An attempt to add support for "event" style HLS playlists. Change-Id: I3dfb2e801ecaff8f5d8bdb3a4fca1b18aeeb2c60 Change-Id: I48cf7f65a654d33f2f49ded74f8be22aed9e3b98
* Various tweaks to wfdAndreas Huber2012-10-311-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related-to-bug: 7426218 Squashed commit of the following: commit 1553f1a1c66af998674168f7f7a3be23fcb0c794 Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 15:51:27 2012 -0700 Add LPCM, AVC and AVC HRD descriptors as necessary. Change-Id: Ibc836fced0fe37e8a25574c2295e886765b9ea6f commit 4e74db61d2d31ebe239acbdec8f110f88016a4ea Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 15:50:52 2012 -0700 added copyright headers to Sender.{cpp,h} Change-Id: If615ccb8767e32bd83ed1f0f669acc39a72489f6 commit 7144bf8ae68c5cdb8faa6e219547aabbd750f04e Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 15:50:25 2012 -0700 Reenable suspension of the RepeaterSource Change-Id: I765338fcde89c65e4b69be45a5949eba6bcdcf6f commit 812164bcfa0699821d7d8eefcc0dff96b2e2cd08 Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 14:03:50 2012 -0700 Add 2 stuffing bytes to the PES headers for audio tracks. Change-Id: I8b9c634f6a565ab7fa7ecdb610f7d8557e0b139b commit a084a741a63015d47c92d99fcd8b980fe615dc7d Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 13:19:38 2012 -0700 Fix PCM audio packetization in WFD. Change-Id: I99a435f9fe6b4397f24d6c22afae5ae2505ffc14 commit c5cb9369585f701f34bce41534940d5f9b59248f Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 13:19:12 2012 -0700 Support extraction of PCM audio from transport streams. Change-Id: I28a0516756ebcb5587325b6588df013ac871ffb9 commit b0a0512300ae037d6b39c2d04952d34b5fc12b2d Author: Andreas Huber <andih@google.com> Date: Tue Oct 30 08:54:13 2012 -0700 disable suspend of the RepeaterSource Change-Id: Ibf42a98185b0567f817ae582a82e6580f95d3d40 commit 4330e8b7668dc92a6d882b5622c0697cf292d04c Author: Andreas Huber <andih@google.com> Date: Mon Oct 29 14:11:25 2012 -0700 Better handling of datagrams in ANetworkSession reduce unnecessary copy overhead. Change-Id: I2ed8c767274ba07764f03e8d4913041168e5755f commit a44e73c322ba3f2c336f7cc4e1d63d3a74faa75d Author: Andreas Huber <andih@google.com> Date: Mon Oct 29 11:14:47 2012 -0700 Network traffic is now handled on a separate thread. Audio and video are queued to ensure proper A/V interleaving. Scheduled packet sends according to capture timestamps to reduce send-jitter. Change-Id: Ibd6357c1e663086cf87bec0a98f8e54dfdfaa0e5 related-to-bug: 7426218 Change-Id: Ia440129d656c35814abf18df06da50b73d5bb554
* Fix video continuityMarco Nelissen2012-10-021-0/+2
| | | | | | | Fixes "pixelation" seen after seeking in Netflix. b/7211673 Change-Id: Id675acaef1e5fd7151fdfa7bd79e2f25990e1ecd
* Improvements to our MPEG2 Transport Stream parserAndreas Huber2012-08-311-19/+152
| | | | | | | | Verifies the continuity counter Parses and associates PCR time with streams Allows for a absolute time anchor to be signalled via discontinuity. Change-Id: I4bc88c78382c9cc6380f28df584cc6c254e0a8f9
* Fixes parsing of PSI sections in MPEG2 transport streamsAndreas Huber2012-05-171-13/+155
| | | | | | | | They can span multiple transport stream packets, something the parser previously did not support. Change-Id: I78da6ffd2d422cceedb87aad61cba2062419e635 related-to-bug: 6166596
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-1/+1
| | | | | | | 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-9/+9
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* resolved conflicts for merge of 998a929a to masterAndreas Huber2011-11-291-31/+54
|\ | | | | | | Change-Id: Id5cfbcf20e5ec28782cc88075040cf9edebfdfe8
| * Finer granularity discontinuity support.Andreas Huber2011-11-281-31/+54
| | | | | | | | | | | | | | | | No clients can signal a format change on either audio or video track (or both) and a time discontinuity (timestamps changed) independantly. Change-Id: I3e6cf4e7c260e85759879d61a9b517f68431c22f related-to-bug: 5553055
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-39/+39
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Assume a PTS of 0 if absent, don't bail on fragmented PES packets not having PTSAndreas Huber2011-10-121-2/+4
| | | | | Change-Id: I3b31f08428fb7195b98f145ae0675006c8756de1 related-to-bug: 5450187
* Signal an error when encountering a malformed .ts stream.Andreas Huber2011-09-011-13/+33
| | | | | Change-Id: I3ab0215419214b652573945403eb45eb09d41aff related-to-bug: 5114811
* I have one HLS stream that switches stream PIDs from one bandwidth to the nextAndreas Huber2011-08-311-18/+80
| | | | | | | this change intends to support its very limited case and signals an error in all other cases of unexpected PID changes that we cannot recover from. Change-Id: Icbfdf9fe7461969e2a8781ed416f54d891dd789a
* Discontinuities are only signalled on streams that have been identified, i.e.Andreas Huber2011-08-311-32/+13
| | | | | | | | | | | | | those that have a queue. This ensures that the player doesn't observe discontinuities that don't match up across streams. Also, make sure output buffers arriving from the decoder to be rendered are sent back to the decoder if we started flushing. Finally, don't parse TS packets for streams we don't support. And don't allocate memory for them. Change-Id: I708e0de4cba8110a62e4c8ceb1e5702430d5d2bb
* ATSParser now supports a mode in which PTS is considered to be absolute timeAndreas Huber2011-08-301-9/+12
| | | | | | i.e. PTS 0 <=> media time 0 Change-Id: If10a0f98c129b95e8430dc419664b1def92e547e