mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 09:37:44 +00:00
LibVideo: Make VP9::Decoder a subclass of a new abstract VideoDecoder
This will allow other decoders to be used in place of VP9::Decoder when new video decoders are implemented, such as AV1.
This commit is contained in:
parent
3720f66bb1
commit
2b4b6c5613
4 changed files with 34 additions and 12 deletions
|
@ -13,23 +13,24 @@
|
|||
#include <AK/Span.h>
|
||||
#include <LibVideo/Color/CodingIndependentCodePoints.h>
|
||||
#include <LibVideo/DecoderError.h>
|
||||
#include <LibVideo/VideoDecoder.h>
|
||||
#include <LibVideo/VideoFrame.h>
|
||||
|
||||
#include "Parser.h"
|
||||
|
||||
namespace Video::VP9 {
|
||||
|
||||
class Decoder {
|
||||
class Decoder : public VideoDecoder {
|
||||
friend class Parser;
|
||||
|
||||
public:
|
||||
Decoder();
|
||||
~Decoder() override { }
|
||||
/* (8.1) General */
|
||||
DecoderErrorOr<void> receive_sample(Span<u8 const>);
|
||||
DecoderErrorOr<void> receive_sample(ByteBuffer const&);
|
||||
DecoderErrorOr<void> receive_sample(Span<u8 const>) override;
|
||||
void dump_frame_info();
|
||||
|
||||
DecoderErrorOr<NonnullOwnPtr<VideoFrame>> get_decoded_frame();
|
||||
DecoderErrorOr<NonnullOwnPtr<VideoFrame>> get_decoded_frame() override;
|
||||
|
||||
private:
|
||||
typedef i32 Intermediate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue