pick up ADTS files

This commit is contained in:
Adrian Ulrich 2017-08-03 20:28:16 +02:00
parent 710b284193
commit b308b97880
2 changed files with 8 additions and 4 deletions

View File

@ -94,9 +94,13 @@ public class Bastp {
tags.put("type", "MP4");
}
else if(magic.substring(0,4).equals("MThd")) {
tags = (new MidiFile()).getTags(s);
tags = (new RawFile()).getTags(s);
tags.put("type", "MIDI");
}
else if(file_ff[0] == -1 && (file_ff[1]&0xF0) == 0xF0) { /* aka 0xfff? */
tags = (new RawFile()).getTags(s);
tags.put("type", "ADTS");
}
}
catch (IOException e) {

View File

@ -21,11 +21,11 @@ import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.HashMap;
public class MidiFile extends Common {
public class RawFile extends Common {
/**
* Returns the tags of a Midi File which is just an empty HashMap
* as there seems to be no midi-tag standard (?)
* Returns the tags of a Raw File which is just an empty HashMap.
* This shall be used for raw streams with no (supported) tags.
*/
public HashMap getTags(RandomAccessFile s) throws IOException {
HashMap tags = new HashMap();