@@ -717,6 +717,7 @@ pub enum FileType {
717717 Aac ,
718718 Aiff ,
719719 Ape ,
720+ Ebml ,
720721 Flac ,
721722 Mpeg ,
722723 Mp4 ,
@@ -755,6 +756,7 @@ impl FileType {
755756 match self {
756757 FileType :: Aiff | FileType :: Mpeg | FileType :: Wav | FileType :: Aac => TagType :: Id3v2 ,
757758 FileType :: Ape | FileType :: Mpc | FileType :: WavPack => TagType :: Ape ,
759+ FileType :: Ebml => TagType :: Ebml ,
758760 FileType :: Flac | FileType :: Opus | FileType :: Vorbis | FileType :: Speex => {
759761 TagType :: VorbisComments
760762 } ,
@@ -791,13 +793,14 @@ impl FileType {
791793 }
792794
793795 match tag_type {
796+ TagType :: AiffText => crate :: iff:: aiff:: AIFFTextChunks :: SUPPORTED_FORMATS . contains ( self ) ,
794797 TagType :: Ape => crate :: ape:: ApeTag :: SUPPORTED_FORMATS . contains ( self ) ,
798+ TagType :: Ebml => crate :: ebml:: EbmlTag :: SUPPORTED_FORMATS . contains ( self ) ,
795799 TagType :: Id3v1 => crate :: id3:: v1:: Id3v1Tag :: SUPPORTED_FORMATS . contains ( self ) ,
796800 TagType :: Id3v2 => crate :: id3:: v2:: Id3v2Tag :: SUPPORTED_FORMATS . contains ( self ) ,
797801 TagType :: Mp4Ilst => crate :: mp4:: Ilst :: SUPPORTED_FORMATS . contains ( self ) ,
798- TagType :: VorbisComments => crate :: ogg:: VorbisComments :: SUPPORTED_FORMATS . contains ( self ) ,
799802 TagType :: RiffInfo => crate :: iff:: wav:: RIFFInfoList :: SUPPORTED_FORMATS . contains ( self ) ,
800- TagType :: AiffText => crate :: iff :: aiff :: AIFFTextChunks :: SUPPORTED_FORMATS . contains ( self ) ,
803+ TagType :: VorbisComments => crate :: ogg :: VorbisComments :: SUPPORTED_FORMATS . contains ( self ) ,
801804 }
802805 }
803806
@@ -827,6 +830,7 @@ impl FileType {
827830 "opus" => Some ( Self :: Opus ) ,
828831 "flac" => Some ( Self :: Flac ) ,
829832 "ogg" => Some ( Self :: Vorbis ) ,
833+ "mka" | "mkv" | "webm" => Some ( Self :: Ebml ) ,
830834 "mp4" | "m4a" | "m4b" | "m4p" | "m4r" | "m4v" | "3gp" => Some ( Self :: Mp4 ) ,
831835 "mpc" | "mp+" | "mpp" => Some ( Self :: Mpc ) ,
832836 "spx" => Some ( Self :: Speex ) ,
@@ -1002,6 +1006,7 @@ impl FileType {
10021006 None
10031007 } ,
10041008 119 if buf. len ( ) >= 4 && & buf[ ..4 ] == b"wvpk" => Some ( Self :: WavPack ) ,
1009+ 26 if buf. starts_with ( & [ 0x1A , 0x45 , 0xDF , 0xA3 ] ) => Some ( Self :: Ebml ) ,
10051010 _ if buf. len ( ) >= 8 && & buf[ 4 ..8 ] == b"ftyp" => Some ( Self :: Mp4 ) ,
10061011 _ if buf. starts_with ( b"MPCK" ) || buf. starts_with ( b"MP+" ) => Some ( Self :: Mpc ) ,
10071012 _ => None ,
0 commit comments