#include <icy/av/format.h>Defines a media container format which is available through the FormatRegistry for encoding or decoding.
A format bundles the preferred default audio and video codec settings for a named container such as MP4, MKV, or WAV.
| 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. |
std::string nameBase Format Variables.
The display name of this format.
std::string idThe short name of this format.
VideoCodec videoThe video codec.
AudioCodec audioThe audio codec.
int priorityThe priority this format will be displayed on the list.
| 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 | ||
Type | type const | Return the media type (None, Video, Audio, or Multiplex) derived from which codecs are enabled. |
std::string | toString virtual const | #### Returns |
void | print virtual | Print a multi-line human-readable description to the given stream. |
Format()Ctors/Dtors.
Construct an empty format with no codecs enabled.
Format(const std::string & name, const std::string & id, const VideoCodec & video, const AudioCodec & audio, int priority)Construct a multiplex (audio + video) format.
name The display name of the format.
id The short FFmpeg muxer ID (e.g. "mp4").
video The video codec parameters.
audio The audio codec parameters.
priority Sort priority; higher values appear first.
Format(const std::string & name, const std::string & id, const VideoCodec & video, int priority)Construct a video-only format.
name The display name of the format.
id The short FFmpeg muxer ID.
video The video codec parameters.
priority Sort priority; higher values appear first.
Format(const std::string & name, const std::string & id, const AudioCodec & audio, int priority)Construct an audio-only format.
name The display name of the format.
id The short FFmpeg muxer ID.
audio The audio codec parameters.
priority Sort priority; higher values appear first.
Format(const Format & r)const
Type type() constReturn the media type (None, Video, Audio, or Multiplex) derived from which codecs are enabled.
virtual const
virtual std::string toString() constA compact string representation of the format and its enabled codecs.
virtual
virtual void print(std::ostream & ost)Print a multi-line human-readable description to the given stream.
ost The output stream to write to.| Return | Name | Description |
|---|---|---|
bool | preferable static inline | Comparator returning true if first has higher priority than second. |
static inline
static inline bool preferable(const Format & first, const Format & second)Comparator returning true if first has higher priority than second.
first The format to compare.
second The format to compare against.
True if first.priority > second.priority.
| Name | Description |
|---|---|
Type |
enum Type| Value | Description |
|---|---|
None | |
Video | video only |
Audio | audio only |
Multiplex | both video & audio |