LibVideo: Add a forwarding header

And change some non-plain structs to classes for consistency.
This commit is contained in:
Timothy Flynn 2023-04-09 11:59:35 -04:00 committed by Linus Groh
parent 918ed5c920
commit 7132047c92
Notes: sideshowbarker 2024-07-17 06:35:16 +09:00
4 changed files with 24 additions and 5 deletions

View file

@ -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)
{

View file

@ -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;
}

View file

@ -23,7 +23,8 @@
namespace Video {
struct FrameQueueItem {
class FrameQueueItem {
public:
static constexpr Time no_timestamp = Time::min();
enum class Type {

View file

@ -20,7 +20,7 @@ enum class TrackType : u32 {
Subtitles,
};
struct Track {
class Track {
struct VideoData {
Time duration {};
u64 pixel_width { 0 };