Package quicktime.std.movies.media

Examples of quicktime.std.movies.media.Media


    boolean hasVideo = false;
   
    for (int i = 1; i <= m.getTrackCount(); ++i)
    {
      final Track track = m.getTrack(i);
      final Media media = track.getMedia();
      final MediaHandler mediaHandler = media.getHandler();
      // MediaHandler can be instanceof both AudioMediaHandler and VisualMediaHandler, for example MPEGMediaHandler.
      if (mediaHandler instanceof AudioMediaHandler)
      {
        hasAudio = true;
      }
View Full Code Here


    // add text track
    Track textTrack;
    try
    {
      textTrack = movie.addTrack(TEXT_TRACK_WIDTH, TEXT_TRACK_HEIGHT, 0);
      Media textMedia = new TextMedia(textTrack, movie.getTimeScale());
      TextMediaHandler handler = (TextMediaHandler)textMedia.getHandler();
      textMedia.beginEdits();
      byte[] msgBytes = text.getBytes();
      QTPointer msgPoint = new QTPointer(msgBytes);
      handler.addTextSample(msgPoint, QDFont.getFNum(fontName), fontSize, style,
        new QDColor(fgColor[0] / 255f, fgColor[1] / 255f, fgColor[2] / 255f),
        new QDColor(bgColor[0] / 255f, bgColor[1] / 255f, bgColor[2] / 255f),
        QDConstants.teJustLeft, textBox, dfFlag, QDFont.getFNum(fontName), 0, 0,
        QDColor.white, Math.round(duration * movie.getTimeScale()));
      textMedia.endEdits();
      textTrack.insertMedia(Math.round(start * movie.getTimeScale()), 0,
        textMedia.getDuration(), 1);

      // position the text track to (x, y)
      Matrix mat = new Matrix();
      mat.rect(new QDRect(0, 0, TEXT_TRACK_WIDTH, TEXT_TRACK_HEIGHT),
        new QDRect(x, y, TEXT_TRACK_WIDTH, TEXT_TRACK_HEIGHT));
View Full Code Here

/*     */
/*     */   private static Movie checkMovie(Movie paramMovie) throws QTException {
/*     */     try {
/* 494 */       if (paramMovie.getTrackCount() > 1) return paramMovie;
/* 495 */       Track localTrack = paramMovie.getIndTrack(1);
/* 496 */       Media localMedia = Media.getTrackMedia(localTrack);
/* 497 */       if (localMedia.getSampleCount() > 1) {
/* 498 */         paramMovie.setActive(true);
/* 499 */         return paramMovie;
/*     */       }
/*     */
/* 502 */       localMedia.disposeQTObject();
/* 503 */       localTrack.disposeQTObject();
/* 504 */       paramMovie.disposeQTObject(); } catch (QTException localQTException) {
/*     */     }
/* 506 */     return null;
/*     */   }
View Full Code Here

/*     */
/*     */   private static Movie checkMovie(Movie paramMovie) throws QTException {
/*     */     try {
/* 473 */       if (paramMovie.getTrackCount() > 1) return paramMovie;
/* 474 */       Track localTrack = paramMovie.getIndTrack(1);
/* 475 */       Media localMedia = Media.getTrackMedia(localTrack);
/* 476 */       if (localMedia.getSampleCount() > 1) {
/* 477 */         paramMovie.setActive(true);
/* 478 */         return paramMovie;
/*     */       }
/*     */
/* 481 */       localMedia.disposeQTObject();
/* 482 */       localTrack.disposeQTObject();
/* 483 */       paramMovie.disposeQTObject(); } catch (QTException localQTException) {
/*     */     }
/* 485 */     return null;
/*     */   }
View Full Code Here

/*     */
/*     */   /** @deprecated */
/*     */   public static ImageDataSequence createSequence(Track paramTrack)
/*     */     throws QTException
/*     */   {
/* 337 */     Media localMedia = Media.getTrackMedia(paramTrack);
/* 338 */     int i = localMedia.getSampleCount();
/* 339 */     int j = 0;
/* 340 */     ImageDataSequence localImageDataSequence = new ImageDataSequence((ImageDescription)localMedia.getSampleDescription(1));
/* 341 */     for (int k = 1; k <= i; k++) {
/* 342 */       MediaSample localMediaSample = localMedia.getSample(0, j, 1);
/* 343 */       if (localMediaSample.descriptionIndex != 1)
/*     */         break;
/* 345 */       QTPointerRef localQTPointerRef = ((QTHandleRef)localMediaSample.data.clone()).toQTPointer();
/* 346 */       localImageDataSequence.addMember(RawEncodedImage.fromQTPointer(localQTPointerRef));
/* 347 */       j += localMediaSample.duration;
View Full Code Here

TOP

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

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.