StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
typedefs.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Multimedia.
5 *
6 * StormByte-Multimedia original source is dual-licensed:
7 *
8 * 1. GNU Lesser General Public License v3.0 (or later)
9 * You may redistribute and/or modify this file under the terms of the
10 * GNU Lesser General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option)
12 * any later version.
13 *
14 * 2. Commercial license
15 * Alternatively, this file may be used under the terms of a commercial
16 * license agreement with the copyright holder
17 * (David C. Manuelda <StormByte@gmail.com>).
18 *
19 * Both licenses apply only to original StormByte-Multimedia source in this
20 * file. Third-party components — including FFmpeg and embedded trained data —
21 * remain under their own licenses and are not covered by the commercial grant.
22 *
23 * Neither license grants any patent rights. Any patent licenses required
24 * to use this software or third-party components must be obtained separately
25 * from the patent holders.
26 *
27 * StormByte-Multimedia is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU Lesser General Public License for more details.
31 *
32 * You should have received a copy of the GNU Lesser General Public License
33 * version 3 along with StormByte-Multimedia. If not, see
34 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
35 *
36 * SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-StormByte-Commercial
37 */
38
39#pragma once
40
41#include <StormByte/bitmask.hxx>
42#include <StormByte/expected.hxx>
45#include <StormByte/type_traits.hxx>
46
47#include <cstdint>
48#include <memory>
49
54namespace StormByte::Buffer {
55 template<Type::MoveConstructible T>
56 class Sink;
57}
58
66 using CheckResult = StormByte::Expected<void, PlanException>;
67
78 enum class Kind: std::uint8_t {
79 Packet = 1 << 0,
80 Frame = 1 << 1
81 };
82
88 constexpr const char* ToString(Kind kind) noexcept {
89 switch (kind) {
90 case Kind::Frame: return "Frame";
91 case Kind::Packet: return "Packet";
92 default: return "Invalid";
93 }
94 }
95
105 enum class Producer: std::uint8_t {
106 Demuxer,
107 Decoder,
108 Remuxer,
109 Filter,
110 Route,
111 Filters,
112 Encoder,
113 Muxer
114 };
115
121 constexpr const char* ToString(Producer producer) noexcept {
122 switch (producer) {
123 case Producer::Demuxer: return "Demuxer";
124 case Producer::Decoder: return "Decoder";
125 case Producer::Remuxer: return "Remuxer";
126 case Producer::Filter: return "Filter";
127 case Producer::Route: return "Route";
128 case Producer::Filters: return "Filters";
129 case Producer::Encoder: return "Encoder";
130 case Producer::Muxer: return "Muxer";
131 default: return "Invalid";
132 }
133 }
134
148 class STORMBYTE_MULTIMEDIA_PUBLIC Kinds: public StormByte::Bitmask<Kinds, Kind> {
149 public:
150 using StormByte::Bitmask<Kinds, Kind>::Bitmask;
151 };
152
211 enum class State: std::uint8_t {
212 Created,
213 Ready,
214 Stopping,
215 Stopped,
216 Failed
217 };
218}
Definition typedefs.hxx:56
Decodes packets of one origin track into frames.
Definition decoder.hxx:141
Reads interleaved packets from a File origin.
Definition demuxer.hxx:121
Encodes frames of one output track into packets.
Definition encoder.hxx:103
Optional facade: Between stretches, Add filters, Close.
Definition filters.hxx:76
One decoded access unit.
Definition frame.hxx:76
Bitmask of Kind.
Definition typedefs.hxx:148
Writes interleaved packets to a destination container.
Definition muxer.hxx:150
One compressed access unit.
Definition packet.hxx:76
Forwards compressed packets of one origin track to the muxer.
Definition remuxer.hxx:88
Owns the filter chain of one origin track and two ends.
Definition route.hxx:90
Frame and packet steps attached to a job or a raw pipeline.
Hopper and Sink live in StormByte-Buffer.
Demux / decode / filter / encode / mux types.
State
Definition typedefs.hxx:211
Producer
Definition typedefs.hxx:105
Kind
Definition typedefs.hxx:78
@ Frame
StormByte::Multimedia::Pipeline::Frame
@ Packet
StormByte::Multimedia::Pipeline::Packet
constexpr const char * ToString(Kind kind) noexcept
Converts a single Kind flag to a string literal.
Definition typedefs.hxx:88
StormByte::Expected< void, PlanException > CheckResult
Outcome of Plan::Check.
Definition typedefs.hxx:66
@ Stopped
Open succeeded; Run has not started, or OnStart declined.
#define STORMBYTE_MULTIMEDIA_PUBLIC
Imported symbol.
Definition visibility.h:47