Class Stream
java.lang.Object
com.flir.thermalsdk.live.streaming.Stream
- All Implemented Interfaces:
StreamSource
Basic class for managing streaming from a
Note: The implementation for thermal streaming for network cameras is still in experimental stage.
Camera.Note: The implementation for thermal streaming for network cameras is still in experimental stage.
-
Method Summary
Modifier and TypeMethodDescriptionvoidattachRecorder(ThermalSequenceRecorder recorder) Attach a recorder object to record frames from stream.voidDetach the recorder object when stopping recording.doubleGet the camera's streamed frame rate (zero if the frame rate cannot be obtained).doubleGet the highest possible frame rate for this camera stream (zero if the frame rate cannot be obtained).doubleGet the lowest possible frame rate for this camera stream.booleanCheck if the stream is in frame grabbing state.booleanCheck if a stream is thermal (contains radiometric/measurable pixels).voidsetFrameRate(double hz) Set the camera's streamed frame rate.
Note: Some cameras will not change frame rate while streaming.voidstart(OnReceived<Void> onReceived, OnRemoteError onError) Starts the frame grabbing.
Note: The implementation for thermal streaming for network cameras is still in experimental stage.voidstop()Stops the frame grabbing.
-
Method Details
-
start
Starts the frame grabbing.
Note: The implementation for thermal streaming for network cameras is still in experimental stage.- Parameters:
onReceived- Callback to receive a notification for each new frame that arrives. This callback is invoked on a separate "streaming thread", and should only be used to trigger/notify a render thread of the new image. Executing heavy processing/tasks in this callback may result in reduced performance or lost frames.onError- Callback to monitor if the stream is broken. Invoked on a background thread. The stream will be stopped automatically on error.
-
stop
public void stop()Stops the frame grabbing. -
isStreaming
public boolean isStreaming()Check if the stream is in frame grabbing state. -
isThermal
public boolean isThermal()Check if a stream is thermal (contains radiometric/measurable pixels).
The stream can only be used together withThermalImageif the stream is thermal. -
setFrameRate
public void setFrameRate(double hz) Set the camera's streamed frame rate.
Note: Some cameras will not change frame rate while streaming.- Parameters:
hz- Frames per second, must be in range [getMinFrameRate(),getMaxFrameRate()].
-
getFrameRate
public double getFrameRate()Get the camera's streamed frame rate (zero if the frame rate cannot be obtained). -
getMinFrameRate
public double getMinFrameRate()Get the lowest possible frame rate for this camera stream. -
getMaxFrameRate
public double getMaxFrameRate()Get the highest possible frame rate for this camera stream (zero if the frame rate cannot be obtained). -
attachRecorder
Attach a recorder object to record frames from stream. -
detachRecorder
public void detachRecorder()Detach the recorder object when stopping recording.
-