StormByte C++ Library: Multimedia module 0.0.9999
StormByte-Multimedia is a StormByte library module for parsing configuration files
Loading...
Searching...
No Matches
subtitle.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
44
45#include <map>
46#include <string>
47#include <utility>
48
61 public:
70 constexpr Subtitle() noexcept
71 : Base(StormByte::Multimedia::Type::Subtitle), m_codec(nullptr) {}
72
77 Subtitle(const Subtitle& other) noexcept = default;
78
83 Subtitle(Subtitle&& other) noexcept = default;
84
88 virtual ~Subtitle() noexcept override = default;
89
95 Subtitle& operator=(const Subtitle& other) noexcept = default;
96
102 Subtitle& operator=(Subtitle&& other) noexcept = default;
103
112 inline PointerType Clone() const override {
113 return MakePointer<Subtitle>(*this);
114 }
115
120 inline PointerType Move() override {
121 return MakePointer<Subtitle>(std::move(*this));
122 }
123
133 inline const StormByte::Multimedia::Codec* Codec() const noexcept {
134 return m_codec;
135 }
136
141 inline void Codec(const StormByte::Multimedia::Codec& codec) noexcept {
142 m_codec = &codec;
143 }
144
149 inline const std::map<std::string, std::string>& FineTune() const noexcept {
150 return m_fineTune;
151 }
152
157 inline void FineTune(std::map<std::string, std::string> options) noexcept {
158 m_fineTune = std::move(options);
159 }
160
165 private:
166 const StormByte::Multimedia::Codec* m_codec;
167 std::map<std::string, std::string> m_fineTune;
168 };
169}
Immutable codec identity owned by Registry.
Definition codec.hxx:58
Common destination-stream identity.
Definition base.hxx:90
const StormByte::Multimedia::Codec * Codec() const noexcept
Destination codec.
Definition subtitle.hxx:133
virtual ~Subtitle() noexcept override=default
Destructor.
PointerType Move() override
Move into a new pointer.
Definition subtitle.hxx:120
void FineTune(std::map< std::string, std::string > options) noexcept
Replaces the vendor dict.
Definition subtitle.hxx:157
const std::map< std::string, std::string > & FineTune() const noexcept
Vendor leftovers.
Definition subtitle.hxx:149
Subtitle(const Subtitle &other) noexcept=default
Copy constructor.
Subtitle(Subtitle &&other) noexcept=default
Move constructor.
void Codec(const StormByte::Multimedia::Codec &codec) noexcept
Sets the destination codec (Encode).
Definition subtitle.hxx:141
constexpr Subtitle() noexcept
Empty subtitle config (Remux until Codec is set).
Definition subtitle.hxx:70
Per-track intention stored by Plan.
Type
Kind of media stream or codec.
Definition type.hxx:55
#define STORMBYTE_MULTIMEDIA_PUBLIC
Imported symbol.
Definition visibility.h:47