StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
item.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/clonable.hxx>
45
46#include <cstdint>
47
55 class Frame;
56 class Packet;
57 class Pipe;
58}
59
67 class Decoder;
68 class Demuxer;
69 class Encoder;
70 class Frame;
71 class Muxer;
72 class Packet;
73 class Step;
74
81 namespace Filter {
82 class FFmpeg;
83 }
84
91 class STORMBYTE_MULTIMEDIA_PUBLIC Item: protected Clonable<Item, std::shared_ptr<Item>> {
92 friend class Backend::Pipeline::Frame;
93 friend class Backend::Pipeline::Packet;
94 friend class Backend::Pipeline::Pipe;
95 friend class Decoder;
96 friend class Demuxer;
97 friend class Encoder;
98 friend class Filter::FFmpeg;
99 friend class Frame;
100 friend class Muxer;
101 friend class Packet;
102 friend class Step;
103
104 public:
105 using StormByte::Clonable<Item, std::shared_ptr<Item>>::PointerType;
106
115 virtual ~Item() noexcept = default;
116
130 Kind Kind() const noexcept {
131 return m_kind;
132 }
133
138 enum StormByte::Multimedia::Type Type() const noexcept {
139 return m_type;
140 }
141
146 int Track() const noexcept {
147 return m_track;
148 }
149
154 enum Producer Producer() const noexcept {
155 return m_producer;
156 }
157
162 protected:
172 Item(const Item& other) noexcept = default;
173
178 Item(Item&& other) noexcept = default;
179
185 Item& operator=(const Item& other) noexcept = default;
186
192 Item& operator=(Item&& other) noexcept = default;
193
198 private:
206 Item(int track, enum StormByte::Multimedia::Type type, enum Kind kind, enum Producer producer) noexcept
207 : m_track(track), m_type(type), m_kind(kind), m_producer(producer) {}
208
209 int m_track;
210 enum StormByte::Multimedia::Type m_type;
211 enum Kind m_kind;
212 enum Producer m_producer;
213 };
214}
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
Abstract base for every StormByte Multimedia filter.
Definition ffmpeg.hxx:226
One decoded access unit.
Definition frame.hxx:76
Facade shared by Frame and Packet.
Definition item.hxx:91
virtual ~Item() noexcept=default
Destructor.
enum Producer Producer() const noexcept
Stage that created this unit.
Definition item.hxx:154
Item & operator=(const Item &other) noexcept=default
Copy assignment.
enum StormByte::Multimedia::Type Type() const noexcept
Media of this access unit.
Definition item.hxx:138
Item(Item &&other) noexcept=default
Move constructor.
int Track() const noexcept
Origin track index.
Definition item.hxx:146
Item(const Item &other) noexcept=default
Copy constructor.
Item & operator=(Item &&other) noexcept=default
Move assignment.
Writes interleaved packets to a destination container.
Definition muxer.hxx:150
One compressed access unit.
Definition packet.hxx:76
One stage with a Backend::Pipeline::Pipe (in / out).
Definition step.hxx:114
Frame and packet steps attached to a job or a raw pipeline.
Multimedia-owned pipeline stages and unit holders.
Demux / decode / filter / encode / mux types.
Producer
Definition typedefs.hxx:105
Kind
Definition typedefs.hxx:78
@ Frame
StormByte::Multimedia::Pipeline::Frame
@ Packet
StormByte::Multimedia::Pipeline::Packet
Type
Kind of media stream or codec.
Definition type.hxx:55
#define STORMBYTE_MULTIMEDIA_PUBLIC
Imported symbol.
Definition visibility.h:47