summaryrefslogtreecommitdiffstats
path: root/stream/stream_slice.c
Commit message (Collapse)AuthorAgeFilesLines
* stream_slice: interpret `end` as offset if it starts with '+'Mohammad AlSaleh2020-09-171-0/+4
| | | | | | | | Example: slice://1g-2g@file.ts (1 to 2) slice://1g-+2g@file.ts (1 to 3) Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* stream: Implement slice:// for reading slices of streamsMohammad AlSaleh2020-08-191-0/+176
Add support for reading a byte range from a stream via the `slice://` protocol. Syntax is `slice://start[-end]@URL` where end is a maximum (read until end or eof). Size suffixes support in `m_option` is reused so they can be used with start/end. This can be very useful with e.g. large MPEGTS streams with corruption or time-stamp jumps or other issues in them. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>