Ejemplo n.º 1
0
 private void resolveDirect() {
   try {
     long utcTimestamp = Util.parseXsDateTime(timingElement.value);
     long elapsedRealtimeOffset = utcTimestamp - timingElementElapsedRealtime;
     callback.onTimestampResolved(timingElement, elapsedRealtimeOffset);
   } catch (ParseException e) {
     callback.onTimestampError(timingElement, new ParserException(e));
   }
 }
Ejemplo n.º 2
0
 private void resolve() {
   String scheme = timingElement.schemeIdUri;
   if (Util.areEqual(scheme, "urn:mpeg:dash:utc:direct:2012")) {
     resolveDirect();
   } else if (Util.areEqual(scheme, "urn:mpeg:dash:utc:http-iso:2014")) {
     resolveHttp(new Iso8601Parser());
   } else if (Util.areEqual(scheme, "urn:mpeg:dash:utc:http-xsdate:2012")
       || Util.areEqual(scheme, "urn:mpeg:dash:utc:http-xsdate:2014")) {
     resolveHttp(new XsDateTimeParser());
   } else {
     // Unsupported scheme.
     callback.onTimestampError(timingElement, new IOException("Unsupported utc timing scheme"));
   }
 }
Ejemplo n.º 3
0
 @Override
 public void onLoadError(Loadable loadable, IOException exception) {
   releaseLoader();
   callback.onTimestampError(timingElement, exception);
 }