1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

LibVideo: Add the concept of codec identifiers

This is required for detecting which decoder should be used.
Only a small subset of codecs identifiers is added for now
This commit is contained in:
Stephan Vedder 2023-11-22 14:48:06 +01:00 committed by Luke Wilde
parent ff48b7333c
commit 1f55cc942d
5 changed files with 135 additions and 2 deletions

View file

@ -8,6 +8,7 @@
#include <AK/NonnullOwnPtr.h>
#include <LibCore/EventReceiver.h>
#include <LibVideo/CodecID.h>
#include <LibVideo/DecoderError.h>
#include <LibVideo/Sample.h>
#include <LibVideo/Track.h>
@ -28,6 +29,8 @@ public:
return sample.release_nonnull<VideoSample>();
}
virtual DecoderErrorOr<CodecID> get_codec_id_for_track(Track track) = 0;
// Returns the timestamp of the keyframe that was seeked to.
// The value is `Optional` to allow the demuxer to decide not to seek so that it can keep its position
// in the case that the timestamp is closer to the current time than the nearest keyframe.