KVIrc 5.2.6
Developer APIs
KviOggTheoraDecoder Class Reference

An ogg/theora+irct decoder class; accepts a proper ogg stream, outputs argb32 images and binary text. More...

#include <KviOggTheoraDecoder.h>

Public Member Functions

void addData (KviDataBuffer *stream)
 Feeds the decoded with some received data to decode.
 
 KviOggTheoraDecoder (KviDataBuffer *videoSignal, KviDataBuffer *textSignal)
 Constructs the KviOggTheoraDecoder object.
 
virtual ~KviOggTheoraDecoder ()
 Destroys the KviTheoraEncoder object.
 

Private Member Functions

int queue_page (ogg_page *page)
 Internal function that queues an ogg page to the codec decoders.
 
void video_write (void)
 Internal function that takes a theora yuv buffer, transforms it and appends to the video stream.
 

Private Attributes

KviOggTheoraGeometry geometry
 
int irct_p
 
int lu_B [256]
 
int lu_GU [256]
 
int lu_GV [256]
 
int lu_R [256]
 
int lu_Y [256]
 
KviDataBufferm_pTextSignal
 
KviDataBufferm_pVideoSignal
 
ogg_page og
 
ogg_packet op
 
ogg_sync_state oy
 
int pp_inc
 
int pp_level
 
int pp_level_max
 
th_pixel_fmt px_fmt
 
unsigned char * RGBbuffer
 
int stateflag
 
th_comment tc
 
th_dec_ctx * td
 
bool thda
 
int theora_p
 
bool thtic
 
th_info ti
 
ogg_stream_state to
 
th_setup_info * ts
 
ogg_int64_t videobuf_granulepos
 
int videobuf_ready
 
double videobuf_time
 
ogg_stream_state zo
 

Detailed Description

An ogg/theora+irct decoder class; accepts a proper ogg stream, outputs argb32 images and binary text.

Constructor & Destructor Documentation

◆ KviOggTheoraDecoder()

KviOggTheoraDecoder::KviOggTheoraDecoder ( KviDataBuffer * videoSignal,
KviDataBuffer * textSignal )

Constructs the KviOggTheoraDecoder object.

Parameters
videoSignalthe output video stream object
textSignalthe output text stream object
Returns
KviOggTheoraDecoder

References i, irct_p, lu_B, lu_GU, lu_GV, lu_R, lu_Y, m_pTextSignal, m_pVideoSignal, oy, stateflag, tc, thda, theora_p, thtic, ti, ts, videobuf_granulepos, videobuf_ready, and videobuf_time.

◆ ~KviOggTheoraDecoder()

KviOggTheoraDecoder::~KviOggTheoraDecoder ( )
virtual

Destroys the KviTheoraEncoder object.

References KviOggIrcText::irct_encode_clear(), irct_p, oy, tc, td, theora_p, ti, to, and zo.

Member Function Documentation

◆ addData()

void KviOggTheoraDecoder::addData ( KviDataBuffer * stream)

◆ queue_page()

int KviOggTheoraDecoder::queue_page ( ogg_page * page)
private

Internal function that queues an ogg page to the codec decoders.

Returns
int

References irct_p, theora_p, to, and zo.

Referenced by addData().

◆ video_write()

void KviOggTheoraDecoder::video_write ( void )
private

Internal function that takes a theora yuv buffer, transforms it and appends to the video stream.

Returns
int

References ARGB32_BPP, g, geometry, i, j, lu_B, lu_GU, lu_GV, lu_R, lu_Y, m_pVideoSignal, OC_CLAMP255, r, RGBbuffer, td, and y.

Referenced by addData().

Member Data Documentation

◆ geometry

KviOggTheoraGeometry KviOggTheoraDecoder::geometry
private

Stream geometry definition

Referenced by addData(), and video_write().

◆ irct_p

int KviOggTheoraDecoder::irct_p
private

True if the ogg stream contains an irct stream

Referenced by addData(), KviOggTheoraDecoder(), queue_page(), and ~KviOggTheoraDecoder().

◆ lu_B

int KviOggTheoraDecoder::lu_B[256]
private

Surface used in yuv->rgb processing (B)

Referenced by KviOggTheoraDecoder(), and video_write().

◆ lu_GU

int KviOggTheoraDecoder::lu_GU[256]
private

Surface used in yuv->rgb processing (GU)

Referenced by KviOggTheoraDecoder(), and video_write().

◆ lu_GV

int KviOggTheoraDecoder::lu_GV[256]
private

Surface used in yuv->rgb processing (GV)

Referenced by KviOggTheoraDecoder(), and video_write().

◆ lu_R

int KviOggTheoraDecoder::lu_R[256]
private

Surface used in yuv->rgb processing (R)

Referenced by KviOggTheoraDecoder(), and video_write().

◆ lu_Y

int KviOggTheoraDecoder::lu_Y[256]
private

Surface used in yuv->rgb processing (Y)

Referenced by KviOggTheoraDecoder(), and video_write().

◆ m_pTextSignal

KviDataBuffer* KviOggTheoraDecoder::m_pTextSignal
private

Output text stream pointer

Referenced by addData(), and KviOggTheoraDecoder().

◆ m_pVideoSignal

KviDataBuffer* KviOggTheoraDecoder::m_pVideoSignal
private

Output video stream pointer

Referenced by KviOggTheoraDecoder(), and video_write().

◆ og

ogg_page KviOggTheoraDecoder::og
private

One Ogg bitstream page. Vorbis packets are inside

Referenced by addData().

◆ op

ogg_packet KviOggTheoraDecoder::op
private

One raw packet of encoded data

Referenced by addData().

◆ oy

ogg_sync_state KviOggTheoraDecoder::oy
private

◆ pp_inc

int KviOggTheoraDecoder::pp_inc
private

Theora postprocessing: increment

Referenced by addData().

◆ pp_level

int KviOggTheoraDecoder::pp_level
private

Theora postprocessing: current level

Referenced by addData().

◆ pp_level_max

int KviOggTheoraDecoder::pp_level_max
private

Theora postprocessing: max level

Referenced by addData().

◆ px_fmt

th_pixel_fmt KviOggTheoraDecoder::px_fmt
private

Theora stream pixel format definition

Referenced by addData().

◆ RGBbuffer

unsigned char* KviOggTheoraDecoder::RGBbuffer
private

RGB decoded surface pointer

Referenced by addData(), and video_write().

◆ stateflag

int KviOggTheoraDecoder::stateflag
private

Internal flag used in stream processing

Referenced by addData(), and KviOggTheoraDecoder().

◆ tc

th_comment KviOggTheoraDecoder::tc
private

Theora stream comments struct

Referenced by addData(), KviOggTheoraDecoder(), and ~KviOggTheoraDecoder().

◆ td

th_dec_ctx* KviOggTheoraDecoder::td
private

Theora stream decoding struct

Referenced by addData(), video_write(), and ~KviOggTheoraDecoder().

◆ thda

bool KviOggTheoraDecoder::thda
private

Theora decode alloc state

Referenced by addData(), and KviOggTheoraDecoder().

◆ theora_p

int KviOggTheoraDecoder::theora_p
private

True if the ogg stream contains a theora stream

Referenced by addData(), KviOggTheoraDecoder(), queue_page(), and ~KviOggTheoraDecoder().

◆ thtic

bool KviOggTheoraDecoder::thtic
private

Theora setup clear state

Referenced by addData(), and KviOggTheoraDecoder().

◆ ti

th_info KviOggTheoraDecoder::ti
private

Theora stream info struct

Referenced by addData(), KviOggTheoraDecoder(), and ~KviOggTheoraDecoder().

◆ to

ogg_stream_state KviOggTheoraDecoder::to
private

Take physical pages, weld into a logical stream of theora packets

Referenced by addData(), queue_page(), and ~KviOggTheoraDecoder().

◆ ts

th_setup_info* KviOggTheoraDecoder::ts
private

Theora stream setup info struct

Referenced by addData(), and KviOggTheoraDecoder().

◆ videobuf_granulepos

ogg_int64_t KviOggTheoraDecoder::videobuf_granulepos
private

Single frame video buffering : granule position

Referenced by addData(), and KviOggTheoraDecoder().

◆ videobuf_ready

int KviOggTheoraDecoder::videobuf_ready
private

Single frame video buffering : ready state

Referenced by addData(), and KviOggTheoraDecoder().

◆ videobuf_time

double KviOggTheoraDecoder::videobuf_time
private

Single frame video buffering : duration

Referenced by KviOggTheoraDecoder().

◆ zo

ogg_stream_state KviOggTheoraDecoder::zo
private

Take physical pages, weld into a logical stream of irct packets

Referenced by addData(), queue_page(), and ~KviOggTheoraDecoder().


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