Package quicktime.util

Examples of quicktime.util.QTHandle


    Movie movie = null;
    try
    {
      movie = new Movie();
      mov.insertSegment(movie, 0, mov.getDuration(), 0);
      movie.setDefaultDataRef(new DataRef(new QTHandle()));
    } // try
    catch (QTException qte)
    {
      qte.printStackTrace();
    } // catch (QTException)
View Full Code Here


  throws QTException
  {
    Track targetTrack = target.newTrack(0f, 0f, 20);
    @SuppressWarnings("unused")
    SoundMedia media = new SoundMedia(targetTrack,
      source.getMedia().getTimeScale(), new DataRef(new QTHandle()));
    source.insertSegment(targetTrack, 0, source.getDuration(), 0);
    return targetTrack;
  } // addAudioTrack(Track, Movie)
View Full Code Here

    Movie movie = MovieUtils.cloneMovie(mov);
    try
    {
      movie = new Movie();
      mov.insertSegment(movie, 0, mov.getDuration(), 0);
      movie.setDefaultDataRef(new DataRef(new QTHandle()));
    } // try
    catch (QTException qte)
    {
      qte.printStackTrace();
    } // catch (QTException)
View Full Code Here

  {
    Track targetTrack = target.newTrack(source.getSize().getWidthF(),
      source.getSize().getHeightF(), 1.0f);
    @SuppressWarnings("unused")
    VideoMedia media = new VideoMedia(targetTrack,
      source.getMedia().getTimeScale(), new DataRef(new QTHandle()));
    int duration = source.getDuration();
    source.insertSegment(targetTrack, 0, duration, 0);
    return targetTrack;
  } // addVideoTrack(Track, Movie)
View Full Code Here

    // BOOK ERRATA: this is buggy on Windows for time codes other
    // than 00:00:00;00.  You need to adjust for endianness, as
    // seen in the revised (uncommented) line.
    // frameNums[0] = frameNumber;
    frameNums[0] = EndianOrder.flipNativeToBigEndian32(frameNumber);
    QTHandle frameNumHandle = new QTHandle (4, false);
    frameNumHandle.copyFromArray(0, frameNums, 0, 1);

    // create a time code description (sample to be added)
    TimeCodeDescription tcDesc = new TimeCodeDescription();
    tcDesc.setTimeCodeDef (tcDef);

    // add the sample to the TimeCodeMedia
    tcMedia.beginEdits();
    tcMedia.addSample(frameNumHandle, 0, frameNumHandle.getSize(),
      movie.getDuration(), tcDesc, 1, 0);
    tcMedia.endEdits();

    // insert media into track
    tcTrack.insertMedia(0, 0, tcMedia.getDuration(), 1);
View Full Code Here

      videoMedia.beginEdits();
      int frames = pics.length;
      int rawImageSize = QTImage.getMaxCompressionSize(gw, gRect,
        gw.getPixMap().getPixelSize(), StdQTConstants.codecLosslessQuality,
        CODEC_TYPE, CodecComponent.bestFidelityCodec);
      QTHandle imageHandle = new QTHandle(rawImageSize, true);
      imageHandle.lock();
      RawEncodedImage compressed = RawEncodedImage.fromQTHandle(imageHandle);
      CSequence seq = new CSequence(gw, gRect, gw.getPixMap().getPixelSize(),
        CODEC_TYPE, CodecComponent.bestFidelityCodec,
        StdQTConstants.codecLosslessQuality,
        StdQTConstants.codecLosslessQuality,
View Full Code Here

      // make a copy of mov
      newMov = cloneMovie(mov);
      Track newAudio;

      // use addEmptyTrack to make sure it has SoundMedia characteristics
      newAudio = newMov.addEmptyTrack(audio, new DataRef(new QTHandle()));
      audio.insertSegment(newAudio, 0, audio.getDuration(),
        (int)(start * newMov.getTimeScale()));
    } // try
    catch (QTException qte)
    {
View Full Code Here

    try
    {
      // make a copy of mov
      newMov = cloneMovie(mov);
      Track newAudio;
      newAudio = newMov.addEmptyTrack(audio, new DataRef(new QTHandle()));

      // use addEmptyTrack to make sure it has Sound Media characteristics
      audio.insertSegment(newAudio, 0, (int) (duration
          * audio.getMovie().getTimeScale()),
          (int) (start * newMov.getTimeScale()));
 
View Full Code Here

            _gw = new QDGraphics(_videoSize);

            int size = QTImage.getMaxCompressionSize(_gw, _videoSize, _gw
                    .getPixMap().getPixelSize(), codecNormalQuality,
                    kAnimationCodecType, CodecComponent.anyCodec);
            _imageHandle = new QTHandle(size, true);
            _imageHandle.lock();
            _compressedFrame = RawEncodedImage.fromQTHandle(_imageHandle);

            _frameRateValue = ((IntToken) frameRate.getToken()).intValue();
            _videoSequence = new CSequence(_gw, _videoSize, _gw.getPixMap()
View Full Code Here

            _gw = new QDGraphics(_videoSize);

            int size = QTImage.getMaxCompressionSize(_gw, _videoSize, _gw
                    .getPixMap().getPixelSize(), codecNormalQuality,
                    kAnimationCodecType, CodecComponent.anyCodec);
            _imageHandle = new QTHandle(size, true);
            _imageHandle.lock();
            _compressedFrame = RawEncodedImage.fromQTHandle(_imageHandle);

            _frameRateValue = ((IntToken) frameRate.getToken()).intValue();
            _videoSequence = new CSequence(_gw, _videoSize, _gw.getPixMap()
View Full Code Here

TOP

Related Classes of quicktime.util.QTHandle

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.