Class VideoTransmissionOperator
Defined in File video_transmission_operator.hpp
Base Type
public holoscan::Operator(Class Operator)
-
class VideoTransmissionOperator : public holoscan::Operator
Base class for video transmission (output) operators.
Declares a standard signal input carrying
holoscan::gxf::Entity, aligned with acquisition and passthrough operators for multi-input / single-output compositions.Subclasses must implement compute(). Override query_capabilities() for hardware-specific enumeration without starting output.
==Dynamic Port Allocation==
The number of input streams is set via the
num_streamsconstructor parameter (default 1). Becausemake_operatorcalls the constructor beforesetup(), the stream count is available at port-registration time — only the requested number of ports are created. All registered ports get proper backpressure scheduling (no dormant ports withConditionType::kNone).==num_streams vs channel_indices==
num_streamscontrols port allocation (how many input portssetup()registers).channel_indicesis a capability-reporting parameter that describes which hardware channels appear in theVideoTransmitCapabilitiessnapshot. These are intentionally independent.==Named Inputs==
signal : stream 0 (
std::shared_ptr<holoscan::gxf::Entity>), always registered.signal_1 … signal_N : additional streams, registered only when
num_streams > 1.
==Parameters==
Same common channel / URI / format parameters as
VideoAcquisitionOperator.Public Functions
- HOLOSCAN_OPERATOR_FORWARD_ARGS (VideoTransmissionOperator) VideoTransmissionOperator()=default
-
explicit VideoTransmissionOperator(uint32_t num_streams)
Construct with a specific number of input streams.
- Parameters
num_streams – Number of input ports to register (1 .. kVideoIoMaxStreams). Clamped to [1, kVideoIoMaxStreams].
- HOLOSCAN_OPERATOR_FORWARD_TEMPLATE () explicit VideoTransmissionOperator(uint32_t num_streams
- inline ArgT ArgsT std::min (num_streams, video_io::kVideoIoMaxStreams)))
-
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 video_io::VideoTransmitCapabilities query_transmit_capabilities() const
-
video_io::VideoDeviceCapabilities query_capabilities() const
-
inline uint64_t dropped_frame_count() const
-
inline uint64_t transmitted_frame_count() const
-
bool is_transmit_stream_enabled(uint32_t stream_index) const
- Returns
true if
stream_index< num_streams().
-
inline uint32_t num_streams() const
- Returns
Number of input streams registered in setup().
Public Members
-
ArgT &&arg
- ArgT ArgsT && args
Protected Functions
-
inline void note_dropped_frame()
-
inline void note_transmitted_frame()
-
std::shared_ptr<holoscan::gxf::Entity> receive_transmit_stream(InputContext &op_input, uint32_t stream_index)
Receive an entity from the given transmit stream port.
Symmetric counterpart to
VideoAcquisitionOperator::emit_capture_stream(). Throwsstd::out_of_rangeifstream_index>= num_streams().- Returns
The received entity, or an empty shared_ptr if nothing was available.
-
virtual video_io::VideoTransmitCapabilities build_transmit_capabilities_from_parameters() const
-
virtual void compute(InputContext &op_input, OutputContext &op_output, ExecutionContext &context) override = 0
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.
Protected Attributes
-
Parameter<std::string> backend_id_
-
Parameter<uint32_t> channel_index_
-
Parameter<std::vector<uint32_t>> channel_indices_
-
Parameter<std::string> uri_
-
Parameter<uint32_t> width_
-
Parameter<uint32_t> height_
-
Parameter<float> frame_rate_
-
Parameter<std::string> pixel_format_
-
Parameter<std::string> color_space_
-
Parameter<std::string> transport_
-
Parameter<YAML::Node> vendor_extensions_
Protected Static Functions
-
static std::string transmit_input_port_name(uint32_t stream_index)
Return the input port name for a given stream index.
Index 0 returns
"signal"(not"signal_0") for backward compatibility with single-stream operators. Indices 1+ return"signal_1","signal_2", etc. Validates againstkVideoIoMaxStreams(global max), not the per-instancenum_streams().