SimpleFastOpenAtomicVisualiser
|
An API for recording video. More...
#include <record.h>
Public Member Functions | |
Record (std::filesystem::path file, glm::ivec2 resolution, uint8_t fps) | |
Construct a new Record from a file path, resolution and fps. | |
virtual | ~Record () |
virtual void | open ()=0 |
Open the video file. | |
void | queueFrame (std::vector< uint8_t > pixels) |
Enqueue a frame to be written. | |
uint8_t | queueSize () |
Number of frames yet to be sent for writing. | |
uint64_t | framesLeft () |
Number of frame left to be written in total. | |
void | writeFrames () |
Send the frames in the buffer for writing. | |
virtual void | close ()=0 |
Close the video file. | |
bool | isWriting () const |
If the video is being written to in the background. | |
bool | isOpen () const |
If the file is open. | |
bool | finalise () |
Check if finalised. | |
Protected Member Functions | |
virtual void | write (const uint8_t *frame)=0 |
void | writeBuffer () |
Protected Attributes | |
std::filesystem::path | file |
glm::ivec2 | resolution |
uint8_t | fps |
bool | fileOpen = false |
bool | writing = false |
std::vector< std::vector< uint8_t > > | inBuffer |
std::vector< std::vector< uint8_t > > | outBuffer |
An API for recording video.
|
inline |
Construct a new Record from a file path, resolution and fps.
file | the video file path. |
resolution | the resolution. |
fps | the frames per second. |
|
inlinevirtual |
Close the video file.
Implemented in FFmpegRecord, and JompegRecord.
|
inline |
Check if finalised.
|
inline |
Number of frame left to be written in total.
|
inline |
If the file is open.
|
inline |
If the video is being written to in the background.
Open the video file.
Implemented in FFmpegRecord, and JompegRecord.
Enqueue a frame to be written.
pixels | the frame's pixels. |
|
inline |
Number of frames yet to be sent for writing.
|
inlineprotected |
|
inline |
Send the frames in the buffer for writing.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |