Examples of AVTransportException


Examples of org.fourthline.cling.support.avtransport.AVTransportException

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

        if (currentURI.startsWith("http:")) {
            try {
                HttpFetch.validate(URIUtil.toURL(uri));
            } catch (IOException ex) {
                throw new AVTransportException(AVTransportErrorCode.READ_ERROR, "Unable to read requested URI: " + uri);
            }
        } else  {
            throw new AVTransportException(ErrorCode.INVALID_ACTION, "Requested URI was not a network stream.");
        }
       
        // Instantiate a new player
    try {
      if (player != null) {
        player.cleanup();
      }
      player = PlayerFactory.getPlayer(uri.toString());
    } catch (PlayerException e) {
      throw new AVTransportException(ErrorCode.HUMAN_INTERVENTION_REQUIRED, "Unable to start media player backend.");
    }

    // Build media info
    String duration = ModelUtil.toTimeString(player.getDuration());
    mediaInfo = new MediaInfo(currentURI, currentURIMetaData, null, duration, null);
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

        this.getCurrentInstanceIds()[0],
        new AVTransportVariable.TransportState(TransportState.STOPPED)
      );
      this.getLastChange().fire(getPropertyChangeSupport());
    } catch (PlayerException e) {
      throw new AVTransportException(ErrorCode.ACTION_FAILED, e.getMessage());
    }

      }
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

                             TransportAction.Stop
                     })
             );
             getLastChange().fire(getPropertyChangeSupport());
         } catch (PlayerException e) {
           throw new AVTransportException(ErrorCode.ACTION_FAILED, e.toString());
         }
       } else {
         transportInfo = new TransportInfo(TransportState.STOPPED);
         throw new AVTransportException(ErrorCode.INVALID_ACTION, "No player created - try setting URI of media first.");
       }
      
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

                              TransportAction.Play
                      })
              );
              getLastChange().fire(getPropertyChangeSupport());
          } catch (PlayerException e) {
            throw new AVTransportException(ErrorCode.ACTION_FAILED, e.toString());
          }
        } else {
          transportInfo = new TransportInfo(TransportState.STOPPED);
          throw new AVTransportException(ErrorCode.INVALID_ACTION, "No player created - try setting URI of media first.");
        }
       
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

       
    }

    @Override
    public void record(UnsignedIntegerFourBytes instanceId) throws AVTransportException {
      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Record not supported.");
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Record not supported.");
    }

    @Override
    public void seek(UnsignedIntegerFourBytes instanceId, String unit, String target) throws AVTransportException {
      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Seek not supported.");
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Seek not supported.");
    }

    @Override
    public void next(UnsignedIntegerFourBytes instanceId) throws AVTransportException {
      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Next not supported.");
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Next not supported.");
    }

    @Override
    public void previous(UnsignedIntegerFourBytes instanceId) throws AVTransportException {
      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Previous not supported.");
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

    @Override
    public void setNextAVTransportURI(UnsignedIntegerFourBytes instanceId,
                                      String nextURI,
                                      String nextURIMetaData) throws AVTransportException {
      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Next URI not supported.");
    }
View Full Code Here

Examples of org.fourthline.cling.support.avtransport.AVTransportException

      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Next URI not supported.");
    }

    @Override
    public void setPlayMode(UnsignedIntegerFourBytes instanceId, String newPlayMode) throws AVTransportException {
      throw new AVTransportException(ErrorCode.INVALID_ACTION, "Setting playmode not supported.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.