You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ju...@apache.org on 2008/09/14 14:08:20 UTC

svn commit: r695205 - /incubator/tika/trunk/src/main/resources/mime/tika-mimetypes.xml

Author: jukka
Date: Sun Sep 14 05:08:20 2008
New Revision: 695205

URL: http://svn.apache.org/viewvc?rev=695205&view=rev
Log:
TIKA-120: Add support for retrieving ID3 tags from MP3 files

Some simple MP3 header magic.

Modified:
    incubator/tika/trunk/src/main/resources/mime/tika-mimetypes.xml

Modified: incubator/tika/trunk/src/main/resources/mime/tika-mimetypes.xml
URL: http://svn.apache.org/viewvc/incubator/tika/trunk/src/main/resources/mime/tika-mimetypes.xml?rev=695205&r1=695204&r2=695205&view=diff
==============================================================================
--- incubator/tika/trunk/src/main/resources/mime/tika-mimetypes.xml (original)
+++ incubator/tika/trunk/src/main/resources/mime/tika-mimetypes.xml Sun Sep 14 05:08:20 2008
@@ -656,6 +656,26 @@
 
   <mime-type type="audio/mpeg">
     <glob pattern="*.mp3" />
+    <magic priority="20">
+      <!-- http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html -->
+      <!-- ----------------------------------------------------- -->
+      <!-- Bit pattern for first two bytes: 11111111 111VVLLC    -->
+      <!-- VV = MPEG Audio Version ID; 10 = V2, 11 = V1          -->
+      <!-- LL = Layer description; 01 = L3, 10 = L2, 11 = L1     -->
+      <!-- C = Protection bit; 0 = CRC, 1 = no CRC               -->
+      <match value="0xfff2" type="string" offset="0" /> <!-- V2, L3, CRC -->
+      <match value="0xfff3" type="string" offset="0" /> <!-- V2, L3      -->
+      <match value="0xfff4" type="string" offset="0" /> <!-- V2, L2, CRC -->
+      <match value="0xfff5" type="string" offset="0" /> <!-- V2, L2      -->
+      <match value="0xfff6" type="string" offset="0" /> <!-- V2, L1, CRC -->
+      <match value="0xfff7" type="string" offset="0" /> <!-- V2, L1      -->
+      <match value="0xfffa" type="string" offset="0" /> <!-- V1, L3, CRC -->
+      <match value="0xfffb" type="string" offset="0" /> <!-- V1, L3      -->
+      <match value="0xfffc" type="string" offset="0" /> <!-- V1, L2, CRC -->
+      <match value="0xfffd" type="string" offset="0" /> <!-- V1, L2      -->
+      <match value="0xfffe" type="string" offset="0" /> <!-- V1, L1, CRC -->
+      <match value="0xffff" type="string" offset="0" /> <!-- V1, L1      -->
+    </magic>
   </mime-type>
 
   <!-- ===================================================================== -->