mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibMedia: Read the Matroska SamplingFrequency element
This commit is contained in:
parent
364b422ae0
commit
180f2a07f1
Notes:
github-actions[bot]
2025-11-21 10:04:21 +00:00
Author: https://github.com/Zaggy1024
Commit: 180f2a07f1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6685
Reviewed-by: https://github.com/gmta ✅
1 changed files with 5 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ constexpr u32 BITS_PER_CHANNEL_ID = 0x55B2;
|
|||
|
||||
// Audio
|
||||
constexpr u32 CHANNELS_ID = 0x9F;
|
||||
constexpr u32 SAMPLING_FREQUENCY_ID = 0xB5;
|
||||
constexpr u32 BIT_DEPTH_ID = 0x6264;
|
||||
|
||||
// Clusters
|
||||
|
|
@ -449,6 +450,10 @@ static DecoderErrorOr<TrackEntry::AudioTrack> parse_audio_track_information(Stre
|
|||
audio_track.channels = TRY_READ(streamer.read_u64());
|
||||
dbgln_if(MATROSKA_TRACE_DEBUG, "Read AudioTrack's Channels attribute: {}", audio_track.channels);
|
||||
break;
|
||||
case SAMPLING_FREQUENCY_ID:
|
||||
audio_track.sampling_frequency = TRY_READ(streamer.read_float());
|
||||
dbgln_if(MATROSKA_TRACE_DEBUG, "Read AudioTrack's SamplingFrequency attribute: {}", audio_track.channels);
|
||||
break;
|
||||
case BIT_DEPTH_ID:
|
||||
audio_track.bit_depth = TRY_READ(streamer.read_u64());
|
||||
dbgln_if(MATROSKA_TRACE_DEBUG, "Read AudioTrack's BitDepth attribute: {}", audio_track.bit_depth);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue