MediaKind.h header
#include <ew/core/MediaKind.h>
Namespace ew::core
Enumerations
enum class MediaKind { Image, Audio, Video, Pdf, Other }
The kind of a media asset, an axis on the Media content type: it selects how the asset is displayed and annotated (an image on a canvas, an audio player, a PDF viewer, ...). New kinds are additive. Serialized as a stable lowercase token.
Functions
MediaKind ew::core::mediaKindForFile(QStringView fileName)
Guesses a media kind from a file name's extension, defaulting to Other.
std::optional< MediaKind > ew::core::mediaKindFromToken(QStringView token)
Parses a media kind from its serialization token; std::nullopt if unrecognized.
QString ew::core::toToken(MediaKind kind)
Returns the stable serialization token for kind (e.g. "image").