Class: Pipeline

Pipeline(contextopt)

This class provides a simple way to retrieve frame data

Constructor

new Pipeline(contextopt)

Construct a Pipeline object There are 2 acceptable syntax

 Syntax 1. new Pipeline()
 Syntax 2. new Pipeline(context)
Syntax 1 uses the default context. Syntax 2 used the context created by application
Parameters:
Name Type Attributes Description
context Context <optional>
the Context that is being used by the pipeline
Source:

Methods

destroy() → {undefined}

Destroy the resource associated with this pipeline
Source:
Returns:
Type
undefined

getActiveProfile() → {PipelineProfile}

Return the active device and streams profiles, used by the pipeline. The pipeline streams profiles are selected during Pipeline.start. The method returns a valid result only when the pipeline is active - between calls to Pipeline.start and Pipeline.stop. After Pipeline.stop is called, the pipeline doesn't own the device, thus, the pipeline selected device may change in subsequent activations.
Source:
Returns:
the actual pipeline device and streams profile, which was successfully configured to the streaming device on start.
Type
PipelineProfile

pollForFrames() → {FrameSet|undefined}

Check if a new set of frames is available and retrieve the latest undelivered set. The frameset includes time-synchronized frames of each enabled stream in the pipeline. The method returns without blocking the calling thread, with status of new frames available or not. If available, it fetches the latest frames set. Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate.
Source:
Returns:
Type
FrameSet | undefined

start(configopt)

Start streaming There are 2 acceptable syntax

 Syntax 1. start()
 Syntax 2. start(config)
Syntax 1 uses the default configuration. Syntax 2 used the configured streams and or device of the config parameter
Parameters:
Name Type Attributes Description
config Config <optional>
the Config object to use for configuration
Source:
Returns:

stop() → {undefined}

Stop streaming
Source:
Returns:
Type
undefined

waitForFrames(timeout) → {FrameSet|undefined}

Wait until a new set of frames becomes available. The returned frameset includes time-synchronized frames of each enabled stream in the pipeline. In case of different frame rates of the streams, the frames set include a matching frame of the slow stream, which may have been included in previous frames set. The method blocks the calling thread, and fetches the latest unread frames set. Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate.
Parameters:
Name Type Default Description
timeout Integer 5000 max time to wait, in milliseconds, default to 5000 ms
Source:
See:
  • See Pipeline.latestFrame
Returns:
a FrameSet object or Undefined
Type
FrameSet | undefined