pub struct RenderContext { /* private fields */ }
Expand description
Render context that tracks loaded and rendered frames.
Implementations§
source§impl RenderContext
impl RenderContext
pub fn builder() -> RenderContextBuilder
source§impl RenderContext
impl RenderContext
pub fn alloc_tracker(&self) -> Option<&AllocTracker>
source§impl RenderContext
impl RenderContext
pub fn set_cms( &mut self, cms: impl ColorManagementSystem + Send + Sync + 'static, )
pub fn request_color_encoding(&mut self, encoding: ColorEncodingWithProfile)
pub fn requested_color_encoding(&self) -> &ColorEncodingWithProfile
pub fn request_image_region(&mut self, image_region: Region)
pub fn image_region(&self) -> Region
source§impl RenderContext
impl RenderContext
pub fn embedded_icc(&self) -> Option<&[u8]>
sourcepub fn loaded_keyframes(&self) -> usize
pub fn loaded_keyframes(&self) -> usize
Returns the number of loaded keyframes in the context.
sourcepub fn loaded_frames(&self) -> usize
pub fn loaded_frames(&self) -> usize
Returns the number of loaded frames in the context, including frames that are not shown directly.
source§impl RenderContext
impl RenderContext
pub fn load_frame_header( &mut self, bitstream: &mut Bitstream<'_>, ) -> Result<&mut IndexedFrame>
pub fn current_loading_frame(&mut self) -> Option<&mut IndexedFrame>
pub fn finalize_current_frame(&mut self)
source§impl RenderContext
impl RenderContext
sourcepub fn keyframe(&self, keyframe_idx: usize) -> Option<&IndexedFrame>
pub fn keyframe(&self, keyframe_idx: usize) -> Option<&IndexedFrame>
Returns the frame with the keyframe index, or None
if the keyframe does not exist.
pub fn frame(&self, frame_idx: usize) -> Option<&IndexedFrame>
source§impl RenderContext
impl RenderContext
sourcepub fn render(&mut self) -> Result<Arc<ImageWithRegion>>
pub fn render(&mut self) -> Result<Arc<ImageWithRegion>>
Renders the first keyframe.
The keyframe should be loaded in prior to rendering, with one of the loading methods.
sourcepub fn render_keyframe(
&self,
keyframe_idx: usize,
) -> Result<Arc<ImageWithRegion>>
pub fn render_keyframe( &self, keyframe_idx: usize, ) -> Result<Arc<ImageWithRegion>>
Renders the keyframe.
The keyframe should be loaded in prior to rendering, with one of the loading methods.
pub fn render_loading_keyframe( &mut self, ) -> Result<(&IndexedFrame, Arc<ImageWithRegion>)>
pub fn reset_cache(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RenderContext
impl !RefUnwindSafe for RenderContext
impl Send for RenderContext
impl Sync for RenderContext
impl Unpin for RenderContext
impl !UnwindSafe for RenderContext
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