candlewick 0.6.0
A tiny cross-platform renderer based on SDL3
Loading...
Searching...
No Matches
candlewick::media::VideoRecorder Class Reference

#include <candlewick/utils/VideoRecorder.h>

Classes

struct  Settings
 

Public Member Functions

 VideoRecorder (NoInitT)
 Constructor which will not open the file or stream.
 
 VideoRecorder (VideoRecorder &&) noexcept
 
VideoRecorderoperator= (VideoRecorder &&) noexcept
 
void open (Uint32 width, Uint32 height, std::string_view filename, Settings settings)
 Open the recording stream.
 
bool isRecording () const
 Returns whether the recording stream is open.
 
 VideoRecorder (Uint32 width, Uint32 height, std::string_view filename, Settings settings)
 Constructor for the video recorder.
 
 VideoRecorder (Uint32 width, Uint32 height, std::string_view filename)
 
Uint32 frameCounter () const
 Current number of recorded frames.
 
void close () noexcept
 Close the recording stream.
 
 ~VideoRecorder ()
 
void writeTextureToVideoFrame (CommandBuffer &command_buffer, const Device &device, TransferBufferPool &pool, SDL_GPUTexture *texture, SDL_GPUTextureFormat format)
 

Constructor & Destructor Documentation

◆ VideoRecorder() [1/4]

candlewick::media::VideoRecorder::VideoRecorder ( NoInitT )
explicit

Constructor which will not open the file or stream.

◆ VideoRecorder() [2/4]

candlewick::media::VideoRecorder::VideoRecorder ( VideoRecorder && )
noexcept

◆ VideoRecorder() [3/4]

candlewick::media::VideoRecorder::VideoRecorder ( Uint32 width,
Uint32 height,
std::string_view filename,
Settings settings )

Constructor for the video recorder.

Parameters
widthInput data width.
heightInput data height.
settingsVideo recording settings (fps, bitrate, output file width and height).
Note
If the settings' output dimensions are not set, they will automatically be set to be the input's dimensions.
See also
open()

◆ VideoRecorder() [4/4]

candlewick::media::VideoRecorder::VideoRecorder ( Uint32 width,
Uint32 height,
std::string_view filename )

◆ ~VideoRecorder()

candlewick::media::VideoRecorder::~VideoRecorder ( )

Member Function Documentation

◆ close()

void candlewick::media::VideoRecorder::close ( )
noexcept

Close the recording stream.

◆ frameCounter()

Uint32 candlewick::media::VideoRecorder::frameCounter ( ) const

Current number of recorded frames.

◆ isRecording()

bool candlewick::media::VideoRecorder::isRecording ( ) const
inline

Returns whether the recording stream is open.

◆ open()

void candlewick::media::VideoRecorder::open ( Uint32 width,
Uint32 height,
std::string_view filename,
Settings settings )

Open the recording stream.

Parameters
widthInput data width.
heightInput data height.
filenameFilename to open the outut stream at.

◆ operator=()

VideoRecorder & candlewick::media::VideoRecorder::operator= ( VideoRecorder && )
noexcept

◆ writeTextureToVideoFrame()

void candlewick::media::VideoRecorder::writeTextureToVideoFrame ( CommandBuffer & command_buffer,
const Device & device,
TransferBufferPool & pool,
SDL_GPUTexture * texture,
SDL_GPUTextureFormat format )

The documentation for this class was generated from the following file: