pub struct ProxyManager {
pub mode: ProxyMode,
pub default_resolution: ProxyResolution,
pub proxy_dir: PathBuf,
/* private fields */
}Expand description
Manages proxy files for a project.
Fields§
§mode: ProxyModeCurrent proxy mode.
default_resolution: ProxyResolutionDefault proxy resolution.
proxy_dir: PathBufProxy storage directory.
Implementations§
Source§impl ProxyManager
impl ProxyManager
Sourcepub fn register_source(
&mut self,
original_path: PathBuf,
original_width: u32,
original_height: u32,
) -> EditResult<()>
pub fn register_source( &mut self, original_path: PathBuf, original_width: u32, original_height: u32, ) -> EditResult<()>
Register a source file for proxy management.
Sourcepub fn associate_clip(&mut self, clip_id: ClipId, original_path: &str)
pub fn associate_clip(&mut self, clip_id: ClipId, original_path: &str)
Associate a clip with a source file.
Sourcepub fn resolve_path_for_playback(&self, clip_id: ClipId) -> Option<&PathBuf>
pub fn resolve_path_for_playback(&self, clip_id: ClipId) -> Option<&PathBuf>
Get the appropriate file path for a clip given the current mode.
For playback: returns proxy path if mode uses proxies and proxy is ready. For export: returns original path unless in ProxyOnly mode.
Sourcepub fn resolve_path_for_export(&self, clip_id: ClipId) -> Option<&PathBuf>
pub fn resolve_path_for_export(&self, clip_id: ClipId) -> Option<&PathBuf>
Get the path to use during export.
Sourcepub fn mark_ready(&mut self, original_path: &str) -> bool
pub fn mark_ready(&mut self, original_path: &str) -> bool
Mark a proxy as ready.
Sourcepub fn mark_failed(&mut self, original_path: &str) -> bool
pub fn mark_failed(&mut self, original_path: &str) -> bool
Mark a proxy as failed.
Sourcepub fn mark_outdated(&mut self, original_path: &str) -> bool
pub fn mark_outdated(&mut self, original_path: &str) -> bool
Mark a proxy as outdated.
Sourcepub fn get_mapping(&self, original_path: &str) -> Option<&ProxyMapping>
pub fn get_mapping(&self, original_path: &str) -> Option<&ProxyMapping>
Get the proxy mapping for a source file.
Sourcepub fn pending_generation(&self) -> Vec<&ProxyMapping>
pub fn pending_generation(&self) -> Vec<&ProxyMapping>
Get all mappings that need proxy generation.
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Get total number of registered sources.
Sourcepub fn ready_count(&self) -> usize
pub fn ready_count(&self) -> usize
Get count of ready proxies.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyManager
impl RefUnwindSafe for ProxyManager
impl Send for ProxyManager
impl Sync for ProxyManager
impl Unpin for ProxyManager
impl UnsafeUnpin for ProxyManager
impl UnwindSafe for ProxyManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more