Package javax.media

Examples of javax.media.IncompatibleSourceException


            QTSessionCheck.check();
         
        createNewMovieFromURL(source.getLocator().toExternalForm());
      } catch (QTException e) {
        logger.log(Level.WARNING, "" + e, e);
        throw new IncompatibleSourceException();
      }
      catch (Exception e) {
        logger.log(Level.WARNING, "" + e, e);
        throw new IncompatibleSourceException();
      }
  
   
      super.setSource(source);
     
View Full Code Here


    super();
  }
 
  public void setSource(DataSource source) throws IOException, IncompatibleSourceException
  {
    throw new IncompatibleSourceException("DataSource not supported: " + source)// TODO: what types of DataSource are supported?
  }
View Full Code Here

  }
 
  public void setSource(DataSource source) throws IOException, IncompatibleSourceException
 
    if (!(source instanceof PullBufferDataSource))
      throw new IncompatibleSourceException("DataSource not supported: " + source)// TODO: what types of DataSource are supported?

    final PullBufferDataSource pullBufferDataSource = (PullBufferDataSource) source;
   
    streams = pullBufferDataSource.getStreams();
    if (streams == null)
      throw new IOException("Got a null stream from the DataSource");
   
    if (streams.length == 0)
      throw new IOException("Got a empty stream array from the DataSource");
   
    for (int i = 0; i < streams.length; ++i)
    {
      if (streams[i] == null)
        throw new IncompatibleSourceException("DataSource not supported: " + source);
    }
   
    this.source = source;
   
   
View Full Code Here

    public void setSource(DataSource source)
        throws IncompatibleSourceException
    {
        //  Accept only PullDataSources
        if(! (source instanceof PullDataSource) ) {
            throw new IncompatibleSourceException(
                "MediaHandler " + getClass().getName() +
                " does not support " +
                "DataSource " + source.getClass().getName() );
        }

        PullSourceStream[] streams =
            ((PullDataSource)source).getStreams();

        if( streams == null || streams.length == 0 ) {
            throw new IncompatibleSourceException(
                "DataSource " + source.getClass().getName() +
                " does not contain valid streams." );
        }

        super.setSource(source);
View Full Code Here

    public void setSource(DataSource source)
        throws IncompatibleSourceException
    {
        //  Accept only PullDataSources
        if(! (source instanceof PullDataSource) ) {
            throw new IncompatibleSourceException(
                "MediaHandler " + getClass().getName() +
                " does not support " +
                "DataSource " + source.getClass().getName() );
        }

        PullSourceStream[] streams =
            ((PullDataSource)source).getStreams();

        if( streams == null || streams.length == 0 ) {
            throw new IncompatibleSourceException(
                "DataSource " + source.getClass().getName() +
                " does not contain valid streams." );
        }

        super.setSource(source);
View Full Code Here

    final String protocol = source.getLocator().getProtocol();
   
    if (USE_DATASOURCE_URL_ONLY)
    {
      if (!(protocol.equals("file")))
        throw new IncompatibleSourceException();

    }
    else
    {

   
    if (!(source instanceof PullDataSource))
      throw new IncompatibleSourceException();
    }
   
    this.source = (PullDataSource) source;
   
  }
View Full Code Here

  }

  public void setSource(DataSource source) throws IOException, IncompatibleSourceException
  {
    if (!(source instanceof net.sf.fmj.media.protocol.merge.DataSource))
      throw new IncompatibleSourceException();
   
    this.source = (net.sf.fmj.media.protocol.merge.DataSource) source;
  }
View Full Code Here

 
  public void setSource(DataSource source) throws IOException, IncompatibleSourceException
  {
    logger.finer("setSource: " + source);
    if (!(source instanceof PushDataSource))
      throw new IncompatibleSourceException();
    this.source = (PushDataSource) source;
  }
View Full Code Here

      // an example is com.ibm.media.parser.video.MpegParser.  The immediate solution
      // was to de-register that parser for mpeg audio.
     
      demux = FilterGraphBuilder.getSourceCompatibleDemultiplexer(source);
      if (demux == null)
        throw new IncompatibleSourceException("Unable to build filter graph for: " + source);
     

 
      demuxDuration = demux.getDuration()// JMF calls this at this stage, so we might as well too, and use it in getDuration().
     
View Full Code Here

 
  public void setSource(DataSource source) throws IOException, IncompatibleSourceException
  {
    logger.finer("setSource: " + source);
    if (!(source instanceof PushBufferDataSource))
      throw new IncompatibleSourceException();
    this.source = (PushBufferDataSource) source;
  }
View Full Code Here

TOP

Related Classes of javax.media.IncompatibleSourceException

Copyright © 2018 www.massapicom. 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.