LibMedia: Demux videos with FFmpeg

This gives us access to container types other than Matroska, the
biggest one being MP4.
This commit is contained in:
Luke Wilde 2025-03-10 14:54:02 +00:00 committed by Alexander Kalenik
commit b789ba5e5f
Notes: github-actions[bot] 2025-03-13 18:34:55 +00:00
12 changed files with 358 additions and 29 deletions

View file

@ -0,0 +1,48 @@
/*
* Copyright (c) 2025, Luke Wilde <luke@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibMedia/FFmpeg/FFmpegDemuxer.h>
namespace Media::FFmpeg {
DecoderErrorOr<Vector<Track>> FFmpegDemuxer::get_tracks_for_type(TrackType type)
{
(void)type;
return DecoderError::format(DecoderErrorCategory::NotImplemented, "FFmpeg not available on this platform");
}
DecoderErrorOr<Optional<AK::Duration>> FFmpegDemuxer::seek_to_most_recent_keyframe(Track track, AK::Duration timestamp, Optional<AK::Duration> earliest_available_sample = OptionalNone())
{
(void)track;
(void)timestamp;
(void)earliest_available_sample;
return DecoderError::format(DecoderErrorCategory::NotImplemented, "FFmpeg not available on this platform");
}
DecoderErrorOr<AK::Duration> FFmpegDemuxer::duration()
{
return DecoderError::format(DecoderErrorCategory::NotImplemented, "FFmpeg not available on this platform");
}
DecoderErrorOr<CodecID> FFmpegDemuxer::get_codec_id_for_track(Track track)
{
(void)track;
return DecoderError::format(DecoderErrorCategory::NotImplemented, "FFmpeg not available on this platform");
}
DecoderErrorOr<ReadonlyBytes> FFmpegDemuxer::get_codec_initialization_data_for_track(Track track)
{
(void)track;
return DecoderError::format(DecoderErrorCategory::NotImplemented, "FFmpeg not available on this platform");
}
DecoderErrorOr<Sample> FFmpegDemuxer::get_next_sample_for_track(Track track)
{
(void)track;
return DecoderError::format(DecoderErrorCategory::NotImplemented, "FFmpeg not available on this platform");
}
}