Struct vapoursynth::core::CoreRef
source · [−]pub struct CoreRef<'core> { /* private fields */ }
Expand description
A reference to a VapourSynth core.
Implementations
sourceimpl<'core> CoreRef<'core>
impl<'core> CoreRef<'core>
sourcepub fn get_format(&self, id: FormatID) -> Option<Format<'core>>
pub fn get_format(&self, id: FormatID) -> Option<Format<'core>>
Retrieves a registered or preset Format
by its id. The id can be of a previously
registered format, or one of the PresetFormat
.
sourcepub fn register_format(
&self,
color_family: ColorFamily,
sample_type: SampleType,
bits_per_sample: u8,
sub_sampling_w: u8,
sub_sampling_h: u8
) -> Option<Format<'core>>
pub fn register_format(
&self,
color_family: ColorFamily,
sample_type: SampleType,
bits_per_sample: u8,
sub_sampling_w: u8,
sub_sampling_h: u8
) -> Option<Format<'core>>
Registers a custom video format.
Returns None
if an invalid format is described.
Registering compat formats is not allowed. Only certain privileged built-in filters are allowed to handle compat formats.
RGB formats are not allowed to be subsampled.
sourcepub fn get_plugin_by_id(
&self,
id: &str
) -> Result<Option<Plugin<'core>>, NulError>
pub fn get_plugin_by_id(
&self,
id: &str
) -> Result<Option<Plugin<'core>>, NulError>
Returns a plugin with the given identifier.
sourcepub fn get_plugin_by_namespace(
&self,
namespace: &str
) -> Result<Option<Plugin<'core>>, NulError>
pub fn get_plugin_by_namespace(
&self,
namespace: &str
) -> Result<Option<Plugin<'core>>, NulError>
Returns a plugin with the given namespace.
get_plugin_by_id()
should be used instead.
sourcepub fn plugins(&self) -> OwnedMap<'core>
pub fn plugins(&self) -> OwnedMap<'core>
Returns a map containing a list of all loaded plugins.
Keys: meaningless unique strings;
Values: namespace, identifier, and full name, separated by semicolons.
sourcepub fn set_max_cache_size(&self, bytes: i64) -> i64
pub fn set_max_cache_size(&self, bytes: i64) -> i64
Sets the maximum size of the framebuffer cache. Returns the new maximum size.
sourcepub fn set_thread_count(&self, threads: i32) -> i32
pub fn set_thread_count(&self, threads: i32) -> i32
Sets the number of worker threads for the given core.
If the requested number of threads is zero or lower, the number of hardware threads will be detected and used.
Returns the new thread count.
Trait Implementations
impl<'core> Copy for CoreRef<'core>
impl<'core> Send for CoreRef<'core>
impl<'core> Sync for CoreRef<'core>
Auto Trait Implementations
impl<'core> RefUnwindSafe for CoreRef<'core>
impl<'core> Unpin for CoreRef<'core>
impl<'core> UnwindSafe for CoreRef<'core>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more