Struct FilterRegistry
pub struct FilterRegistry { /* private fields */ }Expand description
Per-core registry for filters and metadata extension keys.
Implementations§
§impl FilterRegistry
impl FilterRegistry
pub fn new() -> FilterRegistry
pub fn new() -> FilterRegistry
Creates an empty registry with core metadata keys installed.
pub fn register_filter(
&mut self,
descriptor: FilterDescriptor,
) -> Result<(), PixelFlowError>
pub fn register_filter( &mut self, descriptor: FilterDescriptor, ) -> Result<(), PixelFlowError>
Registers one filter descriptor.
pub fn register_filter_planner(
&mut self,
descriptor: FilterDescriptor,
planner: fn(FilterPlanRequest<'_>) -> Result<FilterPlan, PixelFlowError>,
) -> Result<(), PixelFlowError>
pub fn register_filter_planner( &mut self, descriptor: FilterDescriptor, planner: fn(FilterPlanRequest<'_>) -> Result<FilterPlan, PixelFlowError>, ) -> Result<(), PixelFlowError>
Registers one filter descriptor with graph-construction planner.
pub fn register_filter_expander(
&mut self,
descriptor: FilterDescriptor,
expander: RegisteredFilterExpander,
) -> Result<(), PixelFlowError>
pub fn register_filter_expander( &mut self, descriptor: FilterDescriptor, expander: RegisteredFilterExpander, ) -> Result<(), PixelFlowError>
Registers one filter descriptor with graph-construction expansion.
pub fn register_filter_runtime(
&mut self,
descriptor: FilterDescriptor,
planner: Option<RegisteredFilterPlanner>,
expander: Option<RegisteredFilterExpander>,
executor_factory: Option<RegisteredExecutorFactory>,
) -> Result<(), PixelFlowError>
pub fn register_filter_runtime( &mut self, descriptor: FilterDescriptor, planner: Option<RegisteredFilterPlanner>, expander: Option<RegisteredFilterExpander>, executor_factory: Option<RegisteredExecutorFactory>, ) -> Result<(), PixelFlowError>
Registers one filter descriptor with plugin-provided runtime callbacks.
pub fn plan_filter(
&self,
name: &str,
input_media: &[ClipMedia],
options: &BTreeMap<String, FilterOptionValue>,
) -> Result<FilterPlan, PixelFlowError>
pub fn plan_filter( &self, name: &str, input_media: &[ClipMedia], options: &BTreeMap<String, FilterOptionValue>, ) -> Result<FilterPlan, PixelFlowError>
Plans one registered filter call.
pub fn plan_public_filter(
&self,
name: &str,
input_media: &[ClipMedia],
options: &BTreeMap<String, FilterOptionValue>,
) -> Result<FilterPlan, PixelFlowError>
pub fn plan_public_filter( &self, name: &str, input_media: &[ClipMedia], options: &BTreeMap<String, FilterOptionValue>, ) -> Result<FilterPlan, PixelFlowError>
Plans one public script-visible filter call.
pub fn expand_public_filter(
&self,
name: &str,
builder: &mut GraphBuilder,
input_clips: &[Clip],
input_media: &[ClipMedia],
options: &BTreeMap<String, FilterOptionValue>,
metadata_schema: &MetadataSchema,
) -> Result<Option<FilterExpansionOutput>, PixelFlowError>
pub fn expand_public_filter( &self, name: &str, builder: &mut GraphBuilder, input_clips: &[Clip], input_media: &[ClipMedia], options: &BTreeMap<String, FilterOptionValue>, metadata_schema: &MetadataSchema, ) -> Result<Option<FilterExpansionOutput>, PixelFlowError>
Expands one public script-visible filter call, if it has an expander.
pub fn create_filter_executor(
&self,
name: &str,
input_media: &[ClipMedia],
output_media: &ClipMedia,
options: &BTreeMap<String, FilterOptionValue>,
metadata_schema: &MetadataSchema,
) -> Option<Result<Arc<dyn FrameExecutor>, PixelFlowError>>
pub fn create_filter_executor( &self, name: &str, input_media: &[ClipMedia], output_media: &ClipMedia, options: &BTreeMap<String, FilterOptionValue>, metadata_schema: &MetadataSchema, ) -> Option<Result<Arc<dyn FrameExecutor>, PixelFlowError>>
Creates a runtime executor for a registered filter, if it provides a factory.
pub fn build_registered_filter_executors(
&self,
graph: &Graph,
metadata_schema: &MetadataSchema,
executors: &mut RenderExecutorMap,
) -> Result<(), PixelFlowError>
pub fn build_registered_filter_executors( &self, graph: &Graph, metadata_schema: &MetadataSchema, executors: &mut RenderExecutorMap, ) -> Result<(), PixelFlowError>
Adds runtime executors for reachable filter nodes backed by this registry.
pub fn resolve_filter_name_for_plugin_call(
&self,
plugin_namespace: &str,
filter_name: &str,
) -> Result<&str, PixelFlowError>
pub fn resolve_filter_name_for_plugin_call( &self, plugin_namespace: &str, filter_name: &str, ) -> Result<&str, PixelFlowError>
Resolves plugin.<namespace>.<filter> script sugar to a registered filter name.
pub fn register_metadata_key(
&mut self,
key: &str,
kind: MetadataKind,
) -> Result<(), PixelFlowError>
pub fn register_metadata_key( &mut self, key: &str, kind: MetadataKind, ) -> Result<(), PixelFlowError>
Registers one plugin metadata key.
pub fn filter_descriptor(&self, name: &str) -> Option<&FilterDescriptor>
pub fn filter_descriptor(&self, name: &str) -> Option<&FilterDescriptor>
Returns descriptor for registered filter.
pub fn contains_filter(&self, name: &str) -> bool
pub fn contains_filter(&self, name: &str) -> bool
Returns true when filter exists.
pub fn contains_public_filter(&self, name: &str) -> bool
pub fn contains_public_filter(&self, name: &str) -> bool
Returns true when filter exists and is public.
pub fn filter_names(&self) -> Vec<&str>
pub fn filter_names(&self) -> Vec<&str>
Returns filter names in deterministic order.
pub fn public_filter_names(&self) -> Vec<&str>
pub fn public_filter_names(&self) -> Vec<&str>
Returns public filter names in deterministic order.
pub const fn metadata_schema(&self) -> &MetadataSchema
pub const fn metadata_schema(&self) -> &MetadataSchema
Returns metadata schema including plugin extension keys.
Trait Implementations§
§impl Clone for FilterRegistry
impl Clone for FilterRegistry
§fn clone(&self) -> FilterRegistry
fn clone(&self) -> FilterRegistry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more