mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-07 20:31:04 +03:00
LibGfx/ISOBMFF: Add JPEG2000UUIDInfoBox
This commit is contained in:
parent
214ff799ce
commit
7d137dc480
Notes:
sideshowbarker
2024-07-16 23:08:48 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/7d137dc480 Pull-request: https://github.com/SerenityOS/serenity/pull/23682 Reviewed-by: https://github.com/LucasChollet Reviewed-by: https://github.com/Zaggy1024 Reviewed-by: https://github.com/timschumi ✅
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -44,4 +44,8 @@ struct JPEG2000SignatureBox final : public Box {
|
||||
u32 signature { 0 };
|
||||
};
|
||||
|
||||
struct JPEG2000UUIDInfoBox final : public SuperBox {
|
||||
BOX_SUBTYPE(JPEG2000UUIDInfoBox);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -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 {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user