Format
#include <icy/av/format.h>
struct FormatDefined in src/av/include/icy/av/format.h:30
A format bundles the preferred default audio and video codec settings for a named container such as MP4, MKV, or WAV.
Public Attributes
| Return | Name | Description |
|---|---|---|
std::string | name | Base Format Variables. |
std::string | id | The short name of this format. |
VideoCodec | video | The video codec. |
AudioCodec | audio | The audio codec. |
int | priority | The priority this format will be displayed on the list. |
name
std::string nameDefined in src/av/include/icy/av/format.h:43
Base Format Variables.
The display name of this format.
id
std::string idDefined in src/av/include/icy/av/format.h:44
The short name of this format.
video
VideoCodec videoType: VideoCodec
Defined in src/av/include/icy/av/format.h:46
The video codec.
audio
AudioCodec audioType: AudioCodec
Defined in src/av/include/icy/av/format.h:47
The audio codec.
priority
int priorityDefined in src/av/include/icy/av/format.h:49
The priority this format will be displayed on the list.
Public Methods
| Return | Name | Description |
|---|---|---|
Format | Ctors/Dtors. | |
Format | Construct a multiplex (audio + video) format. | |
Format | Construct a video-only format. | |
Format | Construct an audio-only format. | |
Format | ||
Format & | operator= | Defaulted assignment operator. |
~Format virtual | Defaulted destructor. | |
Type | type const | Return the media type (None, Video, Audio, or Multiplex) derived from which codecs are enabled. |
std::string | toString virtual const | |
void | print virtual | Print a multi-line human-readable description to the given stream. |
Format
Format()Defined in src/av/include/icy/av/format.h:56
Ctors/Dtors.
Construct an empty format with no codecs enabled.
Format
Format(const std::string & name, const std::string & id, const VideoCodec & video, const AudioCodec & audio, int priority = 0)Defined in src/av/include/icy/av/format.h:64
Construct a multiplex (audio + video) format.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | The display name of the format. |
id | const std::string & | The short FFmpeg muxer ID (e.g. "mp4"). |
video | const VideoCodec & | The video codec parameters. |
audio | const AudioCodec & | The audio codec parameters. |
priority | int | Sort priority; higher values appear first. |
Format
Format(const std::string & name, const std::string & id, const VideoCodec & video, int priority = 0)Defined in src/av/include/icy/av/format.h:73
Construct a video-only format.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | The display name of the format. |
id | const std::string & | The short FFmpeg muxer ID. |
video | const VideoCodec & | The video codec parameters. |
priority | int | Sort priority; higher values appear first. |
Format
Format(const std::string & name, const std::string & id, const AudioCodec & audio, int priority = 0)Defined in src/av/include/icy/av/format.h:82
Construct an audio-only format.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | const std::string & | The display name of the format. |
id | const std::string & | The short FFmpeg muxer ID. |
audio | const AudioCodec & | The audio codec parameters. |
priority | int | Sort priority; higher values appear first. |
Format
Format(const Format & r)Defined in src/av/include/icy/av/format.h:87
operator=
Format & operator=(const Format &) = defaultDefined in src/av/include/icy/av/format.h:88
Defaulted assignment operator.
~Format
virtual
virtual ~Format() = defaultDefined in src/av/include/icy/av/format.h:90
Defaulted destructor.
type
const
Type type() constDefined in src/av/include/icy/av/format.h:93
Return the media type (None, Video, Audio, or Multiplex) derived from which codecs are enabled.
toString
virtual const
virtual std::string toString() constDefined in src/av/include/icy/av/format.h:96
Returns
A compact string representation of the format and its enabled codecs.
virtual
virtual void print(std::ostream & ost)Defined in src/av/include/icy/av/format.h:100
Print a multi-line human-readable description to the given stream.
Parameters
| Parameter | Type | Description |
|---|---|---|
ost | std::ostream & | The output stream to write to. |
Public Static Methods
| Return | Name | Description |
|---|---|---|
bool | preferable static inline | Comparator returning true if first has higher priority than second. |
preferable
static inline
static inline bool preferable(const Format & first, const Format & second)Defined in src/av/include/icy/av/format.h:106
Comparator returning true if first has higher priority than second.
Returns
True if first.priority > second.priority.
Parameters
| Parameter | Type | Description |
|---|---|---|
first | const Format & | The format to compare. |
second | const Format & | The format to compare against. |
Public Types
| Name | Description |
|---|---|
Type |
Type
enum TypeDefined in src/av/include/icy/av/format.h:32
| Value | Description |
|---|---|
None | |
Video | video only |
Audio | audio only |
Multiplex | both video & audio |
