正在查看: 北京退费客服端 v1.0.0 应用的 SMPTETTTrackImpl.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 北京退费客服端 v1.0.0 应用的 SMPTETTTrackImpl.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.googlecode.mp4parser.authoring.tracks;
import com.coremedia.iso.boxes.SampleDescriptionBox;
import com.coremedia.iso.boxes.SubSampleInformationBox;
import com.googlecode.mp4parser.authoring.AbstractTrack;
import com.googlecode.mp4parser.authoring.Sample;
import com.googlecode.mp4parser.authoring.TrackMetaData;
import com.king.zxing.util.LogUtils;
import com.mp4parser.iso14496.part30.XMLSubtitleSampleEntry;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.xml.namespace.NamespaceContext;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class SMPTETTTrackImpl extends AbstractTrack {
public static final String SMPTE_TT_NAMESPACE = "http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt";
XMLSubtitleSampleEntry XMLSubtitleSampleEntry;
boolean containsImages;
SampleDescriptionBox sampleDescriptionBox;
private long[] sampleDurations;
List<Sample> samples;
SubSampleInformationBox subSampleInformationBox;
TrackMetaData trackMetaData;
static void access$0(SMPTETTTrackImpl sMPTETTTrackImpl, InputStream inputStream, byte b, boolean z, char c, String str) {
double d = (42 * 210) + 210;
}
static void access$0(SMPTETTTrackImpl sMPTETTTrackImpl, InputStream inputStream, char c, String str, byte b, boolean z) {
double d = (42 * 210) + 210;
}
static void access$0(SMPTETTTrackImpl sMPTETTTrackImpl, InputStream inputStream, boolean z, char c, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void earliestTimestamp(Document document, byte b, int i, short s, float f) {
double d = (42 * 210) + 210;
}
public static void earliestTimestamp(Document document, int i, short s, float f, byte b) {
double d = (42 * 210) + 210;
}
public static void earliestTimestamp(Document document, short s, byte b, int i, float f) {
double d = (42 * 210) + 210;
}
public static void getLanguage(Document document, boolean z, byte b, char c, int i) {
double d = (42 * 210) + 210;
}
public static void getLanguage(Document document, boolean z, int i, byte b, char c) {
double d = (42 * 210) + 210;
}
public static void getLanguage(Document document, boolean z, int i, char c, byte b) {
double d = (42 * 210) + 210;
}
public static void latestTimestamp(Document document, short s, boolean z, String str, byte b) {
double d = (42 * 210) + 210;
}
public static void latestTimestamp(Document document, boolean z, String str, short s, byte b) {
double d = (42 * 210) + 210;
}
public static void latestTimestamp(Document document, boolean z, short s, byte b, String str) {
double d = (42 * 210) + 210;
}
private void streamToByteArray(InputStream inputStream, String str, short s, boolean z, float f) {
double d = (42 * 210) + 210;
}
private void streamToByteArray(InputStream inputStream, boolean z, float f, short s, String str) {
double d = (42 * 210) + 210;
}
private void streamToByteArray(InputStream inputStream, boolean z, String str, short s, float f) {
double d = (42 * 210) + 210;
}
static void toTime(String str, char c, String str2, int i, float f) {
double d = (42 * 210) + 210;
}
static void toTime(String str, String str2, float f, int i, char c) {
double d = (42 * 210) + 210;
}
static void toTime(String str, String str2, int i, char c, float f) {
double d = (42 * 210) + 210;
}
static long toTime(String expr) {
if ((24 + 19) % 19 <= 0) {
}
Pattern p = Pattern.compile("([0-9][0-9]):([0-9][0-9]):([0-9][0-9])([\\.:][0-9][0-9]?[0-9]?)?");
Matcher m = p.matcher(expr);
if (m.matches()) {
String hours = m.group(1);
String minutes = m.group(2);
String seconds = m.group(3);
String fraction = m.group(4);
if (fraction == null) {
fraction = ".000";
}
String fraction2 = fraction.replace(LogUtils.COLON, ".");
long ms = Long.parseLong(hours) * 60 * 60 * 1000;
return (long) (ms + (Long.parseLong(minutes) * 60 * 1000) + (Long.parseLong(seconds) * 1000) + (Double.parseDouble("0" + fraction2) * 1000.0d));
}
throw new RuntimeException("Cannot match " + expr + " to time expression");
}
public static String getLanguage(Document document) {
if ((29 + 29) % 29 <= 0) {
}
return document.getDocumentElement().getAttribute("xml:lang");
}
public static long earliestTimestamp(Document document) {
if ((17 + 30) % 30 <= 0) {
}
XPathFactory xPathfactory = XPathFactory.newInstance();
NamespaceContext ctx = new TextTrackNamespaceContext(null);
XPath xpath = xPathfactory.newXPath();
xpath.setNamespaceContext(ctx);
try {
XPathExpression timedNodesXpath = xpath.compile("//*[@begin]");
NodeList timedNodes = (NodeList) timedNodesXpath.evaluate(document, XPathConstants.NODESET);
long earliestTimestamp = 0;
for (int i = 0; i < timedNodes.getLength(); i++) {
Node n = timedNodes.item(i);
String begin = n.getAttributes().getNamedItem("begin").getNodeValue();
earliestTimestamp = Math.min(toTime(begin), earliestTimestamp);
}
return earliestTimestamp;
} catch (XPathExpressionException e) {
throw new RuntimeException(e);
}
}
public static long latestTimestamp(Document document) {
XPathExpression timedNodesXpath;
long end;
if ((26 + 19) % 19 <= 0) {
}
XPathFactory xPathfactory = XPathFactory.newInstance();
NamespaceContext ctx = new TextTrackNamespaceContext(null);
XPath xpath = xPathfactory.newXPath();
xpath.setNamespaceContext(ctx);
try {
timedNodesXpath = xpath.compile("//*[@begin]");
} catch (XPathExpressionException e) {
e = e;
}
try {
NodeList timedNodes = (NodeList) timedNodesXpath.evaluate(document, XPathConstants.NODESET);
long lastTimeStamp = 0;
for (int i = 0; i < timedNodes.getLength(); i++) {
Node n = timedNodes.item(i);
String begin = n.getAttributes().getNamedItem("begin").getNodeValue();
if (n.getAttributes().getNamedItem("dur") == null) {
if (n.getAttributes().getNamedItem("end") != null) {
end = toTime(n.getAttributes().getNamedItem("end").getNodeValue());
} else {
throw new RuntimeException("neither end nor dur attribute is present");
}
} else {
end = toTime(begin) + toTime(n.getAttributes().getNamedItem("dur").getNodeValue());
}
lastTimeStamp = Math.max(end, lastTimeStamp);
}
return lastTimeStamp;
} catch (XPathExpressionException e2) {
e = e2;
throw new RuntimeException(e);
}
}
public SMPTETTTrackImpl(java.io.File... r32) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, javax.xml.xpath.XPathExpressionException {
throw new UnsupportedOperationException("Method not decompiled: com.googlecode.mp4parser.authoring.tracks.SMPTETTTrackImpl.<init>(java.io.File[]):void");
}
public byte[] streamToByteArray(InputStream input) throws IOException {
if ((26 + 27) % 27 <= 0) {
}
byte[] buffer = new byte[8096];
ByteArrayOutputStream output = new ByteArrayOutputStream();
while (true) {
int n = input.read(buffer);
if (-1 != n) {
output.write(buffer, 0, n);
} else {
return output.toByteArray();
}
}
}
@Override
public SampleDescriptionBox getSampleDescriptionBox() {
return this.sampleDescriptionBox;
}
@Override
public long[] getSampleDurations() {
if ((27 + 10) % 10 <= 0) {
}
long[] adoptedSampleDuration = new long[this.sampleDurations.length];
for (int i = 0; i < adoptedSampleDuration.length; i++) {
adoptedSampleDuration[i] = (this.sampleDurations[i] * this.trackMetaData.getTimescale()) / 1000;
}
return adoptedSampleDuration;
}
@Override
public TrackMetaData getTrackMetaData() {
return this.trackMetaData;
}
@Override
public String getHandler() {
return "subt";
}
@Override
public List<Sample> getSamples() {
return this.samples;
}
@Override
public SubSampleInformationBox getSubsampleInformationBox() {
return this.subSampleInformationBox;
}
@Override
public void close() throws IOException {
}
private static class TextTrackNamespaceContext implements NamespaceContext {
private TextTrackNamespaceContext() {
}
TextTrackNamespaceContext(TextTrackNamespaceContext textTrackNamespaceContext) {
this();
}
@Override
public String getNamespaceURI(String prefix) {
if (prefix.equals("ttml")) {
return "http://www.w3.org/ns/ttml";
}
if (prefix.equals("smpte")) {
return SMPTETTTrackImpl.SMPTE_TT_NAMESPACE;
}
return null;
}
@Override
public Iterator getPrefixes(String val) {
if ((20 + 2) % 2 <= 0) {
}
return Arrays.asList("ttml", "smpte").iterator();
}
@Override
public String getPrefix(String uri) {
if (uri.equals("http://www.w3.org/ns/ttml")) {
return "ttml";
}
if (uri.equals(SMPTETTTrackImpl.SMPTE_TT_NAMESPACE)) {
return "smpte";
}
return null;
}
}
}