当前位置: 首页>>代码示例>>Java>>正文


Java VideoFormat.JPEG属性代码示例

本文整理汇总了Java中javax.media.format.VideoFormat.JPEG属性的典型用法代码示例。如果您正苦于以下问题:Java VideoFormat.JPEG属性的具体用法?Java VideoFormat.JPEG怎么用?Java VideoFormat.JPEG使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.media.format.VideoFormat的用法示例。


在下文中一共展示了VideoFormat.JPEG属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ImageSourceStream

public ImageSourceStream(int width, int height, int frameRate, Vector images) {
    this.width = width;
    this.height = height;
    this.images = images;

    format = new VideoFormat(VideoFormat.JPEG,
			new Dimension(width, height),
			Format.NOT_SPECIFIED,
			Format.byteArray,
			(float)frameRate);
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:11,代码来源:JpegImagesToMovie.java

示例2: setJPEGQuality

/**
    * Setting the encoding quality to the specified value on the JPEG encoder.
    * 0.5 is a good default.
    */
   void setJPEGQuality(Player p, float val) {

Control cs[] = p.getControls();
QualityControl qc = null;
VideoFormat jpegFmt = new VideoFormat(VideoFormat.JPEG);

// Loop through the controls to find the Quality control for
	// the JPEG encoder.
for (int i = 0; i < cs.length; i++) {

    if (cs[i] instanceof QualityControl &&
	cs[i] instanceof Owned) {
	Object owner = ((Owned)cs[i]).getOwner();

	// Check to see if the owner is a Codec.
	// Then check for the output format.
	if (owner instanceof Codec) {
	    Format fmts[] = ((Codec)owner).getSupportedOutputFormats(null);
	    for (int j = 0; j < fmts.length; j++) {
		if (fmts[j].matches(jpegFmt)) {
		    qc = (QualityControl)cs[i];
    		    qc.setQuality(val);
		    System.err.println("- Setting quality to " + 
				val + " on " + qc);
		    break;
		}
	    }
	}
	if (qc != null)
	    break;
    }
}
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:37,代码来源:AVTransmitter.java

示例3: PlayerSourceStream

public PlayerSourceStream(String screenRecordingFileName) throws IOException {

      inStream = new FileInputStream(screenRecordingFileName);
      recordingStream = new RecordingStream(inStream);

      width = (int) recordingStream.getArea().getWidth();
      height = (int) recordingStream.getArea().getHeight();
      frameRate = 5;
      format = new VideoFormat(VideoFormat.JPEG, new Dimension(width, height),
            Format.NOT_SPECIFIED, Format.byteArray, (float) frameRate);
   }
 
开发者ID:openwarrior,项目名称:java-screen-recorder,代码行数:11,代码来源:PlayerSourceStream.java

示例4: JpegSourceStream

public JpegSourceStream(int width, int height, int frameRate, File[] jpegFiles) {
    this.width = width;
    this.height = height;
    this.jpegFiles = jpegFiles;

    this.videoFormat = new VideoFormat(VideoFormat.JPEG,
            new Dimension(width, height),
            Format.NOT_SPECIFIED,
            Format.byteArray,
            (float) frameRate);
}
 
开发者ID:NeuroBox3D,项目名称:NeuGen,代码行数:11,代码来源:MovieMaker.java

示例5: ImageSourceStream

public ImageSourceStream(int width, int height, int frameRate, DataList data) {
        this.width = width;
        this.height = height;
        this.frameRate = (float) frameRate;
        this.JPGImages = data;
            
          /* The commented out code below is remains from a
           * failed attempt to include avi output. The code is
           * left in the source like this as a reminder to the
           * author
           */
//            format = new VideoFormat(VideoFormat.JPEG,
//                    new Dimension(width, height),
//                    Format.NOT_SPECIFIED,
//                    Format.byteArray,
//                    (float)frameRate);

        format = new VideoFormat(VideoFormat.JPEG,
                new Dimension(width, height),
                Format.NOT_SPECIFIED,
                Format.byteArray,
                (float) frameRate);

            
          /* The commented out code below is remains from a
           * failed attempt to include avi output. The code is
           * left in the source like this as a reminder to the
           * author
           */
//            final int rMask = 0x00ff0000;
//            final int gMask = 0x0000FF00;
//            final int bMask = 0x000000ff;

//            format =
//                new javax.media.format.RGBFormat(
//                    new Dimension(width, height),
//                    Format.NOT_SPECIFIED,
//                    Format.intArray,
//                    frameRate,
//                    24,
//                    rMask,
//                    gMask,
//                    bMask);
    }
 
开发者ID:jimmyfm,项目名称:krut,代码行数:44,代码来源:ImageSourceStream.java


注:本文中的javax.media.format.VideoFormat.JPEG属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。