mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibVideo: Add a forwarding header
And change some non-plain structs to classes for consistency.
This commit is contained in:
parent
918ed5c920
commit
7132047c92
4 changed files with 24 additions and 5 deletions
|
@ -10,12 +10,11 @@
|
||||||
#include <AK/Error.h>
|
#include <AK/Error.h>
|
||||||
#include <AK/Format.h>
|
#include <AK/Format.h>
|
||||||
#include <AK/SourceLocation.h>
|
#include <AK/SourceLocation.h>
|
||||||
|
#include <LibVideo/Forward.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
namespace Video {
|
namespace Video {
|
||||||
|
|
||||||
struct DecoderError;
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using DecoderErrorOr = ErrorOr<T, DecoderError>;
|
using DecoderErrorOr = ErrorOr<T, DecoderError>;
|
||||||
|
|
||||||
|
@ -33,7 +32,7 @@ enum class DecoderErrorCategory : u32 {
|
||||||
NotImplemented,
|
NotImplemented,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DecoderError {
|
class DecoderError {
|
||||||
public:
|
public:
|
||||||
static DecoderError with_description(DecoderErrorCategory category, StringView description)
|
static DecoderError with_description(DecoderErrorCategory category, StringView description)
|
||||||
{
|
{
|
||||||
|
|
19
Userland/Libraries/LibVideo/Forward.h
Normal file
19
Userland/Libraries/LibVideo/Forward.h
Normal 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;
|
||||||
|
|
||||||
|
}
|
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
namespace Video {
|
namespace Video {
|
||||||
|
|
||||||
struct FrameQueueItem {
|
class FrameQueueItem {
|
||||||
|
public:
|
||||||
static constexpr Time no_timestamp = Time::min();
|
static constexpr Time no_timestamp = Time::min();
|
||||||
|
|
||||||
enum class Type {
|
enum class Type {
|
||||||
|
|
|
@ -20,7 +20,7 @@ enum class TrackType : u32 {
|
||||||
Subtitles,
|
Subtitles,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Track {
|
class Track {
|
||||||
struct VideoData {
|
struct VideoData {
|
||||||
Time duration {};
|
Time duration {};
|
||||||
u64 pixel_width { 0 };
|
u64 pixel_width { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue