|
| 1 | +/** |
| 2 | + * This file is part of the OpenKinect Project. http://www.openkinect.org |
| 3 | + * |
| 4 | + * Copyright (c) 2010 individual OpenKinect contributors. See the CONTRIB file |
| 5 | + * for details. |
| 6 | + * |
| 7 | + * This code is licensed to you under the terms of the Apache License, version |
| 8 | + * 2.0, or, at your option, the terms of the GNU General Public License, |
| 9 | + * version 2.0. See the APACHE20 and GPL20 files for the text of the licenses, |
| 10 | + * or the following URLs: |
| 11 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | + * http://www.gnu.org/licenses/gpl-2.0.txt |
| 13 | + * |
| 14 | + * If you redistribute this file in source form, modified or unmodified, |
| 15 | + * you may: |
| 16 | + * 1) Leave this header intact and distribute it under the same terms, |
| 17 | + * accompanying it with the APACHE20 and GPL20 files, or |
| 18 | + * 2) Delete the Apache 2.0 clause and accompany it with the GPL20 file, or |
| 19 | + * 3) Delete the GPL v2.0 clause and accompany it with the APACHE20 file |
| 20 | + * In all cases you must keep the copyright notice intact and include a copy |
| 21 | + * of the CONTRIB file. |
| 22 | + * Binary distributions must follow the binary distribution requirements of |
| 23 | + * either License. |
| 24 | + */ |
| 25 | +package org.openkinect.freenect; |
| 26 | + |
| 27 | +import com.sun.jna.Structure; |
| 28 | + |
| 29 | + |
| 30 | +/** |
| 31 | + * User: Erwan Daubert - [email protected] |
| 32 | + * Date: 12/08/11 |
| 33 | + * Time: 13:46 |
| 34 | + */ |
| 35 | +public class DepthFrameMode extends Structure { |
| 36 | + public int reserved; |
| 37 | + public int resolution; |
| 38 | +// public DepthFormat format; |
| 39 | + public int bytes; |
| 40 | + public short width; |
| 41 | + public short height; |
| 42 | + public short dataBitsPerPixel; |
| 43 | + public short paddingBitsPerPixel; |
| 44 | + public short framerate; |
| 45 | + public short valid; |
| 46 | + |
| 47 | + public DepthFrameMode () { |
| 48 | + } |
| 49 | + |
| 50 | + public DepthFrameMode (int reserved, int resolution/*, DepthFormat format*/, int bytes, short width, |
| 51 | + short height, |
| 52 | + short dataBitsPerPixel, short paddingBitsPerPixel, short framerate, short valid) { |
| 53 | + this.reserved = reserved; |
| 54 | + this.resolution = resolution; |
| 55 | +// this.format = format; |
| 56 | + this.bytes = bytes; |
| 57 | + this.width = width; |
| 58 | + this.height = height; |
| 59 | + this.dataBitsPerPixel = dataBitsPerPixel; |
| 60 | + this.paddingBitsPerPixel = paddingBitsPerPixel; |
| 61 | + this.framerate = framerate; |
| 62 | + this.valid = valid; |
| 63 | + } |
| 64 | + |
| 65 | + |
| 66 | + public static class DepthFrameModeByReference extends DepthFrameMode implements Structure.ByReference { |
| 67 | + |
| 68 | + } |
| 69 | + public static class DepthFrameModeByValue extends DepthFrameMode implements Structure.ByValue { |
| 70 | + |
| 71 | + } |
| 72 | +} |
| 73 | + |
| 74 | +/*typedef struct { |
| 75 | + uint32_t reserved; *//**< unique ID used internally. The meaning of values may change without notice. Don't touch or depend on the contents of this field. We mean it. *//* |
| 76 | + freenect_resolution resolution; *//**< Resolution this freenect_frame_mode describes, should you want to find it again with freenect_find_*_frame_mode(). *//* |
| 77 | + union { |
| 78 | + int32_t dummy; |
| 79 | + freenect_video_format video_format; |
| 80 | + freenect_depth_format depth_format; |
| 81 | + }; *//**< The video or depth format that this freenect_frame_mode describes. The caller should know which of video_format or depth_format to use, since they called freenect_get_*_frame_mode() *//* |
| 82 | + int32_t bytes; *//**< Total buffer size in bytes to hold a single frame of data. Should be equivalent to width * height * (data_bits_per_pixel+padding_bits_per_pixel) / 8 *//* |
| 83 | + int16_t width; *//**< Width of the frame, in pixels *//* |
| 84 | + int16_t height; *//**< Height of the frame, in pixels *//* |
| 85 | + int8_t data_bits_per_pixel; *//**< Number of bits of information needed for each pixel *//* |
| 86 | + int8_t padding_bits_per_pixel; *//**< Number of bits of padding for alignment used for each pixel *//* |
| 87 | + int8_t framerate; *//**< Approximate expected frame rate, in Hz *//* |
| 88 | + int8_t is_valid; *//**< If 0, this freenect_frame_mode is invalid and does not describe a supported mode. Otherwise, the frame_mode is valid. *//* |
| 89 | +} freenect_frame_mode;*/ |
0 commit comments