FrameMode.java
Go to the documentation of this file.
1 
25 package org.openkinect.freenect;
26 
27 import com.sun.jna.Structure;
28 import java.util.List;
29 import java.util.Arrays;
30 
31 public class FrameMode extends Structure {
32  /* All fields are public because Structure requires it.
33  However, fields should NOT be altered by external code. */
34  public int reserved;
35  public int resolution;
36  public int format;
37  public int bytes;
38  public short width, height;
39  public byte dataBitsPerPixel, paddingBitsPerPixel;
40  public byte framerate, valid;
41 
42  public FrameMode() {
43  valid = 0;
44  }
45 
46  protected List getFieldOrder() {
47  return Arrays.asList(new String[] {"reserved", "resolution", "format",
48  "bytes", "width", "height", "dataBitsPerPixel",
49  "paddingBitsPerPixel", "framerate", "valid"});
50  }
51 
53  return Resolution.fromInt(resolution);
54  }
55 
57  return DepthFormat.fromInt(format);
58  }
59 
61  return VideoFormat.fromInt(format);
62  }
63 
64  public int getFrameSize() {
65  return bytes;
66  }
67 
68  public short getWidth() {
69  return width;
70  }
71 
72  public short getHeight() {
73  return height;
74  }
75 
76  public int getFrameRate() {
77  return framerate;
78  }
79 
80  public boolean isValid() {
81  return (valid != 0);
82  }
83 
84  public static class ByValue extends FrameMode implements Structure.ByValue { }
85 }
static Resolution fromInt(int value)
Definition: Resolution.java:51
static DepthFormat fromInt(int value)
static VideoFormat fromInt(int value)


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38