1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00
serenity/Userland/Libraries/LibGfx/ImageFormats/ISOBMFF/Reader.h
Zaggy1024 66c9696687 LibGfx: Add initial ISO BMFF parsing and a utility to print file info
Currently, the `isobmff` utility will only print the media file type
info from the FileTypeBox (major brand and compatible brands), as well
as the names and sizes of top-level boxes.
2023-07-27 12:02:37 +01:00

36 lines
657 B
C++

/*
* Copyright (c) 2023, Gregory Bertilson <Zaggy1024@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/MaybeOwned.h>
#include <AK/Stream.h>
#include "Boxes.h"
namespace Gfx::ISOBMFF {
class Reader {
public:
static ErrorOr<Reader> create(MaybeOwned<SeekableStream> stream);
ErrorOr<BoxList> read_entire_file();
ErrorOr<BrandIdentifier> get_major_brand();
ErrorOr<Vector<BrandIdentifier>> get_minor_brands();
private:
Reader(MaybeOwned<SeekableStream> stream)
: m_stream(move(stream))
{
}
ErrorOr<void> parse_initial_data();
MaybeOwned<SeekableStream> m_stream;
};
}