Skip to main content

MovieRecorder

Struct MovieRecorder 

Source
pub struct MovieRecorder { /* private fields */ }
Expand description

Records a movie frame-by-frame as the emulator runs.

Implementations§

Source§

impl MovieRecorder

Source

pub fn power_on(seed: u64, region: Region, rom: &[u8]) -> Self

Start recording from a power-on. rom is the exact byte image that was (or is about to be) loaded — hashed for the recorded movie’s ROM-identity check on replay.

Source

pub fn from_current_state(region: Region, rom: &[u8], sys: &System) -> Self

Start recording from sys’s current live state (a branch point mid-session) — embeds a full save-state as the start point. rom is the exact byte image sys’s cart was loaded from.

Source

pub fn capture(&mut self, p1: u16, p2: u16)

Capture this frame’s about-to-be-consumed input. Call BEFORE System::run_frame — this records exactly what that call will consume, matching MoviePlayer::next_frame’s own “apply, then run” order on replay.

Source

pub const fn frame_count(&self) -> usize

The number of frames captured so far.

Source

pub fn finish(self) -> Movie

Consume the recorder, returning the finished Movie.

Trait Implementations§

Source§

impl Debug for MovieRecorder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.