/* * Copyright (c) 2023, Gregory Bertilson * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include ErrorOr serenity_main(Main::Arguments arguments) { Core::ArgsParser args_parser; StringView path; args_parser.add_positional_argument(path, "Path to ISO Base Media File Format file", "FILE"); args_parser.parse(arguments); auto file = TRY(Core::MappedFile::map(path)); auto reader = TRY(Gfx::ISOBMFF::Reader::create(TRY(try_make(file->bytes())))); auto boxes = TRY(reader.read_entire_file()); for (auto& box : boxes) box->dump(); return 0; }