|
|
std::ptrdiff_t | currentFrame () const |
| | Index of the most recently decoded frame, or -1 if nothing has been decoded yet.
|
| |
|
Seconds | currentTime () const |
| | Presentation time of the most recently decoded frame.
|
| |
|
const std::filesystem::path & | filename () const |
| |
|
std::ptrdiff_t | frameAt (Seconds time) const |
| | Index of the frame shown at time.
|
| |
|
const Info & | info () const |
| |
|
Video & | operator= (const Video &)=delete |
| |
|
Video & | operator= (Video &&)=delete |
| |
| std::shared_ptr< Layer > | readFrame (std::ptrdiff_t index, std::shared_ptr< Layer > reuse={}) |
| | Decode the frame at index.
|
| |
| std::shared_ptr< Layer > | readNextFrame (std::shared_ptr< Layer > reuse={}) |
| | Decode the frame following the most recently read one.
|
| |
|
void | seekToFrame (std::ptrdiff_t index) |
| | Position the stream so that the next call to readNextFrame() returns frame index.
|
| |
|
void | seekToTime (Seconds time) |
| | Position the stream so that the next call to readNextFrame() returns the frame at time.
|
| |
|
int | streamIndex () const |
| |
|
Seconds | timeOf (std::ptrdiff_t index) const |
| | Presentation time of frame index.
|
| |
| | Video (const std::filesystem::path &filename, int streamIndex=-1) |
| | Open filename and prepare the video stream streamIndex for decoding.
|
| |
|
| Video (const Video &)=delete |
| |
|
| Video (Video &&)=delete |
| |
Random access to the frames of a video file, decoded into Layers.
Frames are converted to a Layer format matching the source as closely as possible, see Info::format. Color videos are decoded into RGBA, grayscale videos into a single channel, and sources with more than 8 bits per component are decoded into 16 bit Layers.
Seeking is done by seeking to the closest preceding keyframe and then decoding forward. Reading frames in order is therefore substantially faster than random access.