mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged BRANCHES/DEV/V4.0-BUG-FIX to HEAD:
33782: ALF-12714 Add 3GPP/3GPP2 video, and MP4 Audio mimetypes 33783: Update Tika for more MP4/QuickTime support, and enable MP4 audio metadata extraction + "quick" testing git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@33788 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -66,6 +66,8 @@ public class MP3MetadataExtracterTest extends TikaAudioMetadataExtracterTest
|
|||||||
public void testOggExtraction() throws Exception {}
|
public void testOggExtraction() throws Exception {}
|
||||||
@Override
|
@Override
|
||||||
public void testFlacExtraction() throws Exception {}
|
public void testFlacExtraction() throws Exception {}
|
||||||
|
@Override
|
||||||
|
public void testMP4AudioExtraction() throws Exception {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We don't have quite the usual metadata. Tests the descriptions one.
|
* We don't have quite the usual metadata. Tests the descriptions one.
|
||||||
|
@@ -30,6 +30,7 @@ import org.apache.tika.metadata.Metadata;
|
|||||||
import org.apache.tika.metadata.XMPDM;
|
import org.apache.tika.metadata.XMPDM;
|
||||||
import org.apache.tika.parser.CompositeParser;
|
import org.apache.tika.parser.CompositeParser;
|
||||||
import org.apache.tika.parser.Parser;
|
import org.apache.tika.parser.Parser;
|
||||||
|
import org.apache.tika.parser.mp4.MP4Parser;
|
||||||
import org.gagravarr.tika.FlacParser;
|
import org.gagravarr.tika.FlacParser;
|
||||||
import org.gagravarr.tika.VorbisParser;
|
import org.gagravarr.tika.VorbisParser;
|
||||||
|
|
||||||
@@ -60,13 +61,18 @@ public class TikaAudioMetadataExtracter extends TikaPoweredMetadataExtracter
|
|||||||
{
|
{
|
||||||
protected static final String KEY_LYRICS = "lyrics";
|
protected static final String KEY_LYRICS = "lyrics";
|
||||||
|
|
||||||
|
// The Audio related parsers we use
|
||||||
private static Parser[] parsers = new Parser[] {
|
private static Parser[] parsers = new Parser[] {
|
||||||
new VorbisParser(),
|
new VorbisParser(),
|
||||||
new FlacParser()
|
new FlacParser(),
|
||||||
|
new MP4Parser()
|
||||||
};
|
};
|
||||||
|
// The explicit mimetypes we support (plus any others from the parsers)
|
||||||
public static ArrayList<String> SUPPORTED_MIMETYPES = buildSupportedMimetypes(
|
public static ArrayList<String> SUPPORTED_MIMETYPES = buildSupportedMimetypes(
|
||||||
new String[] { MimetypeMap.MIMETYPE_VORBIS, MimetypeMap.MIMETYPE_FLAC },
|
new String[] {
|
||||||
parsers
|
MimetypeMap.MIMETYPE_VORBIS, MimetypeMap.MIMETYPE_FLAC,
|
||||||
|
MimetypeMap.MIMETYPE_AUDIO_MP4,
|
||||||
|
}, parsers
|
||||||
);
|
);
|
||||||
|
|
||||||
protected TikaConfig tikaConfig;
|
protected TikaConfig tikaConfig;
|
||||||
|
@@ -70,6 +70,10 @@ public class TikaAudioMetadataExtracterTest extends AbstractMetadataExtracterTes
|
|||||||
{
|
{
|
||||||
testExtractFromMimetype(MimetypeMap.MIMETYPE_FLAC);
|
testExtractFromMimetype(MimetypeMap.MIMETYPE_FLAC);
|
||||||
}
|
}
|
||||||
|
public void testMP4AudioExtraction() throws Exception
|
||||||
|
{
|
||||||
|
testExtractFromMimetype(MimetypeMap.MIMETYPE_AUDIO_MP4);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We don't have quite the usual metadata. Tests the descriptions one.
|
* We don't have quite the usual metadata. Tests the descriptions one.
|
||||||
|
BIN
source/test-resources/quick/quick.m4a
Normal file
BIN
source/test-resources/quick/quick.m4a
Normal file
Binary file not shown.
Reference in New Issue
Block a user