Commit a4c1b42
committed
feat(mediaplayer): HLS / Low-Latency HLS playback (Windows)
Add an HLS source layered on top of the existing OS-codec media player. It
parses the M3U8, selects a single rendition, starts near the live edge, and
stitches segments (and LL-HLS EXT-X-PART parts) into one continuous byte stream
that the existing MPEG-TS / fragmented-MP4 demuxers consume. A background reader
paces delivery to the stream's measured average bitrate so the wall-clock
present path is fed at real time (not flooded), with enough burst to deliver
segment-start keyframes promptly.
Scope: Windows (WinHTTP fetch), clear streams, single rendition. Android/Quest
support is planned.
The existing RTSP and MPEG-TS implementations are NOT touched — basis_rtsp.c,
basis_ts.c (and basis_rtmp.c, basis_mp4.c, basis_http.c, basis_url.c, the
Windows decode/HTTP backends) have zero source edits. basis_media_core.c only
gains an additive ".m3u8" branch ahead of the plain byte-source path; every
other URL (rtsp/rtmp/.ts/.mp4) takes the identical existing route. No C# changes.
- protocol/basis_hls.c/.h: new HLS source (M3U8 parse, segment/part scheduler,
paced read-ahead buffer)
- basis_media_core.c: route .m3u8 to the HLS source, feeding basis_ts_run /
basis_mp4_run unchanged
- CMakeLists.txt: add basis_hls.c to the portable core
- README.md: document HLS support and the Windows / clear / single-rendition scope1 parent e18a455 commit a4c1b42
5 files changed
Lines changed: 856 additions & 0 deletions
File tree
- Basis/Packages/com.basis.mediaplayer
- Native~
- protocol
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
195 | 222 | | |
196 | 223 | | |
197 | 224 | | |
| |||
200 | 227 | | |
201 | 228 | | |
202 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
203 | 237 | | |
204 | 238 | | |
205 | 239 | | |
| |||
0 commit comments