Examples of MediaLocator


Examples of javax.media.MediaLocator

  synchronized (this) {
      availableCount++; 
  }
  Track track = getTrack(index);
  track.close();
  setMediaLocator(index, new MediaLocator("unassigned"));
  setPlayingTime(index, 0);
  setStartTime(index, 0);
  fireTrackModelUpdate(new TrackModelDeassignEvent(this, index));
  Debug.printObject("exit deassignTrack : " + index);
    }
View Full Code Here

Examples of javax.media.MediaLocator

      // if we add only a small subset, we miss some, building the graph is faster with leaving it as it is
      Format[] formats = net.sf.fmj.media.protocol.javasound.DataSource.querySupportedFormats(i);
     
      if ( (null != formats) && (formats.length > 0) )
      {
        CaptureDeviceInfo jmfInfo = new CaptureDeviceInfo("javasound:" + mixerInfo[i].getName() + ":" + index, new MediaLocator("javasound:#" + i), formats);
        index++;
       
        if (CaptureDeviceManager.getDevice(jmfInfo.getName()) == null)
        {
          CaptureDeviceManager.addDevice(jmfInfo);
View Full Code Here

Examples of javax.media.MediaLocator

         
          final CaptureDeviceInfo jmfInfo;
          if (QUERY_EXACT_FORMATS)
          {
            final Format[] formats = getFormats(system, civilInfo.getDeviceID());
            jmfInfo = new CaptureDeviceInfo("civil:" + civilInfo.getDescription() + ":" + i, new MediaLocator("civil:" + civilInfo.getDeviceID()), formats);
          }
          else
          {
            jmfInfo = new CaptureDeviceInfo("civil:" + civilInfo.getDescription() + ":" + i, new MediaLocator("civil:" + civilInfo.getDeviceID()), new Format[] {new RGBFormat()});
          }
         
          if (CaptureDeviceManager.getDevice(jmfInfo.getName()) == null)
          {
            CaptureDeviceManager.addDevice(jmfInfo);
View Full Code Here

Examples of javax.media.MediaLocator

   
    logger.fine("setMediaLocation: " + mediaLocation + " startAutomatically=" + startAutomatically);
   
    try
    {
      MediaLocator locator = new MediaLocator(mediaLocation);
      stop();
      if (player != null) {
        player.close();
        player.deallocate();
        player = null;
View Full Code Here

Examples of javax.media.MediaLocator

      // workaround because JMF does not like relative file URLs.
      if (source.getProtocol().equals("file"))
      {  final String newUrl = URLUtils.createAbsoluteFileUrl(source.toExternalForm());
        if (newUrl != null)
        {
          final MediaLocator newSource = new MediaLocator(newUrl);
          if (!source.toExternalForm().equals(newSource.toExternalForm()))
          {
            logger.warning("Changing file URL to absolute for JMF, from " + source.toExternalForm() + " to " + newSource);
            source = newSource;
          }
        }
View Full Code Here

Examples of javax.media.MediaLocator

    contentPane.add(panel);
    frame.pack();
    if (parent != null)
      frame.setLocationRelativeTo(parent);
    frame.setVisible(true);
    MediaLocator result = panel.okClicked ? panel.getSelectedMediaLocator() : null;
    return result;
  }
View Full Code Here

Examples of javax.media.MediaLocator

    public MultiPlayer(String[] mediaFiles, MultiPlayerControl mpc) {
  tracks = new TrackList(mediaFiles.length);
  for (int i = 0; i < mediaFiles.length; i++) {
      try {
          String path = new File(mediaFiles[i]).getCanonicalPath();
          MediaLocator ml = Utility.appArgToMediaLocator(path);
          Player player = Manager.createPlayer(ml);
          tracks.addElement(new Track(i, ml, player));
      } catch (Exception e) {
    System.err.println(
        "Unable to create Player from " + mediaFiles[i]);
View Full Code Here

Examples of javax.media.MediaLocator

        NoDataSourceException,
        NoPlayerException,
        IOException
    {
        this.url = url;
        setMediaLocator( new MediaLocator(url) );
    }
View Full Code Here

Examples of javax.media.MediaLocator

    }

    boolean createInputDataSource(String mediaFile) {
  Processor proc = null;
  try {
      MediaLocator ml = new MediaLocator(mediaFile);
      proc = Manager.createProcessor(ml);
      if (proc != null) {
    boolean reachedState = waitForState(proc, Processor.Configured);
    if (!reachedState)
        return false;
View Full Code Here

Examples of javax.media.MediaLocator

  // Prepend a "file:" if no protocol is specified
  if (movieURL.indexOf(":") < 3)
      movieURL = "file:" + movieURL;
  // Try to create a player
        try {
      player = Manager.createPlayer(new MediaLocator(movieURL));
      player.addControllerListener(this);
      player.realize();
        } catch (Exception e) {
            System.out.println("Error creating player");
            return;
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.