コード例 #1
0
 public void previous(UnsignedIntegerFourBytes instanceId) throws AVTransportException {
   try {
     findStateMachine(instanceId).previous();
   } catch (TransitionException ex) {
     throw new AVTransportException(
         AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
   }
 }
コード例 #2
0
 public void play(UnsignedIntegerFourBytes instanceId, String speed) throws AVTransportException {
   try {
     findStateMachine(instanceId).play(speed);
     handler.sendEmptyMessage(1);
   } catch (TransitionException ex) {
     throw new AVTransportException(
         AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
   }
 }
コード例 #3
0
  public void seek(UnsignedIntegerFourBytes instanceId, String unit, String target)
      throws AVTransportException {
    SeekMode seekMode;
    try {
      seekMode = SeekMode.valueOrExceptionOf(unit);
    } catch (IllegalArgumentException ex) {
      throw new AVTransportException(
          AVTransportErrorCode.SEEKMODE_NOT_SUPPORTED, "Unsupported seek mode: " + unit);
    }

    try {
      findStateMachine(instanceId).seek(seekMode, target);
    } catch (TransitionException ex) {
      throw new AVTransportException(
          AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
    }
  }
コード例 #4
0
  public void setNextAVTransportURI(
      UnsignedIntegerFourBytes instanceId, String nextURI, String nextURIMetaData)
      throws AVTransportException {

    URI uri;
    try {
      uri = new URI(nextURI);
    } catch (Exception ex) {
      throw new AVTransportException(
          ErrorCode.INVALID_ARGS, "NextURI can not be null or malformed");
    }

    try {
      AVTransportStateMachine transportStateMachine = findStateMachine(instanceId, true);
      transportStateMachine.setNextTransportURI(uri, nextURIMetaData);
    } catch (TransitionException ex) {
      throw new AVTransportException(
          AVTransportErrorCode.TRANSITION_NOT_AVAILABLE, ex.getMessage());
    }
  }