recognize Flash Video signature
This commit is contained in:
parent
ec3c12d222
commit
8c211c3320
|
@ -66,6 +66,7 @@ enum Sig32 : uint32
|
||||||
enum Sig24 : uint32
|
enum Sig24 : uint32
|
||||||
{
|
{
|
||||||
Bzip2 = 0x425A68u,
|
Bzip2 = 0x425A68u,
|
||||||
|
Flv = 0x464C56u,
|
||||||
Gzip = 0x1F8B08u,
|
Gzip = 0x1F8B08u,
|
||||||
Id3v2 = 0x494433u,
|
Id3v2 = 0x494433u,
|
||||||
Utf8Text = 0xEFBBBFu,
|
Utf8Text = 0xEFBBBFu,
|
||||||
|
@ -185,6 +186,8 @@ ContainerFormat parseSignature(const char *buffer, int bufferSize)
|
||||||
switch(sig >> 40) { // check 24-bit signatures
|
switch(sig >> 40) { // check 24-bit signatures
|
||||||
case Bzip2:
|
case Bzip2:
|
||||||
return ContainerFormat::Bzip2;
|
return ContainerFormat::Bzip2;
|
||||||
|
case Flv:
|
||||||
|
return ContainerFormat::FlashVideo;
|
||||||
case Gzip:
|
case Gzip:
|
||||||
return ContainerFormat::Gzip;
|
return ContainerFormat::Gzip;
|
||||||
case Id3v2:
|
case Id3v2:
|
||||||
|
@ -232,6 +235,7 @@ const char *containerFormatAbbreviation(ContainerFormat containerFormat, MediaTy
|
||||||
case ContainerFormat::Ar: return "a";
|
case ContainerFormat::Ar: return "a";
|
||||||
case ContainerFormat::Asf: return "asf";
|
case ContainerFormat::Asf: return "asf";
|
||||||
case ContainerFormat::Elf: return "elf";
|
case ContainerFormat::Elf: return "elf";
|
||||||
|
case ContainerFormat::FlashVideo: return "flv";
|
||||||
case ContainerFormat::Gif87a:
|
case ContainerFormat::Gif87a:
|
||||||
case ContainerFormat::Gif89a: return "gif";
|
case ContainerFormat::Gif89a: return "gif";
|
||||||
case ContainerFormat::JavaClassFile: return "class";
|
case ContainerFormat::JavaClassFile: return "class";
|
||||||
|
@ -311,6 +315,8 @@ const char *containerFormatName(ContainerFormat containerFormat)
|
||||||
return "Advanced Systems Format";
|
return "Advanced Systems Format";
|
||||||
case ContainerFormat::Elf:
|
case ContainerFormat::Elf:
|
||||||
return "Executable and Linkable Format";
|
return "Executable and Linkable Format";
|
||||||
|
case ContainerFormat::FlashVideo:
|
||||||
|
return "Flash Video";
|
||||||
case ContainerFormat::Gif87a:
|
case ContainerFormat::Gif87a:
|
||||||
case ContainerFormat::Gif89a:
|
case ContainerFormat::Gif89a:
|
||||||
return "Graphics Interchange Format";
|
return "Graphics Interchange Format";
|
||||||
|
@ -411,6 +417,8 @@ const char *containerMimeType(ContainerFormat containerFormat, MediaType mediaTy
|
||||||
switch(containerFormat) {
|
switch(containerFormat) {
|
||||||
case ContainerFormat::Asf:
|
case ContainerFormat::Asf:
|
||||||
return "video/x-ms-asf";
|
return "video/x-ms-asf";
|
||||||
|
case ContainerFormat::FlashVideo:
|
||||||
|
return "video/x-flv";
|
||||||
case ContainerFormat::Gif87a:
|
case ContainerFormat::Gif87a:
|
||||||
case ContainerFormat::Gif89a:
|
case ContainerFormat::Gif89a:
|
||||||
return "image/gif";
|
return "image/gif";
|
||||||
|
|
|
@ -19,6 +19,7 @@ enum class ContainerFormat
|
||||||
Asf, /**< Advanced Systems Format */
|
Asf, /**< Advanced Systems Format */
|
||||||
Bzip2, /** bzip2 compressed file */
|
Bzip2, /** bzip2 compressed file */
|
||||||
Elf, /**< Executable and Linkable Format */
|
Elf, /**< Executable and Linkable Format */
|
||||||
|
FlashVideo, /**< Flash (FLV) */
|
||||||
Gif87a, /**< Graphics Interchange Format (1987) */
|
Gif87a, /**< Graphics Interchange Format (1987) */
|
||||||
Gif89a, /**< Graphics Interchange Format (1989) */
|
Gif89a, /**< Graphics Interchange Format (1989) */
|
||||||
Gzip, /**< gzip compressed file */
|
Gzip, /**< gzip compressed file */
|
||||||
|
|
Loading…
Reference in New Issue