TwiceAsNice  2019-02-18
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
INDI::TheoraRecorder Class Reference

The TheoraRecorder class implemented recording of video streaming data in a libtheora OGV file. More...

#include <theorarecorder.h>

Inheritance diagram for INDI::TheoraRecorder:
Inheritance graph
Collaboration diagram for INDI::TheoraRecorder:
Collaboration graph

Public Member Functions

 TheoraRecorder ()
 
virtual ~TheoraRecorder ()
 
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)
 
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)
 

Protected Attributes

bool isRecordingActive = false
 
bool isStreamingActive = false
 
uint32_t number_of_planes
 
uint16_t rawWidth = 0
 
uint16_t rawHeight = 0
 
std::vector< uint64_tframeStamps
 
INDI_PIXEL_FORMAT m_PixelFormat
 
uint8_t m_PixelDepth =8
 
- Protected Attributes inherited from INDI::RecorderInterface
const char * name
 
float m_FPS = 1
 

Private Member Functions

bool allocateBuffers ()
 
int theora_write_frame (int last)
 
bool frac (double fps, uint32_t &num, uint32_t &den)
 

Private Attributes

th_ycbcr_buffer ycbcr
 
ogg_uint32_t video_fps_numerator = 24
 
ogg_uint32_t video_fps_denominator = 1
 
ogg_uint32_t video_aspect_numerator = 0
 
ogg_uint32_t video_aspect_denominator = 0
 
int video_rate = -1
 
int video_quality = -1
 
int soft_target =0
 
ogg_uint32_t keyframe_frequency =0
 
int buf_delay =-1
 
int vp3_compatible =0
 
int chroma_format = TH_PF_420
 
FILE * twopass_file = nullptr
 
int twopass =0
 
int passno =0
 
FILE * ogg_fp = nullptr
 
ogg_stream_state ogg_os
 
ogg_packet op
 
ogg_page og
 
th_enc_ctx * td = nullptr
 
th_info ti
 
th_comment tc
 

Detailed Description

The TheoraRecorder class implemented recording of video streaming data in a libtheora OGV file.

Constructor & Destructor Documentation

◆ TheoraRecorder()

INDI::TheoraRecorder::TheoraRecorder ( )

◆ ~TheoraRecorder()

INDI::TheoraRecorder::~TheoraRecorder ( )
virtual

Member Function Documentation

◆ allocateBuffers()

bool INDI::TheoraRecorder::allocateBuffers ( )
private

◆ close()

bool INDI::TheoraRecorder::close ( )
virtual

◆ frac()

bool INDI::TheoraRecorder::frac ( double  fps,
uint32_t num,
uint32_t den 
)
private

◆ getExtension()

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

◆ open()

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

◆ setPixelFormat()

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

◆ setSize()

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

◆ setStreamEnabled()

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

◆ theora_write_frame()

int INDI::TheoraRecorder::theora_write_frame ( int  last)
private

◆ writeFrame()

bool INDI::TheoraRecorder::writeFrame ( const uint8_t frame,
uint32_t  nbytes 
)
virtual

Member Data Documentation

◆ buf_delay

int INDI::TheoraRecorder::buf_delay =-1
private

◆ chroma_format

int INDI::TheoraRecorder::chroma_format = TH_PF_420
private

◆ frameStamps

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

◆ isRecordingActive

bool INDI::TheoraRecorder::isRecordingActive = false
protected

◆ isStreamingActive

bool INDI::TheoraRecorder::isStreamingActive = false
protected

◆ keyframe_frequency

ogg_uint32_t INDI::TheoraRecorder::keyframe_frequency =0
private

◆ m_PixelDepth

uint8_t INDI::TheoraRecorder::m_PixelDepth =8
protected

◆ m_PixelFormat

INDI_PIXEL_FORMAT INDI::TheoraRecorder::m_PixelFormat
protected

◆ number_of_planes

uint32_t INDI::TheoraRecorder::number_of_planes
protected

◆ og

ogg_page INDI::TheoraRecorder::og
private

◆ ogg_fp

FILE* INDI::TheoraRecorder::ogg_fp = nullptr
private

◆ ogg_os

ogg_stream_state INDI::TheoraRecorder::ogg_os
private

◆ op

ogg_packet INDI::TheoraRecorder::op
private

◆ passno

int INDI::TheoraRecorder::passno =0
private

◆ rawHeight

uint16_t INDI::TheoraRecorder::rawHeight = 0
protected

◆ rawWidth

uint16_t INDI::TheoraRecorder::rawWidth = 0
protected

◆ soft_target

int INDI::TheoraRecorder::soft_target =0
private

◆ tc

th_comment INDI::TheoraRecorder::tc
private

◆ td

th_enc_ctx* INDI::TheoraRecorder::td = nullptr
private

◆ ti

th_info INDI::TheoraRecorder::ti
private

◆ twopass

int INDI::TheoraRecorder::twopass =0
private

◆ twopass_file

FILE* INDI::TheoraRecorder::twopass_file = nullptr
private

◆ video_aspect_denominator

ogg_uint32_t INDI::TheoraRecorder::video_aspect_denominator = 0
private

◆ video_aspect_numerator

ogg_uint32_t INDI::TheoraRecorder::video_aspect_numerator = 0
private

◆ video_fps_denominator

ogg_uint32_t INDI::TheoraRecorder::video_fps_denominator = 1
private

◆ video_fps_numerator

ogg_uint32_t INDI::TheoraRecorder::video_fps_numerator = 24
private

◆ video_quality

int INDI::TheoraRecorder::video_quality = -1
private

◆ video_rate

int INDI::TheoraRecorder::video_rate = -1
private

◆ vp3_compatible

int INDI::TheoraRecorder::vp3_compatible =0
private

◆ ycbcr

th_ycbcr_buffer INDI::TheoraRecorder::ycbcr
private

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