mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-17 15:02:24 +00:00
LibMedia/Matroska: Move the definition get_codec_id_for_track up
The function is separated from the string-to-enum function it uses, and the order is also inconsistent with header.
This commit is contained in:
parent
55fda2068b
commit
bf1e0fac94
Notes:
sideshowbarker
2024-07-16 23:34:49 +09:00
Author: https://github.com/Zaggy1024
Commit: bf1e0fac94
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/230
Reviewed-by: https://github.com/ADKaster
1 changed files with 6 additions and 6 deletions
|
@ -98,6 +98,12 @@ CodecID MatroskaDemuxer::get_codec_id_for_string(FlyString const& codec_id)
|
||||||
return CodecID::Unknown;
|
return CodecID::Unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DecoderErrorOr<CodecID> MatroskaDemuxer::get_codec_id_for_track(Track track)
|
||||||
|
{
|
||||||
|
auto codec_id = TRY(m_reader.track_for_track_number(track.identifier()))->codec_id();
|
||||||
|
return get_codec_id_for_string(codec_id);
|
||||||
|
}
|
||||||
|
|
||||||
DecoderErrorOr<Optional<Duration>> MatroskaDemuxer::seek_to_most_recent_keyframe(Track track, Duration timestamp, Optional<Duration> earliest_available_sample)
|
DecoderErrorOr<Optional<Duration>> MatroskaDemuxer::seek_to_most_recent_keyframe(Track track, Duration timestamp, Optional<Duration> earliest_available_sample)
|
||||||
{
|
{
|
||||||
// Removing the track status will cause us to start from the beginning.
|
// Removing the track status will cause us to start from the beginning.
|
||||||
|
@ -146,10 +152,4 @@ DecoderErrorOr<Duration> MatroskaDemuxer::duration()
|
||||||
return duration.value_or(Duration::zero());
|
return duration.value_or(Duration::zero());
|
||||||
}
|
}
|
||||||
|
|
||||||
DecoderErrorOr<CodecID> MatroskaDemuxer::get_codec_id_for_track(Track track)
|
|
||||||
{
|
|
||||||
auto codec_id = TRY(m_reader.track_for_track_number(track.identifier()))->codec_id();
|
|
||||||
return get_codec_id_for_string(codec_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue