Package javax.media.protocol

Examples of javax.media.protocol.DataSource.connect()


      try
      {
        final Class dataSourceClass = Class.forName(dataSourceClassName);
        final DataSource dataSource = (DataSource) dataSourceClass.newInstance();
        dataSource.setLocator(sourceLocator);
        dataSource.connect();
        return createPlayer(dataSource);
       
        // TODO: JMF seems to disconnect data sources in this method, based on this stack trace:
//        java.lang.NullPointerException
//        at com.sun.media.protocol.rtp.DataSource.disconnect(DataSource.java:207)
View Full Code Here


    catch (Exception e)
    {  logger.log(Level.WARNING, ""  + e, e);
      throw new NoPlayerException();
    }
    final URLDataSource dataSource = new URLDataSource(url);
    dataSource.connect()// TODO: there is a problem because we connect to the datasource here, but
                // the following call may try twice or more to use the datasource with a player, once
                // for the right content type, and multiple times for unknown.  The first attempt (for example) may actually
                // read data, in which case the second one will be missing data when it reads.
                // really, the datasource needs to be recreated.
                // The workaround for now is that URLDataSource (and others) allows repeated connect() calls.
View Full Code Here

      try
      {
        final Class dataSourceClass = Class.forName(dataSourceClassName);
        final DataSource dataSource = (DataSource) dataSourceClass.newInstance();
        dataSource.setLocator(sourceLocator);
        dataSource.connect();
        return createProcessor(dataSource);
       
       
      }
      catch (ClassNotFoundException e)
View Full Code Here

    catch (Exception e)
    {  logger.log(Level.WARNING, ""  + e, e);
      throw new NoProcessorException();
    }
    final URLDataSource dataSource = new URLDataSource(url);
    dataSource.connect();
    return createProcessor(dataSource);
  }

  private static Processor createProcessor(DataSource source, String contentType)
      throws java.io.IOException, NoProcessorException
View Full Code Here

      try
      {
        final Class dataSourceClass = Class.forName(dataSourceClassName);
        final DataSource dataSource = (DataSource) dataSourceClass.newInstance();
        dataSource.setLocator(sourceLocator);
        dataSource.connect();
        return dataSource;
       
       
      }
      catch (ClassNotFoundException e)
View Full Code Here

    catch (Exception e)
    {  logger.log(Level.WARNING, ""  + e, e);
      throw new NoDataSourceException();
    }
    final URLDataSource dataSource = new URLDataSource(url);
    dataSource.connect();
    return dataSource;
  }

  public static DataSource createMergingDataSource(DataSource[] sources) throws IncompatibleSourceException
  {
View Full Code Here

        return false;
    DataSource ds = proc.getDataOutput();
    if (ds == null)
        return false;
    inputSourceNext = ds;
    ds.connect();
    inputStreamsNext = ((PushBufferDataSource)ds).getStreams();
    inputProcessorNext = proc;
    return true;
      }
  } catch (MalformedURLException mue) {
View Full Code Here

            try
            {
                final Class<?> dataSourceClass = Class.forName(dataSourceClassName);
                final DataSource dataSource = (DataSource) dataSourceClass.newInstance();
                dataSource.setLocator(sourceLocator);
                dataSource.connect();
                return createPlayer(dataSource);
               
                // TODO: JMF seems to disconnect data sources in this method, based on this stack trace:
//              java.lang.NullPointerException
//              at com.sun.media.protocol.rtp.DataSource.disconnect(DataSource.java:207)
View Full Code Here

        catch (Exception e)
        {   logger.log(Level.WARNING, ""  + e, e);
            throw new NoPlayerException();
        }
        final URLDataSource dataSource = new URLDataSource(url);
        dataSource.connect();   // TODO: there is a problem because we connect to the datasource here, but
                                // the following call may try twice or more to use the datasource with a player, once
                                // for the right content type, and multiple times for unknown.  The first attempt (for example) may actually
                                // read data, in which case the second one will be missing data when it reads.
                                // really, the datasource needs to be recreated.
                                // The workaround for now is that URLDataSource (and others) allows repeated connect() calls.
View Full Code Here

            try
            {
                final Class<?> dataSourceClass = Class.forName(dataSourceClassName);
                final DataSource dataSource = (DataSource) dataSourceClass.newInstance();
                dataSource.setLocator(sourceLocator);
                dataSource.connect();
                return dataSource;
               
               
            }
            catch (ClassNotFoundException e)
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.