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


Java Format.NOT_SPECIFIED属性代码示例

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


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

示例1: PowerMeter

public PowerMeter(int nPowersPerSec) {
this.nPowersPerSec = nPowersPerSec;
timeStamps = new long[nPowersPerSec * NUM_SECONDS];
powers = new float[nPowersPerSec * NUM_SECONDS];
inputFormats = new Format[] {new AudioFormat(AudioFormat.LINEAR,
					     Format.NOT_SPECIFIED,
					     16,
					     Format.NOT_SPECIFIED,
					     Format.NOT_SPECIFIED,
					     Format.NOT_SPECIFIED,
					     Format.NOT_SPECIFIED,
					     Format.NOT_SPECIFIED,
					     Format.byteArray)};

outputFormats = new Format[] {new AudioFormat(AudioFormat.LINEAR,
					      Format.NOT_SPECIFIED,
					      16,
					      Format.NOT_SPECIFIED,
					      Format.NOT_SPECIFIED,
					      Format.NOT_SPECIFIED,
					      Format.NOT_SPECIFIED,
					      Format.NOT_SPECIFIED,
					      Format.byteArray)};
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:24,代码来源:PowerMeter.java

示例2: nextDouble

public double nextDouble() throws ParseException
{
    final String s = nextString();
    if (s == null)
        return Format.NOT_SPECIFIED;

    if (s.equals(NOT_SPECIFIED))
        return Format.NOT_SPECIFIED;

    try
    {
        return Double.parseDouble(s);
    } catch (NumberFormatException e)
    {
        throw new ParseException("Expected double: " + s, -1);
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:17,代码来源:FormatArgUtils.java

示例3: nextEndian

public int nextEndian() throws ParseException
{
    String s = nextString();
    if (s == null)
        return Format.NOT_SPECIFIED;

    if (s.equals(NOT_SPECIFIED))
        return Format.NOT_SPECIFIED;

    s = s.toUpperCase();

    if (s.equals(BIG_ENDIAN))
        return AudioFormat.BIG_ENDIAN;
    else if (s.equals(LITTLE_ENDIAN))
        return AudioFormat.LITTLE_ENDIAN;
    else
        throw new ParseException("Expected one of [" + BIG_ENDIAN + ","
                + LITTLE_ENDIAN + "]: " + s, -1);
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:19,代码来源:FormatArgUtils.java

示例4: nextFloat

public float nextFloat() throws ParseException
{
    final String s = nextString();
    if (s == null)
        return Format.NOT_SPECIFIED;

    if (s.equals(NOT_SPECIFIED))
        return Format.NOT_SPECIFIED;

    try
    {
        return Float.parseFloat(s);
    } catch (NumberFormatException e)
    {
        throw new ParseException("Expected float: " + s, -1);
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:17,代码来源:FormatArgUtils.java

示例5: nextInt

public int nextInt() throws ParseException
{
    final String s = nextString();
    if (s == null)
        return Format.NOT_SPECIFIED;

    if (s.equals(NOT_SPECIFIED))
        return Format.NOT_SPECIFIED;

    try
    {
        return Integer.parseInt(s);
    } catch (NumberFormatException e)
    {
        throw new ParseException("Expected integer: " + s, -1);
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:17,代码来源:FormatArgUtils.java

示例6: nextRGBFormatEndian

public int nextRGBFormatEndian() throws ParseException
{
    String s = nextString();
    if (s == null)
        return Format.NOT_SPECIFIED;

    if (s.equals(NOT_SPECIFIED))
        return Format.NOT_SPECIFIED;

    s = s.toUpperCase();

    if (s.equals(BIG_ENDIAN))
        return RGBFormat.BIG_ENDIAN;
    else if (s.equals(LITTLE_ENDIAN))
        return RGBFormat.LITTLE_ENDIAN;
    else
        throw new ParseException("Expected one of [" + BIG_ENDIAN + ","
                + LITTLE_ENDIAN + "]: " + s, -1);
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:19,代码来源:FormatArgUtils.java

示例7: nextSigned

public int nextSigned() throws ParseException
{
    String s = nextString();
    if (s == null)
        return Format.NOT_SPECIFIED;

    if (s.equals(NOT_SPECIFIED))
        return Format.NOT_SPECIFIED;

    s = s.toUpperCase();

    if (s.equals(UNSIGNED))
        return AudioFormat.UNSIGNED;
    else if (s.equals(SIGNED))
        return AudioFormat.SIGNED;
    else
        throw new ParseException("Expected one of [" + UNSIGNED + ","
                + UNSIGNED + "]: " + s, -1);
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:19,代码来源:FormatArgUtils.java

示例8: readHeader

private void /* for now void */ readHeader()
    throws IOException, BadHeaderException {

    minLocation = getLocation(stream); // Should be zero

    long contentLength = stream.getContentLength();
    if ( contentLength != SourceStream.LENGTH_UNKNOWN ) {
        double durationSeconds = contentLength / bytesPerSecond;


        duration = new Time(durationSeconds);
        maxLocation = contentLength;

    } else {
        maxLocation = Long.MAX_VALUE;
    }

    boolean signed = true;
    boolean bigEndian = false;
    format = new AudioFormat(AudioFormat.GSM,
                             8000,  // sampleRate,
                             16,    // sampleSizeInBits,
                             1,     // channels,
                             bigEndian ? AudioFormat.BIG_ENDIAN : 
                            AudioFormat.LITTLE_ENDIAN,
                             signed ? AudioFormat.SIGNED : 
                            AudioFormat.UNSIGNED,
                             (blockSize * 8), // frameSizeInBits
                             Format.NOT_SPECIFIED,  
                             Format.byteArray);
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:31,代码来源:GsmParser.java

示例9: 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

示例10: RotationEffect

public RotationEffect(int num) {
    if ( num <= 0 )
        this.num = 20;
    else
        this.num = num;
    this.angle = 2.0*3.1415926/this.num;
    buildTable();

    inputFormats = new Format[] {
        new RGBFormat(null,
                      Format.NOT_SPECIFIED,
                      Format.byteArray,
                      Format.NOT_SPECIFIED,
                      24,
                      3, 2, 1,
                      3, Format.NOT_SPECIFIED,
                      Format.TRUE,
                      Format.NOT_SPECIFIED)
    };

    outputFormats = new Format[] {
        new RGBFormat(null,
                      Format.NOT_SPECIFIED,
                      Format.byteArray,
                      Format.NOT_SPECIFIED,
                      24,
                      3, 2, 1,
                      3, Format.NOT_SPECIFIED,
                      Format.TRUE,
                      Format.NOT_SPECIFIED)
    };

}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:33,代码来源:RotationEffect.java

示例11: LiveStream

public LiveStream(MediaLocator locator) {
try {
    parseLocator(locator);
} catch (Exception e) {
    System.err.println(e);
}
//size = Toolkit.getDefaultToolkit().getScreenSize();
size = new Dimension(width, height);
try {
    robot = new Robot();
} catch (AWTException awe) {
    throw new RuntimeException("");
}
maxDataLength = size.width * size.height * 3;
rgbFormat = new RGBFormat(size, maxDataLength,
			  Format.intArray,
			  frameRate,
			  32,
			  0xFF0000, 0xFF00, 0xFF,
			  1, size.width,
			  VideoFormat.FALSE,
			  Format.NOT_SPECIFIED);

// generate the data
data = new int[maxDataLength];
thread = new Thread(this, "Screen Grabber");
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:27,代码来源:LiveStream.java

示例12: endianToStr

private static final String endianToStr(int endian)
{
    if (endian == Format.NOT_SPECIFIED)
        return NOT_SPECIFIED;
    else if (endian == AudioFormat.BIG_ENDIAN)
        return BIG_ENDIAN;
    else if (endian == AudioFormat.LITTLE_ENDIAN)
        return LITTLE_ENDIAN;
    else
        throw new IllegalArgumentException("Unknown endianness: " + endian);

}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:12,代码来源:FormatArgUtils.java

示例13: floatToStr

private static final String floatToStr(float v)
{
    if (v == Format.NOT_SPECIFIED)
        return NOT_SPECIFIED;
    else
        return "" + v;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:7,代码来源:FormatArgUtils.java

示例14: intToStr

private static final String intToStr(int i)
{
    if (i == Format.NOT_SPECIFIED)
        return NOT_SPECIFIED;
    else
        return "" + i;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:7,代码来源:FormatArgUtils.java

示例15: rgbFormatEndianToStr

private static final String rgbFormatEndianToStr(int endian)
{
    if (endian == Format.NOT_SPECIFIED)
        return NOT_SPECIFIED;
    else if (endian == RGBFormat.BIG_ENDIAN)
        return BIG_ENDIAN;
    else if (endian == RGBFormat.LITTLE_ENDIAN)
        return LITTLE_ENDIAN;
    else
        throw new IllegalArgumentException("Unknown endianness: " + endian);

}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:12,代码来源:FormatArgUtils.java


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