Class VideoStreamReplayerOp

Holoscan v2.1.0
class VideoStreamReplayerOp : public holoscan::Operator

Operator class to replay a video stream from a file.

==Named Outputs==

  • output : nvidia::gxf::Tensor

    • A message containing a video frame deserialized from disk. Depending on the metadata in the file being read, this tensor could be on either CPU or GPU. For the data used in examples distributed with the SDK, the tensor will be an unnamed GPU tensor (name == “”).

==Parameters==

  • directory: Directory path for reading files from.

  • basename: User specified file name without extension.

  • batch_size: Number of entities to read and publish for one tick. Optional (default: 1).

  • ignore_corrupted_entities: If an entity could not be deserialized, it is ignored by default; otherwise a failure is generated. Optional (default: true).

  • frame_rate: Frame rate to replay. If zero value is specified, it follows timings in timestamps. Optional (default: 0.0).

  • realtime: Playback video in realtime, based on frame_rate or timestamps. Optional (default: true).

  • repeat: Repeat video stream in a loop. Optional (default: false).

  • count: Number of frame counts to playback. If zero value is specified, it is ignored. If the count is less than the number of frames in the video, it would finish early. Optional (default: 0).

Public Functions

HOLOSCAN_OPERATOR_FORWARD_ARGS (VideoStreamReplayerOp) VideoStreamReplayerOp()=default

~VideoStreamReplayerOp() override

virtual void setup(OperatorSpec &spec) override

Define the operator specification.

Parameters

spec – The reference to the operator specification.

virtual void initialize() override

Initialize the operator.

This function is called when the fragment is initialized by Executor::initialize_fragment().

virtual void compute(InputContext &op_input, OutputContext &op_output, ExecutionContext &context) override

Implement the compute method.

This method is called by the runtime multiple times. The runtime calls this method until the operator is stopped.

Parameters
  • op_input – The input context of the operator.

  • op_output – The output context of the operator.

  • context – The execution context of the operator.

Previous Class VideoStreamRecorderOp
Next Class VirtualOperator
© Copyright 2022-2024, NVIDIA. Last updated on Jun 17, 2024.