2015-04-22 19:22:01 +02:00
|
|
|
#ifndef SIGNATURE_H
|
|
|
|
#define SIGNATURE_H
|
|
|
|
|
2015-09-06 19:57:33 +02:00
|
|
|
#include "./mediaformat.h"
|
2015-04-22 19:22:01 +02:00
|
|
|
|
|
|
|
#include <c++utilities/conversion/types.h>
|
|
|
|
|
|
|
|
namespace Media {
|
|
|
|
|
2016-07-11 21:33:19 +02:00
|
|
|
DECLARE_ENUM_CLASS(TagTargetLevel, byte);
|
2016-05-26 01:59:22 +02:00
|
|
|
|
2015-04-22 19:22:01 +02:00
|
|
|
/*!
|
|
|
|
* \brief Specifies the container format.
|
2016-05-16 20:56:53 +02:00
|
|
|
*
|
|
|
|
* Raw streams like ADTS or raw FLAC count as container format in this context.
|
2015-04-22 19:22:01 +02:00
|
|
|
*/
|
|
|
|
enum class ContainerFormat
|
|
|
|
{
|
|
|
|
Unknown, /**< unknown container format */
|
2016-08-07 20:48:23 +02:00
|
|
|
Ac3Frames, /**< raw AC-3/Dolby Digital frames */
|
2016-06-10 23:08:01 +02:00
|
|
|
Adts, /**< Audio Data Transport Stream */
|
|
|
|
Ar, /**< "GNU ar" archive */
|
2015-04-22 19:22:01 +02:00
|
|
|
Asf, /**< Advanced Systems Format */
|
2016-06-10 23:08:01 +02:00
|
|
|
Bzip2, /**< bzip2 compressed file */
|
2016-08-07 20:48:23 +02:00
|
|
|
Dirac, /**< raw Dirac */
|
|
|
|
Ebml, /**< EBML */
|
2015-04-22 19:22:01 +02:00
|
|
|
Elf, /**< Executable and Linkable Format */
|
2016-08-07 20:48:23 +02:00
|
|
|
Flac, /**< raw Free Lossless Audio Codec */
|
2016-05-05 23:11:48 +02:00
|
|
|
FlashVideo, /**< Flash (FLV) */
|
2015-04-22 19:22:01 +02:00
|
|
|
Gif87a, /**< Graphics Interchange Format (1987) */
|
|
|
|
Gif89a, /**< Graphics Interchange Format (1989) */
|
|
|
|
Gzip, /**< gzip compressed file */
|
|
|
|
Id2v2Tag, /**< file holding an ID2v2 tag only */
|
|
|
|
JavaClassFile, /**< Java class file */
|
|
|
|
Jpeg, /**< JPEG File Interchange Format */
|
|
|
|
Lha, /**< LHA */
|
2016-08-07 20:48:23 +02:00
|
|
|
Lzip, /**< lz compressed file */
|
2015-04-22 19:22:01 +02:00
|
|
|
Lzw, /**< LZW */
|
2016-08-07 20:48:23 +02:00
|
|
|
Matroska, /**< Matroska (subset of EBML) */
|
2015-04-22 19:22:01 +02:00
|
|
|
Mp4, /**< MPEG-4 Part 14 (subset of QuickTime container) */
|
2016-08-07 20:48:23 +02:00
|
|
|
MpegAudioFrames, /**< MPEG-1 Layer 1/2/3 frames */
|
2015-04-22 19:22:01 +02:00
|
|
|
Ogg, /**< Ogg */
|
|
|
|
PhotoshopDocument, /**< Photoshop document */
|
|
|
|
Png, /**< Portable Network Graphics */
|
|
|
|
PortableExecutable, /**< Portable Executable */
|
2016-08-07 20:48:23 +02:00
|
|
|
QuickTime, /**< QuickTime container */
|
2015-04-22 19:22:01 +02:00
|
|
|
Rar, /**< RAR Archive */
|
|
|
|
Riff, /**< Resource Interchange File Format */
|
|
|
|
RiffAvi, /**< Audio Video Interleave (subset of RIFF) */
|
2016-08-07 20:48:23 +02:00
|
|
|
RiffWave, /**< WAVE (subset of RIFF) */
|
|
|
|
SevenZ, /**< 7z archive */
|
2016-06-10 23:08:01 +02:00
|
|
|
Tar, /**< Tar archive */
|
2015-04-22 19:22:01 +02:00
|
|
|
TiffBigEndian, /**< Tagged Image File Format (big endian) */
|
|
|
|
TiffLittleEndian, /**< Tagged Image File Format (little endian) */
|
|
|
|
Utf16Text, /**< UTF-16 text */
|
|
|
|
Utf32Text, /**< UTF-32 text */
|
|
|
|
Utf8Text, /**< UTF-8 text */
|
2016-08-07 20:48:23 +02:00
|
|
|
Webm, /**< WebM (subset of Matroska) */
|
2015-04-22 19:22:01 +02:00
|
|
|
WindowsBitmap, /**< Microsoft Windows Bitmap */
|
|
|
|
WindowsIcon, /**< Microsoft Windows Icon */
|
2017-08-17 19:04:19 +02:00
|
|
|
Zip, /**< ZIP archive */
|
|
|
|
Xz /**< xz compressed file */
|
2015-04-22 19:22:01 +02:00
|
|
|
};
|
|
|
|
|
2016-08-29 15:43:05 +02:00
|
|
|
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, int bufferSize);
|
|
|
|
TAG_PARSER_EXPORT const char *containerFormatName(ContainerFormat containerFormat);
|
|
|
|
TAG_PARSER_EXPORT const char *containerFormatAbbreviation(ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown, unsigned int version = 0);
|
|
|
|
TAG_PARSER_EXPORT const char *containerFormatSubversion(ContainerFormat containerFormat);
|
|
|
|
TAG_PARSER_EXPORT const char *containerMimeType(ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown);
|
|
|
|
TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, uint64 targetLevelValue);
|
|
|
|
TAG_PARSER_EXPORT uint64 containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel);
|
2015-04-22 19:22:01 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SIGNATURE_H
|