ws-cleanup-types: Types, api, host: honest annotations; return the full annotated value count

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
4DBugandClaude Opus 5.5 committed 2026-10-31 10:43:19 -05:00
1 parent e35de41c9f
commit 2c15b97cd8
22 files changed
+147 -147

No files matched your search

+7 -7
View File
@@ -51,7 +51,7 @@ function Video.simpleDecoder(decodeOne: (data: buffer, packet: Types.Packet) ->
if q then
return q[1], q[2], q[3]
end
return nil
return nil, nil, nil
end
function self.flush(_: any) end
function self.reset(_: any)
@@ -155,15 +155,15 @@ local function rawDecoder(track: Types.Track, _opts: any?): (Types.VideoCodecDec
if pf == "yuv420p" and bits == 8 then
local img = Types.Image.new(w, h, "yuv420p")
buffer.copy(img.pixels, 0, data, 0, need)
return img
return img, nil
elseif pf == "yv12" then
local img = Types.Image.new(w, h, "yuv420p")
buffer.copy(img.pixels, 0, data, 0, w * h)
buffer.copy(img.pixels, w * h, data, w * h + cw * ch, cw * ch)
buffer.copy(img.pixels, w * h + cw * ch, data, w * h, cw * ch)
return img
return img, nil
end
return rawPlanar(data, pf, bits, w, h)
return rawPlanar(data, pf, bits, w, h), nil
end
local bpp = if pf == "bgra" or pf == "rgba" then 4 else 3
local stride = if track.stride then track.stride else w * bpp
@@ -185,7 +185,7 @@ local function rawDecoder(track: Types.Track, _opts: any?): (Types.VideoCodecDec
buffer.writeu32(px, o + x * 4, a + b * 256 + c * 65536 + 0xff000000)
end
end
return img
return img, nil
end)
end
@@ -269,7 +269,7 @@ local function mpeg1Decoder(_track: Types.Track, opts: any?): (Types.VideoCodecD
if q then
return q[1], q[2], q[3]
end
return nil
return nil, nil, nil
end
function self.flush(_: any)
for _ = 1, 4 do
@@ -324,7 +324,7 @@ function Video.register(entry: Entry): (boolean, Err.Err?)
for _, m in entry.matroska or {} do
byMatroska[m] = entry.id
end
return true
return true, nil
end
for _, e in BUILTIN do
Video.register(e)