/* * Copyright (c) 2022, Gregory Bertilson * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include "DecoderError.h" #include "VideoFrame.h" namespace Video { class VideoDecoder { public: virtual ~VideoDecoder() {}; virtual DecoderErrorOr receive_sample(ReadonlyBytes sample) = 0; DecoderErrorOr receive_sample(ByteBuffer const& sample) { return receive_sample(sample.span()); } virtual DecoderErrorOr> get_decoded_frame() = 0; }; }