@@ -717,6 +717,7 @@ pub enum FileType {
717
717
Aac ,
718
718
Aiff ,
719
719
Ape ,
720
+ Ebml ,
720
721
Flac ,
721
722
Mpeg ,
722
723
Mp4 ,
@@ -755,6 +756,7 @@ impl FileType {
755
756
match self {
756
757
FileType :: Aiff | FileType :: Mpeg | FileType :: Wav | FileType :: Aac => TagType :: Id3v2 ,
757
758
FileType :: Ape | FileType :: Mpc | FileType :: WavPack => TagType :: Ape ,
759
+ FileType :: Ebml => TagType :: Ebml ,
758
760
FileType :: Flac | FileType :: Opus | FileType :: Vorbis | FileType :: Speex => {
759
761
TagType :: VorbisComments
760
762
} ,
@@ -791,13 +793,14 @@ impl FileType {
791
793
}
792
794
793
795
match tag_type {
796
+ TagType :: AiffText => crate :: iff:: aiff:: AIFFTextChunks :: SUPPORTED_FORMATS . contains ( self ) ,
794
797
TagType :: Ape => crate :: ape:: ApeTag :: SUPPORTED_FORMATS . contains ( self ) ,
798
+ TagType :: Ebml => crate :: ebml:: EbmlTag :: SUPPORTED_FORMATS . contains ( self ) ,
795
799
TagType :: Id3v1 => crate :: id3:: v1:: Id3v1Tag :: SUPPORTED_FORMATS . contains ( self ) ,
796
800
TagType :: Id3v2 => crate :: id3:: v2:: Id3v2Tag :: SUPPORTED_FORMATS . contains ( self ) ,
797
801
TagType :: Mp4Ilst => crate :: mp4:: Ilst :: SUPPORTED_FORMATS . contains ( self ) ,
798
- TagType :: VorbisComments => crate :: ogg:: VorbisComments :: SUPPORTED_FORMATS . contains ( self ) ,
799
802
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 ) ,
801
804
}
802
805
}
803
806
@@ -827,6 +830,7 @@ impl FileType {
827
830
"opus" => Some ( Self :: Opus ) ,
828
831
"flac" => Some ( Self :: Flac ) ,
829
832
"ogg" => Some ( Self :: Vorbis ) ,
833
+ "mka" | "mkv" | "webm" => Some ( Self :: Ebml ) ,
830
834
"mp4" | "m4a" | "m4b" | "m4p" | "m4r" | "m4v" | "3gp" => Some ( Self :: Mp4 ) ,
831
835
"mpc" | "mp+" | "mpp" => Some ( Self :: Mpc ) ,
832
836
"spx" => Some ( Self :: Speex ) ,
@@ -1002,6 +1006,7 @@ impl FileType {
1002
1006
None
1003
1007
} ,
1004
1008
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 ) ,
1005
1010
_ if buf. len ( ) >= 8 && & buf[ 4 ..8 ] == b"ftyp" => Some ( Self :: Mp4 ) ,
1006
1011
_ if buf. starts_with ( b"MPCK" ) || buf. starts_with ( b"MP+" ) => Some ( Self :: Mpc ) ,
1007
1012
_ => None ,
0 commit comments