Config.java
Go to the documentation of this file.
1 package com.intel.realsense.librealsense;
2 
3 public class Config extends LrsClass {
4 
5  public Config(){
6  mHandle = nCreate();
7  }
8 
9  public void enableStream(StreamType type) {
10  enableStream(type, -1, 0, 0, StreamFormat.ANY, 0);
11  }
12 
14  enableStream(type, -1, 0, 0, format, 0);
15  }
16 
17  public void enableStream(StreamType type, int width, int height) {
19  }
20 
22  enableStream(type, -1, width, height, format, 0);
23  }
24 
25  public void enableStream(StreamType type, int index, int width, int height, StreamFormat format, int framerate){
26  nEnableStream(mHandle, type.value(), index, width, height, format.value(), framerate);
27  }
28 
29  public void disableStream(StreamType type) { nDisableStream(mHandle, type.value()); }
30 
31  public void enableAllStreams() { nEnableAllStreams(mHandle); }
32 
33  public void disableAllStreams() { nDisableAllStreams(mHandle); }
34 
35  public void enableRecordToFile(String filePath) {
36  nEnableRecordToFile(mHandle, filePath);
37  }
38 
39  public void enableDeviceFromFile(String filePath) {
40  nEnableDeviceFromFile(mHandle, filePath);
41  }
42 
43  public void enableDevice(String serial) { nEnableDevice(mHandle, serial); }
44 
45  public boolean canResolve(Pipeline pipeline){
46  return nCanResolve(mHandle, pipeline.mHandle);
47  }
48 
49  public void resolve(Pipeline pipeline) {
50  long pipeHandle = nResolve(mHandle, pipeline.mHandle);
51  PipelineProfile rv = new PipelineProfile(pipeHandle);
52  rv.close();//TODO: enable when PipelineProfile is implemented
53  }
54 
55  @Override
56  public void close() {
57  nDelete(mHandle);
58  }
59 
60  private static native long nCreate();
61  private static native void nDelete(long handle);
62  private static native void nEnableStream(long handle, int type, int index, int width, int height, int format, int framerate);
63  private static native void nDisableStream(long handle, int type);
64  private static native void nEnableAllStreams(long handle);
65  private static native void nDisableAllStreams(long handle);
66  private static native void nEnableDeviceFromFile(long handle, String filePath);
67  private static native void nEnableDevice(long handle, String serial);
68  private static native void nEnableRecordToFile(long handle, String filePath);
69  private static native boolean nCanResolve(long handle, long pipelineHandle);
70  private static native long nResolve(long handle, long pipelineHandle);
71 }
format
GLint GLint GLsizei GLint GLenum format
Definition: glad/glad/glad.h:1412
com.intel.realsense.librealsense.Config.enableStream
void enableStream(StreamType type, StreamFormat format)
Definition: Config.java:13
com.intel.realsense.librealsense.Pipeline
Definition: Pipeline.java:6
com.intel.realsense.librealsense.Config.nCreate
static native long nCreate()
com.intel.realsense.librealsense.Config.enableStream
void enableStream(StreamType type)
Definition: Config.java:9
com.intel.realsense.librealsense.Config.enableStream
void enableStream(StreamType type, int index, int width, int height, StreamFormat format, int framerate)
Definition: Config.java:25
index
GLuint index
Definition: glad/glad/glad.h:2777
com.intel.realsense.librealsense.Config.nDisableStream
static native void nDisableStream(long handle, int type)
com.intel.realsense.librealsense.Config.nEnableDevice
static native void nEnableDevice(long handle, String serial)
com.intel.realsense.librealsense.Config.nDelete
static native void nDelete(long handle)
com.intel.realsense.librealsense.Config.Config
Config()
Definition: Config.java:5
com.intel.realsense.librealsense.Config.enableAllStreams
void enableAllStreams()
Definition: Config.java:31
type
GLenum type
Definition: glad/glad/glad.h:135
width
GLint GLsizei width
Definition: glad/glad/glad.h:1397
com.intel.realsense.librealsense.StreamType
Definition: StreamType.java:3
com.intel.realsense.librealsense.Config
Definition: Config.java:3
com.intel.realsense.librealsense.StreamFormat
Definition: StreamFormat.java:3
com.intel.realsense.librealsense.Config.enableStream
void enableStream(StreamType type, int width, int height, StreamFormat format)
Definition: Config.java:21
com.intel.realsense.librealsense.Config.enableRecordToFile
void enableRecordToFile(String filePath)
Definition: Config.java:35
com.intel.realsense.librealsense.Config.enableDevice
void enableDevice(String serial)
Definition: Config.java:43
height
GLint GLsizei GLsizei height
Definition: glad/glad/glad.h:1397
com.intel.realsense.librealsense.Config.disableStream
void disableStream(StreamType type)
Definition: Config.java:29
com.intel.realsense.librealsense.PipelineProfile.close
void close()
Definition: PipelineProfile.java:14
com.intel.realsense.librealsense.Config.nCanResolve
static native boolean nCanResolve(long handle, long pipelineHandle)
com.intel.realsense.librealsense.StreamFormat.ANY
ANY
Definition: StreamFormat.java:4
com.intel.realsense.librealsense.Config.nEnableAllStreams
static native void nEnableAllStreams(long handle)
com.intel.realsense.librealsense.Config.nResolve
static native long nResolve(long handle, long pipelineHandle)
com.intel.realsense.librealsense.Config.close
void close()
Definition: Config.java:56
test-d405-calibration-stream.pipeline
pipeline
Definition: test-d405-calibration-stream.py:21
com.intel.realsense.librealsense.Config.nEnableRecordToFile
static native void nEnableRecordToFile(long handle, String filePath)
com.intel.realsense.librealsense.Config.enableStream
void enableStream(StreamType type, int width, int height)
Definition: Config.java:17
com.intel.realsense.librealsense.Config.resolve
void resolve(Pipeline pipeline)
Definition: Config.java:49
com.intel.realsense.librealsense.PipelineProfile
Definition: PipelineProfile.java:3
std_msgs::String
::std_msgs::String_< std::allocator< void > > String
Definition: String.h:47
com.intel.realsense.librealsense.Config.disableAllStreams
void disableAllStreams()
Definition: Config.java:33
com.intel.realsense.librealsense.Config.nEnableStream
static native void nEnableStream(long handle, int type, int index, int width, int height, int format, int framerate)
com.intel.realsense.librealsense.Config.nEnableDeviceFromFile
static native void nEnableDeviceFromFile(long handle, String filePath)
unit-test-config.handle
handle
Definition: unit-test-config.py:371
com.intel.realsense.librealsense.Config.nDisableAllStreams
static native void nDisableAllStreams(long handle)
com.intel.realsense.librealsense.Config.canResolve
boolean canResolve(Pipeline pipeline)
Definition: Config.java:45
com.intel.realsense.librealsense.Config.enableDeviceFromFile
void enableDeviceFromFile(String filePath)
Definition: Config.java:39


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01