pub struct LivePhotoAsset { /* private fields */ }Expand description
Apple/Android-style LIVE Photo pairing a still photograph with a short motion burst and audio waveform.
Implementations§
Source§impl LivePhotoAsset
Interactive LIVE Photo motion burst playback and sample builder for LivePhotoAsset.
impl LivePhotoAsset
Interactive LIVE Photo motion burst playback and sample builder for LivePhotoAsset.
Sourcepub fn sample_live_photo() -> Self
pub fn sample_live_photo() -> Self
Builds a sample LIVE Photo with a sharp still keyframe, 6-frame motion burst, and ambient sound peaks.
§Returns
Self- ReadyLivePhotoAsset.
Sourcepub fn set_motion_playing(&mut self, active: bool)
pub fn set_motion_playing(&mut self, active: bool)
Starts or stops the LIVE motion burst (called on press-and-hold or LIVE toggle).
§Arguments
&Self- Mutable LIVE Photo asset.bool-trueto begin motion playback,falseto return to keyframe still.
Sourcepub fn step_ms(&mut self, dt_ms: u32)
pub fn step_ms(&mut self, dt_ms: u32)
Advances the LIVE motion burst by dt_ms milliseconds.
§Arguments
&Self- Mutable LIVE Photo asset.u32- Elapsed time in milliseconds.
Sourcepub fn active_image(&self) -> ImageBuffer
pub fn active_image(&self) -> ImageBuffer
Source§impl LivePhotoAsset
impl LivePhotoAsset
pub fn get_still_image(&self) -> &ImageBuffer
pub fn get_mut_still_image(&mut self) -> &mut ImageBuffer
pub fn set_still_image(&mut self, val: ImageBuffer) -> &mut Self
pub fn get_motion_frames(&self) -> &Vec<MediaFrame>
pub fn get_mut_motion_frames(&mut self) -> &mut Vec<MediaFrame>
pub fn set_motion_frames(&mut self, val: Vec<MediaFrame>) -> &mut Self
pub fn get_audio_waveform(&self) -> &Vec<f32>
pub fn get_mut_audio_waveform(&mut self) -> &mut Vec<f32>
pub fn set_audio_waveform(&mut self, val: Vec<f32>) -> &mut Self
pub fn get_active_motion(&self) -> bool
pub fn get_mut_active_motion(&mut self) -> &mut bool
pub fn set_active_motion(&mut self, val: bool) -> &mut Self
pub fn get_motion_elapsed_ms(&self) -> u32
pub fn get_mut_motion_elapsed_ms(&mut self) -> &mut u32
pub fn set_motion_elapsed_ms(&mut self, val: u32) -> &mut Self
pub fn get_muted(&self) -> bool
pub fn get_mut_muted(&mut self) -> &mut bool
pub fn set_muted(&mut self, val: bool) -> &mut Self
pub fn get_metadata(&self) -> &MediaMetadata
pub fn get_mut_metadata(&mut self) -> &mut MediaMetadata
pub fn set_metadata(&mut self, val: MediaMetadata) -> &mut Self
Trait Implementations§
Source§impl Clone for LivePhotoAsset
impl Clone for LivePhotoAsset
Source§impl Debug for LivePhotoAsset
impl Debug for LivePhotoAsset
Source§impl Default for LivePhotoAsset
impl Default for LivePhotoAsset
Source§impl PartialEq for LivePhotoAsset
impl PartialEq for LivePhotoAsset
impl StructuralPartialEq for LivePhotoAsset
Auto Trait Implementations§
impl Forget for LivePhotoAsset
impl Freeze for LivePhotoAssetwhere
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<MediaFrame>: Freeze,
PhantomData<f32>: Freeze,
PhantomData<u8>: Freeze,
impl Move for LivePhotoAsset
impl RefUnwindSafe for LivePhotoAsset
impl Send for LivePhotoAsset
impl Sync for LivePhotoAsset
impl Unpin for LivePhotoAsset
impl UnsafeUnpin for LivePhotoAssetwhere
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<MediaFrame>: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for LivePhotoAsset
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