mirror of
https://github.com/androidx/media.git
synced 2025-05-13 18:50:02 +08:00
Remove dead-code readDvbString
This commit is contained in:
parent
1d65afdd16
commit
7bf63e732d
@ -133,63 +133,4 @@ public class AitDecoder implements MetadataDecoder {
|
|||||||
return new Metadata(aits);
|
return new Metadata(aits);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final String dvbCharset[] = {
|
|
||||||
"ISO-8859-15",
|
|
||||||
"ISO-8859-5",
|
|
||||||
"ISO-8859-6",
|
|
||||||
"ISO-8859-7",
|
|
||||||
"ISO-8859-8",
|
|
||||||
"ISO-8859-9",
|
|
||||||
null,
|
|
||||||
"ISO-8859-11",
|
|
||||||
null,
|
|
||||||
"ISO-8859-13",
|
|
||||||
null,
|
|
||||||
"ISO-8859-15",
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
//0x10
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
};
|
|
||||||
|
|
||||||
static String readDvbString(ParsableByteArray data, int length) {
|
|
||||||
if(length == 0) return null;
|
|
||||||
int charsetSelect = data.peekUnsignedByte();
|
|
||||||
if(charsetSelect >= 0x20)
|
|
||||||
return data.readString(length, Charset.forName("ISO-8859-15"));
|
|
||||||
data.skipBytes(1);
|
|
||||||
if(charsetSelect == 0x1f) {
|
|
||||||
data.skipBytes(length - 1);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if(charsetSelect != 0x10)
|
|
||||||
return data.readString(length-1, Charset.forName(dvbCharset[charsetSelect]));
|
|
||||||
if(length == 2) {
|
|
||||||
data.skipBytes(1);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
charsetSelect = data.readUnsignedShort();
|
|
||||||
if(charsetSelect > 1 && charsetSelect < 0x10) {
|
|
||||||
String charsetName = "ISO-8859-" + charsetSelect;
|
|
||||||
return data.readString(length-3, Charset.forName(charsetName));
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user