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) {
18  enableStream(type, -1, width, height, StreamFormat.ANY, 0);
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 }
void enableStream(StreamType type, int width, int height, StreamFormat format)
Definition: Config.java:21
void enableRecordToFile(String filePath)
Definition: Config.java:35
static native void nDisableAllStreams(long handle)
static native void nEnableStream(long handle, int type, int index, int width, int height, int format, int framerate)
static native void nDisableStream(long handle, int type)
void enableDeviceFromFile(String filePath)
Definition: Config.java:39
::std_msgs::String_< std::allocator< void > > String
Definition: String.h:47
GLuint index
void enableStream(StreamType type, int width, int height)
Definition: Config.java:17
GLint GLsizei GLsizei height
GLint GLint GLsizei GLint GLenum format
static native boolean nCanResolve(long handle, long pipelineHandle)
static native void nEnableDeviceFromFile(long handle, String filePath)
void enableStream(StreamType type)
Definition: Config.java:9
void enableStream(StreamType type, int index, int width, int height, StreamFormat format, int framerate)
Definition: Config.java:25
GLenum type
static native long nResolve(long handle, long pipelineHandle)
void enableDevice(String serial)
Definition: Config.java:43
void enableStream(StreamType type, StreamFormat format)
Definition: Config.java:13
boolean canResolve(Pipeline pipeline)
Definition: Config.java:45
void disableStream(StreamType type)
Definition: Config.java:29
static native void nEnableRecordToFile(long handle, String filePath)
static native void nDelete(long handle)
static native void nEnableAllStreams(long handle)
void resolve(Pipeline pipeline)
Definition: Config.java:49
static native void nEnableDevice(long handle, String serial)
GLint GLsizei width


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:43:16