FrameQueue.java
Go to the documentation of this file.
1 package com.intel.realsense.librealsense;
2 
3 public class FrameQueue extends LrsClass {
4 
5  public FrameQueue(){
6  mHandle = nCreate(1);
7  }
8 
9  public FrameQueue(int capacity){
10  mHandle = nCreate(capacity);
11  }
12 
13  public Frame pollForFrame() {
14  long rv = nPollForFrame(mHandle);
15  if(rv != 0) {
16  return new Frame(rv);
17  }
18  return null;
19  }
20 
22  long rv = nPollForFrame(mHandle);
23  if(rv != 0) {
24  return new FrameSet(rv);
25  }
26  return null;
27  }
28 
29  public Frame waitForFrame() {
30  return waitForFrame(5000);
31  }
32 
33  public Frame waitForFrame(int timeout) {
34  long rv = nWaitForFrames(mHandle, timeout);
35  return new Frame(rv);
36  }
37 
39  return waitForFrames();
40  }
41 
43  long rv = nWaitForFrames(mHandle, timeout);
44  return new FrameSet(rv);
45  }
46 
47  @Override
48  public void close() throws Exception {
49  nDelete(mHandle);
50  }
51 
52  public void Enqueue(Frame f)
53  {
54  nEnqueue(mHandle, f.getHandle());
55  }
56 
57  private static native long nCreate(int capacity);
58  private static native void nDelete(long handle);
59  private static native long nPollForFrame(long handle);
60  private static native long nWaitForFrames(long handle, int timeout);
61  private static native void nEnqueue(long handle, long frameHandle);
62 }
GLuint64 GLenum void * handle
Definition: glext.h:7785
static native long nPollForFrame(long handle)
static native long nWaitForFrames(long handle, int timeout)
GLdouble f
static native void nDelete(long handle)
static native long nCreate(int capacity)
GLbitfield GLuint64 timeout
static native void nEnqueue(long handle, long frameHandle)


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:14