Skip to contents

Names what one row of a recording stands for. Most formats store one row per video frame. Others store controller polls, timestamped events, game tics, or several input samples within a frame. n_observations() counts rows whatever their unit, so durations and rates also need this unit and the timing information of the recording.

Usage

observation_unit(movie)

Arguments

movie

A replayr_movie or replayr_poll_stream returned by read_movie() or a format-specific reader.

Value

A character string: "frame", "scripted frame", "input subframe", "controller poll", "controller polling cycle", "Wii Remote poll", "device poll", "event", "game tic" or "game update".

Examples

frames <- read_movie(system.file("extdata", "sample.fm2", package = "replayr"))
observation_unit(frames)
#> [1] "frame"
polls <- read_movie(system.file("extdata", "sample.m64", package = "replayr"))
observation_unit(polls)
#> [1] "controller poll"