Package javax.media.protocol

Examples of javax.media.protocol.DataSource


//          e.printStackTrace();
//        }
//      }
      // get the output datasource of the processor and exit
      // if we fail
      DataSource ds = null;

      try
      {
        ds = processor.getDataOutput();
      } catch (NotRealizedError e)
View Full Code Here


      return false;
  }

  // Get the output DataSource from the processor and
  // hook it up to the DataSourceHandler.
  DataSource ods = p.getDataOutput();
  DataSourceHandler handler = new DataSourceHandler();

  try {
      handler.setSource(ods);
  } catch (IncompatibleSourceException e) {
View Full Code Here

      System.err.println("Cannot build media locator from: " + inputURL);
      prUsage();
      System.exit(0);
  }

  DataSource ds = null;

  // Create a DataSource given the media locator.
  try {
      ds = Manager.createDataSource(ml);
  } catch (Exception e) {
View Full Code Here

      System.err.println("Cannot build media locator from: " + mlStr);
      prUsage();
      System.exit(0);
  }

  DataSource ds = null;

  // Create a DataSource given the media locator.
  try {
      ds = Manager.createDataSource(ml);
  } catch (Exception e) {
View Full Code Here

      System.err.println("Cannot build media locator from: " + args[0]);
      prUsage();
      System.exit(0);
  }

  DataSource ds = null;

  // Create a DataSource given the media locator.
  try {
      ds = Manager.createDataSource(ml);
  } catch (Exception e) {
View Full Code Here

   
  else if (evt instanceof NewReceiveStreamEvent) {

      try {
    stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
    DataSource ds = stream.getDataSource();

    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    if (ctl != null){
        System.err.println("  - Recevied new RTP stream: " + ctl.getFormat());
    } else
        System.err.println("  - Recevied new RTP stream");

    if (participant == null)
        System.err.println("      The sender of this stream had yet to be identified.");
    else {
        System.err.println("      The stream comes from: " + participant.getCNAME());
    }

    // create a player by passing datasource to the Media Manager
    Player p = javax.media.Manager.createPlayer(ds);
    if (p == null)
        return;

    p.addControllerListener(this);
    p.realize();
    PlayerWindow pw = new PlayerWindow(p, stream);
    playerWindows.addElement(pw);

    // Notify intialize() that a new stream had arrived.
    synchronized (dataSync) {
        dataReceived = true;
        dataSync.notifyAll();
    }

      } catch (Exception e) {
    System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
    return;
      }
       
  }

  else if (evt instanceof StreamMappedEvent) {

       if (stream != null && stream.getDataSource() != null) {
    DataSource ds = stream.getDataSource();
    // Find out the formats.
    RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
    System.err.println("  - The previously unidentified stream ");
    if (ctl != null)
        System.err.println("      " + ctl.getFormat());
    System.err.println("      had now been identified as sent by: " + participant.getCNAME());
       }
View Full Code Here

    /**
     * Create the DataSink.
     */
    DataSink createDataSink(Processor p, MediaLocator outML) {

  DataSource ds;

  if ((ds = p.getDataOutput()) == null) {
      System.err.println("Something is really wrong: the processor does not have an output DataSource");
      return null;
  }
View Full Code Here

    System.err.println("Will default to 1.");
    copies = 1;
      }
  }

  DataSource ds = null;

  try {
      ds = Manager.createDataSource(ml);
  } catch (Exception e) {
      System.err.println("Cannot create DataSource from: " + ml);
View Full Code Here

    private String createProcessor() {
  if (locator == null)
      return "Locator is null";

  DataSource ds;
  DataSource clone;

  try {
      ds = Manager.createDataSource(locator);
  } catch (Exception e) {
      return "Couldn't create DataSource";
View Full Code Here

    private String createProcessor() {
  if (locator == null)
      return "Locator is null";

  DataSource ds;
  DataSource clone;

  try {
      ds = javax.media.Manager.createDataSource(locator);
  } catch (Exception e) {
      return "Couldn't create DataSource";
View Full Code Here

TOP

Related Classes of javax.media.protocol.DataSource

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.