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

FlacLoader: Parse SEEKTABLE header

Populates m_seektable attribute with FlacSeekPoints.

For more information see:
https://datatracker.ietf.org/doc/html/draft-ietf-cellar-flac#section-11.13

Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
This commit is contained in:
Max Trussell 2021-12-21 15:07:49 -08:00 committed by Andreas Kling
parent d7c7e6e496
commit 346696ffbb
3 changed files with 32 additions and 2 deletions

View file

@ -83,6 +83,7 @@ private:
MaybeLoaderError decode_residual(Vector<i32>& decoded, FlacSubframeHeader& subframe, BigEndianInputBitStream& bit_input);
// decode a single rice partition that has its own rice parameter
ALWAYS_INLINE ErrorOr<Vector<i32>, LoaderError> decode_rice_partition(u8 partition_type, u32 partitions, u32 partition_index, FlacSubframeHeader& subframe, BigEndianInputBitStream& bit_input);
MaybeLoaderError load_seektable(FlacRawMetadataBlock&);
// Converters for special coding used in frame headers
ALWAYS_INLINE ErrorOr<u32, LoaderError> convert_sample_count_code(u8 sample_count_code);
@ -113,6 +114,7 @@ private:
// Whatever the last get_more_samples() call couldn't return gets stored here.
Vector<Sample, FLAC_BUFFER_SIZE> m_unread_data;
u64 m_current_sample_or_frame { 0 };
Vector<FlacSeekPoint> m_seektable;
};
}