diff options
-rw-r--r-- | Userland/Libraries/LibVideo/DecoderError.h | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibVideo/Forward.h | 19 | ||||
-rw-r--r-- | Userland/Libraries/LibVideo/PlaybackManager.h | 3 | ||||
-rw-r--r-- | Userland/Libraries/LibVideo/Track.h | 2 |
4 files changed, 24 insertions, 5 deletions
diff --git a/Userland/Libraries/LibVideo/DecoderError.h b/Userland/Libraries/LibVideo/DecoderError.h index c66b7717ea..bca03e1c18 100644 --- a/Userland/Libraries/LibVideo/DecoderError.h +++ b/Userland/Libraries/LibVideo/DecoderError.h @@ -10,12 +10,11 @@ #include <AK/Error.h> #include <AK/Format.h> #include <AK/SourceLocation.h> +#include <LibVideo/Forward.h> #include <errno.h> namespace Video { -struct DecoderError; - template<typename T> using DecoderErrorOr = ErrorOr<T, DecoderError>; @@ -33,7 +32,7 @@ enum class DecoderErrorCategory : u32 { NotImplemented, }; -struct DecoderError { +class DecoderError { public: static DecoderError with_description(DecoderErrorCategory category, StringView description) { diff --git a/Userland/Libraries/LibVideo/Forward.h b/Userland/Libraries/LibVideo/Forward.h new file mode 100644 index 0000000000..6eb99471f3 --- /dev/null +++ b/Userland/Libraries/LibVideo/Forward.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +namespace Video { + +class DecoderError; +class FrameQueueItem; +class PlaybackManager; +class Sample; +class Track; +class VideoDecoder; +class VideoFrame; + +} diff --git a/Userland/Libraries/LibVideo/PlaybackManager.h b/Userland/Libraries/LibVideo/PlaybackManager.h index 92c03d5131..813101ba6f 100644 --- a/Userland/Libraries/LibVideo/PlaybackManager.h +++ b/Userland/Libraries/LibVideo/PlaybackManager.h @@ -23,7 +23,8 @@ namespace Video { -struct FrameQueueItem { +class FrameQueueItem { +public: static constexpr Time no_timestamp = Time::min(); enum class Type { diff --git a/Userland/Libraries/LibVideo/Track.h b/Userland/Libraries/LibVideo/Track.h index 476ff51314..4653cc22fc 100644 --- a/Userland/Libraries/LibVideo/Track.h +++ b/Userland/Libraries/LibVideo/Track.h @@ -20,7 +20,7 @@ enum class TrackType : u32 { Subtitles, }; -struct Track { +class Track { struct VideoData { Time duration {}; u64 pixel_width { 0 }; |