Class VideoStreamReplayerOp
Defined in File video_stream_replayer.hpp
Base Type
public holoscan::Operator
(Class Operator)
-
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
).allocator: The allocator used for Tensor objects. Currently this can only use the default allocator type of
<a class="reference internal" href="classholoscan_1_1UnboundedAllocator.html#classholoscan_1_1UnboundedAllocator" target="_self">holoscan::UnboundedAllocator</a>
. Optional (default:<a class="reference internal" href="classholoscan_1_1UnboundedAllocator.html#classholoscan_1_1UnboundedAllocator" target="_self">holoscan::UnboundedAllocator</a>
)entity_serializer: The entity serializer used for deserialization. The default is to use a default-initialized
holoscan::gxzf::StdEntitySerializer
. If this argument is specified, then theallocator
argument is ignored.
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.