Package quicktime.std.movies.media

Examples of quicktime.std.movies.media.DataRef


      //clipMovie = clipMovie.fromHandle(theHandle);
      if (clipMovie == null) {
      //  showOKDialog ("MakeMedia.pasteMovie: Whoa.", "No movie on scrap");
        return false;
      } else {
        DataRef dr =  new DataRef(theHandle);
        clipMovie.setDefaultDataRef(dr); // need this to edit media
        if (includeMeta) addTextToMovie(clipMovie, mess);
        // check selection, paste to end if none
        TimeInfo selection =
          targetMovie.getSelection();
View Full Code Here


        // first try a local file using the dataPath. usually this will
        // work ok, but sometimes the dataPath is inside a jar file,
        // which is less fun, so this will crap out.
        File file = new File(parent.dataPath(filename));
        if (file.exists()) {
          movie = fromDataRef(new DataRef(new QTFile(file)));
          //init(parent, movie, ifps);
          //return;
        }
      } catch (Exception e) { }  // ignored

      // read from a folder local to the current working dir
      // called "data". presumably this might be the data folder,
      // though that should be caught above, if such a folder exists.
      /*
      if (movie == null) {
        try {
          File file = new File("data", filename);
          if (file.exists()) {
            movie = fromDataRef(new DataRef(new QTFile(file)));
            init(parent, movie, ifps);
            return;
          }
        } catch (QTException e2) { }
      }
      */

      // read from a file just hanging out in the local folder.
      // this might happen when the video library is used with some
      // other application, or the person enters a full path name
      if (movie == null) {
        try {
          File file = new File(filename);
          if (file.exists()) {
            movie = fromDataRef(new DataRef(new QTFile(file)));
            //init(parent, movie, ifps);
            //return;
          }
        } catch (QTException e1) { }
      }

    } catch (SecurityException se) {
      // online, whups. catch the security exception out here rather than
      // doing it three times (or whatever) for each of the cases above.
    }

    // if the movie can't be read from a local file, it has to be read
    // into a byte array and passed to qtjava. it's annoying that apple
    // doesn't have something in the api to read a movie from a friggin
    // InputStream, but oh well. it's their api.
    if (movie == null) {
      byte data[] = parent.loadBytes(filename);
      //int dot = filename.lastIndexOf(".");
      // grab the extension from the file, use mov if there is none
      //String extension = (dot == -1) ? "mov" :
      //  filename.substring(dot + 1).toLowerCase();
      try {
        movie = fromDataRef(new DataRef(new QTHandle(data)));
      } catch (QTException e) {
        e.printStackTrace();
      }
    }

View Full Code Here

/*     */   /** @deprecated */
/*     */   public static QTDrawable makeDrawable(InputStream paramInputStream, int paramInt, String paramString, QTDrawableMaker paramQTDrawableMaker)
/*     */     throws IOException, QTException
/*     */   {
/* 345 */     QTHandle localQTHandle = readBytesIntoHandle(paramInputStream);
/* 346 */     DataRef localDataRef = new DataRef(localQTHandle, paramInt, paramString);
/*     */
/* 348 */     if ((paramString != null) && (
/* 349 */       ("mid".equalsIgnoreCase(paramString)) || ("smf".equalsIgnoreCase(paramString)) || ("midi".equalsIgnoreCase(paramString)) || ("kar".equalsIgnoreCase(paramString))))
/*     */     {
/* 353 */       localObject = importMovie(localQTHandle, QTUtils.toOSType("Midi"));
View Full Code Here

/*     */       } catch (IOException localIOException) {
/* 421 */         throw new QTException(-43);
/*     */       }
/*     */     }
/*     */
/* 425 */     DataRef localDataRef = new DataRef(paramString);
/*     */
/* 427 */     GraphicsImporter localGraphicsImporter = importImage(localDataRef);
/* 428 */     Movie localMovie = null;
/* 429 */     if (localGraphicsImporter != null) {
/* 430 */       localMovie = checkIfMovie(localDataRef);
View Full Code Here

/*     */   private static Movie importMovie(QTHandle paramQTHandle, int paramInt) throws QTException {
/* 525 */     if (paramInt == 0) throw new QTException(-2003); try
/*     */     {
/* 527 */       MovieImporter localMovieImporter = new MovieImporter(paramInt);
/* 528 */       Movie localMovie = new Movie(1);
/* 529 */       localMovie.setDefaultDataRef(new DataRef(new QTHandle()));
/* 530 */       localMovieImporter.fromHandle(paramQTHandle, localMovie, null, 0, 1);
/* 531 */       return localMovie; } catch (QTException localQTException) {
/*     */     }
/* 533 */     return null;
/*     */   }
View Full Code Here

/*     */   private static Movie importMovie(QTHandle paramQTHandle, int paramInt) throws QTException {
/* 504 */     if (paramInt == 0) throw new QTException(-2003); try
/*     */     {
/* 506 */       MovieImporter localMovieImporter = new MovieImporter(paramInt);
/* 507 */       Movie localMovie = new Movie(1);
/* 508 */       localMovie.setDefaultDataRef(new DataRef(new QTHandle()));
/* 509 */       localMovieImporter.fromHandle(paramQTHandle, localMovie, null, 0, 1);
/* 510 */       return localMovie; } catch (QTException localQTException) {
/*     */     }
/* 512 */     return null;
/*     */   }
View Full Code Here

TOP

Related Classes of quicktime.std.movies.media.DataRef

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.