mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +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
Notes:
sideshowbarker
2024-07-17 06:35:16 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/7132047c92 Pull-request: https://github.com/SerenityOS/serenity/pull/18264
4 changed files with 24 additions and 5 deletions
|
@ -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)
|
||||
{
|
||||
|
|
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 {
|
||||
|
||||
struct FrameQueueItem {
|
||||
class FrameQueueItem {
|
||||
public:
|
||||
static constexpr Time no_timestamp = Time::min();
|
||||
|
||||
enum class Type {
|
||||
|
|
|
@ -20,7 +20,7 @@ enum class TrackType : u32 {
|
|||
Subtitles,
|
||||
};
|
||||
|
||||
struct Track {
|
||||
class Track {
|
||||
struct VideoData {
|
||||
Time duration {};
|
||||
u64 pixel_width { 0 };
|
||||
|
|
Loading…
Reference in a new issue