/* * Copyright (c) 2023, Gregory Bertilson * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include "Boxes.h" namespace Gfx::ISOBMFF { class Reader { public: static ErrorOr create(MaybeOwned stream); static ErrorOr create(MaybeOwned stream); ErrorOr read_entire_file(); using BoxCallback = Function>>(BoxType, BoxStream&)>; ErrorOr read_entire_file(BoxCallback); private: Reader(MaybeOwned stream) : m_box_stream(move(stream)) { } MaybeOwned m_box_stream; }; }