MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_transformation_parameter()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
void MayaFlux::Yantra::TemporalTransformer< InputType, OutputType >::set_transformation_parameter ( const std::string &  name,
std::any  value 
)
inlineoverrideprotectedvirtual

Sets transformation parameters.

Parameters
nameParameter name
valueParameter value

Handles setting of temporal operation type and delegates other parameters to base class. Supports both enum and string values for the "operation" parameter.

Common parameters include:

  • "stretch_factor": Time stretching factor (1.0 = no change, >1.0 = slower, <1.0 = faster)
  • "delay_samples": Number of samples to delay
  • "fill_value": Value to fill delayed regions with
  • "fade_in_ratio", "fade_out_ratio": Fade envelope ratios (0.0-1.0)
  • "start_ratio", "end_ratio": Slice boundaries as ratios of total length
  • "target_size": Target size for interpolation
  • "use_cubic": Whether to use cubic interpolation (vs linear)

Reimplemented from MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >.

Definition at line 169 of file TemporalTransformer.hpp.

170 {
171 if (name == "operation") {
172 if (auto op_result = safe_any_cast<TemporalOperation>(value)) {
173 m_operation = *op_result.value;
174 return;
175 }
176 if (auto str_result = safe_any_cast<std::string>(value)) {
177 if (auto op_enum = Utils::string_to_enum_case_insensitive<TemporalOperation>(*str_result.value)) {
178 m_operation = *op_enum;
179 return;
180 }
181 }
182 }
183
185 }
TemporalOperation m_operation
Current temporal operation.
virtual void set_transformation_parameter(const std::string &name, std::any value)
Transformation-specific parameter handling (override for custom parameters)