mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
Add tell_me_more? mechanism
This commit is contained in:
1 parent
c510bc0c91
commit
ad1cff3921
12 files changed
+902
-748
No files matched your search
+11
-3
@@ -36,6 +36,9 @@ var Statuses = [...]string{
|
||||
`"@metadata reported"`,
|
||||
|
||||
// Suspensions.
|
||||
`"$even more information"`,
|
||||
`"$mispositioned read"`,
|
||||
`"$mispositioned write"`,
|
||||
`"$short read"`,
|
||||
`"$short write"`,
|
||||
|
||||
@@ -55,6 +58,7 @@ var Statuses = [...]string{
|
||||
`"#initialize falsely claimed already zeroed"`,
|
||||
`"#initialize not called"`,
|
||||
`"#interleaved coroutine calls"`,
|
||||
`"#no more information"`,
|
||||
`"#not enough data"`,
|
||||
`"#out of bounds"`,
|
||||
`"#unsupported method"`,
|
||||
@@ -84,6 +88,8 @@ var Types = []string{
|
||||
"rect_ie_u32",
|
||||
"rect_ii_u32",
|
||||
|
||||
"more_information",
|
||||
|
||||
"status",
|
||||
|
||||
"io_reader",
|
||||
@@ -170,6 +176,10 @@ var Funcs = []string{
|
||||
"range_ii_u64.intersect(r: range_ii_u64) range_ii_u64",
|
||||
"range_ii_u64.unite(r: range_ii_u64) range_ii_u64",
|
||||
|
||||
// ---- more_information
|
||||
|
||||
"more_information.set!(flavor: u32, w: u32, x: u64, y: u64, z: u64)",
|
||||
|
||||
// ---- status
|
||||
|
||||
// TODO: should we add is_complete?
|
||||
@@ -396,21 +406,19 @@ var InterfaceFuncs = []string{
|
||||
|
||||
// ---- image_decoder
|
||||
|
||||
"image_decoder.ack_metadata_chunk?(src: io_reader)",
|
||||
"image_decoder.decode_frame?(" +
|
||||
"dst: ptr pixel_buffer, src: io_reader, blend: pixel_blend," +
|
||||
"workbuf: slice u8, opts: nptr decode_frame_options)",
|
||||
"image_decoder.decode_frame_config?(dst: nptr frame_config, src: io_reader)",
|
||||
"image_decoder.decode_image_config?(dst: nptr image_config, src: io_reader)",
|
||||
"image_decoder.frame_dirty_rect() rect_ie_u32",
|
||||
"image_decoder.metadata_chunk_length() u64",
|
||||
"image_decoder.metadata_fourcc() u32",
|
||||
"image_decoder.num_animation_loops() u32",
|
||||
"image_decoder.num_decoded_frame_configs() u64",
|
||||
"image_decoder.num_decoded_frames() u64",
|
||||
"image_decoder.restart_frame!(index: u64, io_position: u64) status",
|
||||
"image_decoder.set_quirk_enabled!(quirk: u32, enabled: bool)",
|
||||
"image_decoder.set_report_metadata!(fourcc: u32, report: bool)",
|
||||
"image_decoder.tell_me_more?(dst: io_writer, minfo: nptr more_information, src: io_reader)",
|
||||
"image_decoder.workbuf_len() range_ii_u64",
|
||||
|
||||
// ---- io_transformer
|
||||
|
||||
@@ -54,6 +54,8 @@ var (
|
||||
typeExprRectIEU32 = a.NewTypeExpr(0, t.IDBase, t.IDRectIEU32, nil, nil, nil)
|
||||
typeExprRectIIU32 = a.NewTypeExpr(0, t.IDBase, t.IDRectIIU32, nil, nil, nil)
|
||||
|
||||
typeExprMoreInformation = a.NewTypeExpr(0, t.IDBase, t.IDMoreInformation, nil, nil, nil)
|
||||
|
||||
typeExprStatus = a.NewTypeExpr(0, t.IDBase, t.IDStatus, nil, nil, nil)
|
||||
|
||||
typeExprIOReader = a.NewTypeExpr(0, t.IDBase, t.IDIOReader, nil, nil, nil)
|
||||
@@ -100,6 +102,8 @@ var builtInTypeMap = typeMap{
|
||||
t.IDRectIEU32: typeExprRectIEU32,
|
||||
t.IDRectIIU32: typeExprRectIIU32,
|
||||
|
||||
t.IDMoreInformation: typeExprMoreInformation,
|
||||
|
||||
t.IDStatus: typeExprStatus,
|
||||
|
||||
t.IDIOReader: typeExprIOReader,
|
||||
|
||||
+24
-22
@@ -472,17 +472,18 @@ const (
|
||||
IDU32 = ID(0x116)
|
||||
IDU64 = ID(0x117)
|
||||
|
||||
IDBase = ID(0x120)
|
||||
IDBool = ID(0x121)
|
||||
IDEmptyIOReader = ID(0x122)
|
||||
IDEmptyIOWriter = ID(0x123)
|
||||
IDEmptyStruct = ID(0x124)
|
||||
IDIOReader = ID(0x125)
|
||||
IDIOWriter = ID(0x126)
|
||||
IDStatus = ID(0x127)
|
||||
IDTokenReader = ID(0x128)
|
||||
IDTokenWriter = ID(0x129)
|
||||
IDUtility = ID(0x12A)
|
||||
IDBase = ID(0x120)
|
||||
IDBool = ID(0x121)
|
||||
IDEmptyIOReader = ID(0x122)
|
||||
IDEmptyIOWriter = ID(0x123)
|
||||
IDEmptyStruct = ID(0x124)
|
||||
IDMoreInformation = ID(0x125)
|
||||
IDIOReader = ID(0x126)
|
||||
IDIOWriter = ID(0x127)
|
||||
IDStatus = ID(0x128)
|
||||
IDTokenReader = ID(0x129)
|
||||
IDTokenWriter = ID(0x12A)
|
||||
IDUtility = ID(0x12B)
|
||||
|
||||
IDRangeIEU32 = ID(0x130)
|
||||
IDRangeIIU32 = ID(0x131)
|
||||
@@ -832,17 +833,18 @@ var builtInsByID = [nBuiltInIDs]string{
|
||||
IDU32: "u32",
|
||||
IDU64: "u64",
|
||||
|
||||
IDBase: "base",
|
||||
IDBool: "bool",
|
||||
IDEmptyIOReader: "empty_io_reader",
|
||||
IDEmptyIOWriter: "empty_io_writer",
|
||||
IDEmptyStruct: "empty_struct",
|
||||
IDIOReader: "io_reader",
|
||||
IDIOWriter: "io_writer",
|
||||
IDStatus: "status",
|
||||
IDTokenReader: "token_reader",
|
||||
IDTokenWriter: "token_writer",
|
||||
IDUtility: "utility",
|
||||
IDBase: "base",
|
||||
IDBool: "bool",
|
||||
IDEmptyIOReader: "empty_io_reader",
|
||||
IDEmptyIOWriter: "empty_io_writer",
|
||||
IDEmptyStruct: "empty_struct",
|
||||
IDMoreInformation: "more_information",
|
||||
IDIOReader: "io_reader",
|
||||
IDIOWriter: "io_writer",
|
||||
IDStatus: "status",
|
||||
IDTokenReader: "token_reader",
|
||||
IDTokenWriter: "token_writer",
|
||||
IDUtility: "utility",
|
||||
|
||||
IDRangeIEU32: "range_ie_u32",
|
||||
IDRangeIIU32: "range_ii_u32",
|
||||
|
||||
Reference in new issue
Block a user