Package javax.media

Examples of javax.media.MediaLocator.toExternalForm()


    private void buttonChooseCaptureDeviceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonChooseCaptureDeviceActionPerformed
    MediaLocator locator = CaptureDeviceBrowser.run(null); // TODO: correct parent frame
    if (locator != null)
    {
      textFieldURL.setText(locator.toExternalForm());
    }
     
    }//GEN-LAST:event_buttonChooseCaptureDeviceActionPerformed

    private void buttonBrowseFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonBrowseFileActionPerformed
View Full Code Here


    MediaLocator locator = getSource().getLocator();
   
    // workaround because JMF does not like relative file URLs.
    if (locator.getProtocol().equals("file"))
    {  final String newUrl = URLUtils.createAbsoluteFileUrl(locator.toExternalForm());
      if (newUrl != null)
      {
        final MediaLocator newSource = new MediaLocator(newUrl);
        if (!locator.toExternalForm().equals(newSource.toExternalForm()))
        {
View Full Code Here

    if (locator.getProtocol().equals("file"))
    {  final String newUrl = URLUtils.createAbsoluteFileUrl(locator.toExternalForm());
      if (newUrl != null)
      {
        final MediaLocator newSource = new MediaLocator(newUrl);
        if (!locator.toExternalForm().equals(newSource.toExternalForm()))
        {
          logger.warning("Changing file URL to absolute, from " + locator.toExternalForm() + " to " + newSource);
          locator = newSource;
        }
      }
View Full Code Here

      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

  public void onOpenCaptureDevice()
  {
    MediaLocator locator = CaptureDeviceBrowser.run(getParentFrame());
    if (locator != null)
    {
      addMediaLocatorAndLoad(locator.toExternalForm());
    }
  }
 
  private Frame getParentFrame()
  {
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.