mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:17:34 +00:00
LibVideo: Allow the VP9 decoder to queue multiple frames
Frames will now be queued for retrieval by the user of the decoder. When the end of the current queue is reached, a DecoderError of category NeedsMoreInput will be emitted, allowing the caller to react by displaying what was previously retrieved for sending more samples.
This commit is contained in:
parent
993385f18d
commit
72ed286e16
5 changed files with 76 additions and 39 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/Queue.h>
|
||||
#include <AK/Span.h>
|
||||
#include <LibVideo/Color/CodingIndependentCodePoints.h>
|
||||
#include <LibVideo/DecoderError.h>
|
||||
|
@ -36,6 +37,7 @@ private:
|
|||
typedef i32 Intermediate;
|
||||
|
||||
DecoderErrorOr<void> decode_frame(Span<u8 const>);
|
||||
DecoderErrorOr<void> create_video_frame();
|
||||
|
||||
DecoderErrorOr<void> allocate_buffers();
|
||||
Vector<Intermediate>& get_temp_buffer(u8 plane);
|
||||
|
@ -167,6 +169,8 @@ private:
|
|||
Vector<Intermediate> intermediate[3];
|
||||
Vector<u16> output[3];
|
||||
} m_buffers;
|
||||
|
||||
Queue<NonnullOwnPtr<VideoFrame>, 1> m_video_frame_queue;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue