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