candlewick 0.1.0
A renderer
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)
 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
 
void close () noexcept
 
 ~VideoRecorder ()
 
void writeTextureToVideoFrame (CommandBuffer &command_buffer, const Device &device, TransferBufferPool &pool, SDL_GPUTexture *texture, SDL_GPUTextureFormat format)
 

Public Attributes

struct candlewick::media::VideoRecorder::Settings settings
 

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

◆ frameCounter()

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

◆ 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 )

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 )

Member Data Documentation

◆ settings

struct candlewick::media::VideoRecorder::Settings candlewick::media::VideoRecorder::settings

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