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 suggested_hdr_tf(&self) -> Option<TransferFunction>
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