LibGfx/ISOBMFF: Add JPEG2000UUIDInfoBox

This commit is contained in:
Nico Weber 2024-03-22 14:49:21 -04:00 committed by Tim Schumacher
parent 214ff799ce
commit 7d137dc480
Notes: sideshowbarker 2024-07-16 23:08:48 +09:00
3 changed files with 25 additions and 0 deletions

View File

@ -99,4 +99,23 @@ void JPEG2000SignatureBox::dump(String const& prepend) const
outln("{}- signature = {:#08x}", prepend, signature);
}
ErrorOr<void> JPEG2000UUIDInfoBox::read_from_stream(BoxStream& stream)
{
auto make_subbox = [](BoxType type, BoxStream&) -> ErrorOr<Optional<NonnullOwnPtr<Box>>> {
switch (type) {
default:
return OptionalNone {};
}
};
TRY(SuperBox::read_from_stream(stream, move(make_subbox)));
return {};
}
void JPEG2000UUIDInfoBox::dump(String const& prepend) const
{
SuperBox::dump(prepend);
}
}

View File

@ -44,4 +44,8 @@ struct JPEG2000SignatureBox final : public Box {
u32 signature { 0 };
};
struct JPEG2000UUIDInfoBox final : public SuperBox {
BOX_SUBTYPE(JPEG2000UUIDInfoBox);
};
}

View File

@ -31,6 +31,8 @@ ErrorOr<BoxList> Reader::read_entire_file()
return TRY(JPEG2000HeaderBox::create_from_stream(stream));
case BoxType::JPEG2000SignatureBox:
return TRY(JPEG2000SignatureBox::create_from_stream(stream));
case BoxType::JPEG2000UUIDInfoBox:
return TRY(JPEG2000UUIDInfoBox::create_from_stream(stream));
default:
return OptionalNone {};
}