Package org.gstreamer

Examples of org.gstreamer.Fraction


     *         available
     */
    public double getVideoSinkFrameRate() {
      for (Element sink : getSinks()) {
        for (Pad pad : sink.getPads()) {
          Fraction frameRate = Video.getVideoFrameRate(pad);
          if (frameRate != null) {
            return frameRate.toDouble();
          }
        }
      }
      return 0;
    }
View Full Code Here


            if (keepAspect) {
                // Scale width according to pixel aspect ratio.
                Caps videoCaps = videoPad.getNegotiatedCaps();
                Structure capsStruct = videoCaps.getStructure(0);
                if (capsStruct.hasField("pixel-aspect-ratio")) {
                    Fraction pixelAspectRatio = capsStruct.getFraction("pixel-aspect-ratio");
                    scaledWidth = scaledWidth * pixelAspectRatio.getNumerator() / pixelAspectRatio.getDenominator();
                }
            }

            // Tell swing to use the new buffer
            update(scaledWidth, currentImage.getHeight());
View Full Code Here

   *         available
   */
  public double getVideoSinkFrameRate() {
    for (Element sink : getSinks()) {
      for (Pad pad : sink.getPads()) {
        Fraction frameRate = Video.getVideoFrameRate(pad);
        if (frameRate != null) {
          return frameRate.toDouble();
        }
      }
    }
    return 0;
  }
View Full Code Here

TOP

Related Classes of org.gstreamer.Fraction

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.