comments: containers Archive / Demux / Ebml / MpegPs / Riff

This commit is contained in:
4DBug committed 2026-11-01 01:57:14 -05:00
1 parent e5a8e62fbc
commit a355bf3ca3
5 files changed
+6 -113

No files matched your search

+1 -7
View File
@@ -4,12 +4,7 @@
-- stream map (stream types), padding, and PES packets of the video (0xE0..0xEF), audio (0xC0..0xDF) and private
-- stream 1 (0xBD: AC-3 / DTS / LPCM / subpicture sub-streams) ids with their PTS / DTS (both PES header layouts,
-- 33-bit timestamps unwrapped). Data between packs that is not a start code is skipped (resync).
--
-- local ps, err = MpegPs.read(buf, base, limit)
-- ps.streams[id] = { id, kind, codec, streamType, pes = { { pts?, dts?, offset, size } } } (id: stream_id, or
-- 0xBD00 + sub-stream id for private stream 1); ps.order = the ids in order of appearance
--
-- Never throws: malformed packets are skipped and counted in ps.errors.
-- Never throws: malformed packets are skipped (ps.errors). Private stream 1 sub-streams are keyed 0xBD00 + their id.
local Err = require("@rosetta/core/Err")
local MpegEs = require("@rosetta/containers/MpegEs")
@@ -44,7 +39,6 @@ local function ts(b: buffer, p: number): number
return v
end
-- read(buf, base, limit) -> File | nil, Err
function MpegPs.read(b: buffer, base: number, limit: number): (File?, Err.Err?)
local file: File = { streams = {}, order = {}, mpeg2 = false, errors = 0 }
local types: { [number]: number } = {}