#[repr(C)]pub struct playdate_video {
pub loadVideo: Option<unsafe extern "C" fn(path: *const c_char) -> *mut LCDVideoPlayer>,
pub freePlayer: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer)>,
pub setContext: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer, context: *mut LCDBitmap) -> c_int>,
pub useScreenContext: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer)>,
pub renderFrame: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer, n: c_int) -> c_int>,
pub getError: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer) -> *const c_char>,
pub getInfo: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer, outWidth: *mut c_int, outHeight: *mut c_int, outFrameRate: *mut c_float, outFrameCount: *mut c_int, outCurrentFrame: *mut c_int)>,
pub getContext: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer) -> *mut LCDBitmap>,
}Fields§
§loadVideo: Option<unsafe extern "C" fn(path: *const c_char) -> *mut LCDVideoPlayer>LCDVideoPlayer playdate->graphics->video->loadVideo(const char* path)
Opens the pdv file at path and returns a new video player object for rendering its frames.
freePlayer: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer)>void playdate->graphics->video->freePlayer(LCDVideoPlayer* p)
Frees the given video player.
setContext: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer, context: *mut LCDBitmap) -> c_int>int playdate->graphics->video->setContext(LCDVideoPlayer* p, LCDBitmap* context)
Sets the rendering destination for the video player to the given bitmap. If the function fails, it returns 0 and sets an error message that can be read via getError().
useScreenContext: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer)>void playdate->graphics->video->useScreenContext(LCDVideoPlayer* p)
Sets the rendering destination for the video player to the screen.
renderFrame: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer, n: c_int) -> c_int>void playdate->graphics->video->renderFrame(LCDVideoPlayer* p, int n)
Renders frame number n into the current context. In case of error, the function returns 0 and sets an error message that can be read via getError().
getError: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer) -> *const c_char>const char* playdate->graphics->video->getError(LCDVideoPlayer* p)
Returns text describing the most recent error.
getInfo: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer, outWidth: *mut c_int, outHeight: *mut c_int, outFrameRate: *mut c_float, outFrameCount: *mut c_int, outCurrentFrame: *mut c_int)>void playdate->graphics->video->getInfo(LCDVideoPlayer* p, int* outWidth, int* outHeight, float* outFrameRate, int* outFrameCount, int* outCurrentFrame)
Retrieves information about the video, by passing in (possibly NULL) value pointers.
getContext: Option<unsafe extern "C" fn(p: *mut LCDVideoPlayer) -> *mut LCDBitmap>LCBitmap* playdate->graphics->video->getContext(LCDVideoPlayer* p)
Gets the rendering destination for the video player. If no rendering context has been setallocates a context bitmap with the same dimensions as the vieo will be allocated.
Trait Implementations§
Source§impl Clone for playdate_video
impl Clone for playdate_video
Source§fn clone(&self) -> playdate_video
fn clone(&self) -> playdate_video
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for playdate_video
impl Debug for playdate_video
Source§impl Default for playdate_video
impl Default for playdate_video
Source§fn default() -> playdate_video
fn default() -> playdate_video
Source§impl Hash for playdate_video
impl Hash for playdate_video
Source§impl Ord for playdate_video
impl Ord for playdate_video
Source§impl PartialEq for playdate_video
impl PartialEq for playdate_video
Source§impl PartialOrd for playdate_video
impl PartialOrd for playdate_video
Source§fn partial_cmp(&self, other: &playdate_video) -> Option<Ordering>
fn partial_cmp(&self, other: &playdate_video) -> Option<Ordering>
impl Copy for playdate_video
impl Eq for playdate_video
impl StructuralPartialEq for playdate_video
Auto Trait Implementations§
impl Freeze for playdate_video
impl RefUnwindSafe for playdate_video
impl Send for playdate_video
impl Sync for playdate_video
impl Unpin for playdate_video
impl UnwindSafe for playdate_video
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes