Instrument Neutral Distributed Interface INDI  2.0.2
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
INDI::SER_Recorder Class Reference

The SER_Recorder class implements recording of video streams in SER format. More...

#include <serrecorder.h>

Inheritance diagram for INDI::SER_Recorder:
INDI::RecorderInterface

Public Member Functions

 SER_Recorder ()
 
virtual ~SER_Recorder ()
 
virtual const char * getExtension ()
 
virtual bool setPixelFormat (INDI_PIXEL_FORMAT pixelFormat, uint8_t pixelDepth)
 
virtual bool setSize (uint16_t width, uint16_t height)
 
virtual bool open (const char *filename, char *errmsg)
 
virtual bool close ()
 
virtual bool writeFrame (const uint8_t *frame, uint32_t nbytes, uint64_t timestamp)
 
virtual void setStreamEnabled (bool enable)
 
- Public Member Functions inherited from INDI::RecorderInterface
 RecorderInterface ()=default
 
virtual ~RecorderInterface ()=default
 
virtual const char * getName ()
 
virtual bool setFPS (float FPS)
 

Static Public Attributes

static const uint64_t C_SEPASECONDS_PER_SECOND = 10000000
 

Protected Member Functions

uint64_t utcTo64BitTS ()
 
bool is_little_endian ()
 
void write_int_le (uint32_t *i)
 
void write_long_int_le (uint64_t *i)
 
void write_header (ser_header *s)
 

Protected Attributes

ser_header serh
 
bool isRecordingActive = false
 
bool isStreamingActive = false
 
FILE * f
 
uint32_t frame_size
 
uint32_t number_of_planes
 
uint16_t rawWidth = 0
 
uint16_t rawHeight = 0
 
std::vector< uint64_t > frameStamps
 
- Protected Attributes inherited from INDI::RecorderInterface
const char * name
 
float m_FPS = 1
 

Detailed Description

The SER_Recorder class implements recording of video streams in SER format.

Definition at line 70 of file serrecorder.h.

Constructor & Destructor Documentation

◆ SER_Recorder()

INDI::SER_Recorder::SER_Recorder ( )

Definition at line 42 of file serrecorder.cpp.

◆ ~SER_Recorder()

INDI::SER_Recorder::~SER_Recorder ( )
virtual

Definition at line 61 of file serrecorder.cpp.

Member Function Documentation

◆ close()

bool INDI::SER_Recorder::close ( void  )
virtual

Implements INDI::RecorderInterface.

Definition at line 195 of file serrecorder.cpp.

◆ getExtension()

virtual const char* INDI::SER_Recorder::getExtension ( )
inlinevirtual

Implements INDI::RecorderInterface.

Definition at line 76 of file serrecorder.h.

◆ is_little_endian()

bool INDI::SER_Recorder::is_little_endian ( )
protected

Definition at line 66 of file serrecorder.cpp.

◆ open()

bool INDI::SER_Recorder::open ( const char *  filename,
char *  errmsg 
)
virtual

Implements INDI::RecorderInterface.

Definition at line 173 of file serrecorder.cpp.

◆ setPixelFormat()

bool INDI::SER_Recorder::setPixelFormat ( INDI_PIXEL_FORMAT  pixelFormat,
uint8_t  pixelDepth 
)
virtual

Implements INDI::RecorderInterface.

Definition at line 118 of file serrecorder.cpp.

◆ setSize()

bool INDI::SER_Recorder::setSize ( uint16_t  width,
uint16_t  height 
)
virtual

Implements INDI::RecorderInterface.

Definition at line 160 of file serrecorder.cpp.

◆ setStreamEnabled()

virtual void INDI::SER_Recorder::setStreamEnabled ( bool  enable)
inlinevirtual

Implements INDI::RecorderInterface.

Definition at line 86 of file serrecorder.h.

◆ utcTo64BitTS()

uint64_t INDI::SER_Recorder::utcTo64BitTS ( )
protected

◆ write_header()

void INDI::SER_Recorder::write_header ( ser_header s)
protected

Definition at line 101 of file serrecorder.cpp.

◆ write_int_le()

void INDI::SER_Recorder::write_int_le ( uint32_t *  i)
protected

Definition at line 73 of file serrecorder.cpp.

◆ write_long_int_le()

void INDI::SER_Recorder::write_long_int_le ( uint64_t *  i)
protected

Definition at line 87 of file serrecorder.cpp.

◆ writeFrame()

bool INDI::SER_Recorder::writeFrame ( const uint8_t *  frame,
uint32_t  nbytes,
uint64_t  timestamp 
)
virtual

timestamp is microseconds from SER epoch Jan 1, 1 AD. If it is zero then system time is used.

Implements INDI::RecorderInterface.

Definition at line 215 of file serrecorder.cpp.

Member Data Documentation

◆ C_SEPASECONDS_PER_SECOND

const uint64_t INDI::SER_Recorder::C_SEPASECONDS_PER_SECOND = 10000000
static

Definition at line 92 of file serrecorder.h.

◆ f

FILE* INDI::SER_Recorder::f
protected

Definition at line 102 of file serrecorder.h.

◆ frame_size

uint32_t INDI::SER_Recorder::frame_size
protected

Definition at line 103 of file serrecorder.h.

◆ frameStamps

std::vector<uint64_t> INDI::SER_Recorder::frameStamps
protected

Definition at line 106 of file serrecorder.h.

◆ isRecordingActive

bool INDI::SER_Recorder::isRecordingActive = false
protected

Definition at line 101 of file serrecorder.h.

◆ isStreamingActive

bool INDI::SER_Recorder::isStreamingActive = false
protected

Definition at line 101 of file serrecorder.h.

◆ number_of_planes

uint32_t INDI::SER_Recorder::number_of_planes
protected

Definition at line 104 of file serrecorder.h.

◆ rawHeight

uint16_t INDI::SER_Recorder::rawHeight = 0
protected

Definition at line 105 of file serrecorder.h.

◆ rawWidth

uint16_t INDI::SER_Recorder::rawWidth = 0
protected

Definition at line 105 of file serrecorder.h.

◆ serh

ser_header INDI::SER_Recorder::serh
protected

Definition at line 100 of file serrecorder.h.


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