ClikaRT::processor::VideoProcessor
class
Header: ClikaRT/processor/processor.h
A config-driven video preprocessor: temporal frame sampling composed over the channels-last image pipeline. Move-only.
It operates on ALREADY-DECODED frames; ClikaRT ships no video reader. Pass a [T, H, W, C] UInt8 Tensor (or per-frame encoded images); it samples (num_frames / fps) and runs the per-frame image pipeline, returning a channels-last clip [num_sampled, H, W, C] Float32. Every fallible operation returns Result<T>; the library never throws.
Static member functions
from_huggingface()
static VideoProcessor from_huggingface(std::string_view path, StreamOrDevice where = {})
Load a HuggingFace video preprocessor (preprocessor_config.json). path is the model directory OR the json file itself. where binds the default placement. path is copied, not retained.
Declared in ClikaRT/processor/processor.h, line 366
from_directory()
static VideoProcessor from_directory(std::string_view path, StreamOrDevice where = {})
Load from a model directory, detecting the preprocessor format present (currently HuggingFace). path is copied, not retained.
Declared in ClikaRT/processor/processor.h, line 371
from_config()
static VideoProcessor from_config(const VideoProcessorConfig& config, StreamOrDevice where = {})
Build from an explicit config; no config file needed. config is read during the call.
Declared in ClikaRT/processor/processor.h, line 376
from_args()
static VideoProcessor from_args(
std::optional<ImageProcessorConfig> image = {},
std::optional<std::int64_t> num_frames = {},
std::optional<double> fps = {},
StreamOrDevice where = {}
)
Build directly from the COMMON knobs: no config file, no config object. The per-frame spatial pipeline comes from image (its own from_args-style config; {} = image defaults); num_frames / fps set the temporal sampling ({} = keep all / use num_frames). For full control build a VideoProcessorConfig and use from_config.
Declared in ClikaRT/processor/processor.h, line 384
Member functions
VideoProcessor()
VideoProcessor(VideoProcessor&&) noexcept
move-construct (the source becomes an empty shell)
Declared in ClikaRT/processor/processor.h, line 396
operator=()
VideoProcessor& operator=(VideoProcessor&&) noexcept
move-assign
Declared in ClikaRT/processor/processor.h, line 397
~VideoProcessor()
~VideoProcessor()
destructor
Declared in ClikaRT/processor/processor.h, line 398
process(Tensor, VideoMetadata, StreamOrDevice)
Tensor process(
const Tensor& frames,
VideoMetadata meta = {},
StreamOrDevice where = {}
) const
Already-decoded frames [T, H, W, C] (UInt8) → sampled + per-frame processed [num_sampled, H', W', C] Float32. frames is read during the call. where overrides the bound placement.
Declared in ClikaRT/processor/processor.h, line 404
process(Span< Span< uint8_t>>, VideoMetadata, StreamOrDevice)
Tensor process(
ClikaRT::Span<const ClikaRT::Span<const std::uint8_t>> frames,
VideoMetadata meta = {},
StreamOrDevice where = {}
) const
Already-decoded frames [T, H, W, C] (UInt8) → sampled + per-frame processed [num_sampled, H', W', C] Float32. frames is read during the call. where overrides the bound placement.
Declared in ClikaRT/processor/processor.h, line 409
process(Tensor, VideoProcessOptions, VideoMetadata, StreamOrDevice)
Tensor process(
const Tensor& frames,
const VideoProcessOptions& options,
VideoMetadata meta = {},
StreamOrDevice where = {}
) const
Already-decoded frames [T, H, W, C] (UInt8) → sampled + per-frame processed [num_sampled, H', W', C] Float32. frames is read during the call. where overrides the bound placement.
Declared in ClikaRT/processor/processor.h, line 418
process(Span< Span< uint8_t>>, VideoProcessOptions, VideoMetadata, StreamOrDevice)
Tensor process(
ClikaRT::Span<const ClikaRT::Span<const std::uint8_t>> frames,
const VideoProcessOptions& options,
VideoMetadata meta = {},
StreamOrDevice where = {}
) const
Already-decoded frames [T, H, W, C] (UInt8) → sampled + per-frame processed [num_sampled, H', W', C] Float32. frames is read during the call. where overrides the bound placement.
Declared in ClikaRT/processor/processor.h, line 423
process(string_view, VideoProcessOptions, StreamOrDevice)
Tensor process(
std::string_view path,
const VideoProcessOptions& options = {},
StreamOrDevice where = {}
) const
Already-decoded frames [T, H, W, C] (UInt8) → sampled + per-frame processed [num_sampled, H', W', C] Float32. frames is read during the call. where overrides the bound placement.
Declared in ClikaRT/processor/processor.h, line 436
process(Span< uint8_t>, VideoProcessOptions, StreamOrDevice)
Tensor process(
ClikaRT::Span<const std::uint8_t> bytes,
const VideoProcessOptions& options = {},
StreamOrDevice where = {}
) const
Already-decoded frames [T, H, W, C] (UInt8) → sampled + per-frame processed [num_sampled, H', W', C] Float32. frames is read during the call. where overrides the bound placement.
Declared in ClikaRT/processor/processor.h, line 440
process_with_indices(string_view, VideoProcessOptions, StreamOrDevice)
ProcessedVideo process_with_indices(
std::string_view path,
const VideoProcessOptions& options = {},
StreamOrDevice where = {}
) const
A video file → the processed clip + sampling metadata.
Declared in ClikaRT/processor/processor.h, line 449
process_with_indices(Span< uint8_t>, VideoProcessOptions, StreamOrDevice)
ProcessedVideo process_with_indices(
ClikaRT::Span<const std::uint8_t> bytes,
const VideoProcessOptions& options = {},
StreamOrDevice where = {}
) const
A video file → the processed clip + sampling metadata.
Declared in ClikaRT/processor/processor.h, line 453
process_with_indices(Tensor, VideoMetadata, VideoProcessOptions, StreamOrDevice)
ProcessedVideo process_with_indices(
const Tensor& frames,
VideoMetadata meta = {},
const VideoProcessOptions& options = {},
StreamOrDevice where = {}
) const
A video file → the processed clip + sampling metadata.
Declared in ClikaRT/processor/processor.h, line 458