KVIrc  4.9.2
DeveloperAPIs
Functions
KviOggIrcText Namespace Reference

A namespace implementing our tricky codec to send and receive text multiplexed inside an ogg stream. More...

Functions

static void _tp_readbuffer (oggpack_buffer *opb, char *buf, const long len)
 Reads len bytes from the bitpacking buffer opb to buf. More...
 
static void _tp_writebuffer (oggpack_buffer *opb, const char *buf, const long len)
 Writes len bytes from buf to the bitpacking buffer opb. More...
 
static int irct_decode_headerin (ogg_packet *op)
 Decoded an irct header (used when decoding) More...
 
static int irct_decode_packetin (char **textPkt, int *textSize, ogg_packet *op)
 Extracts some bunary text from an irct packet (used when decoding) More...
 
static int irct_encode_clear ()
 Irct codec destructor function; this is where the codec state gets cleared (unused by now) More...
 
static int irct_encode_headerout (ogg_packet *op)
 Creates an irct header (used when encoding) More...
 
static int irct_encode_init ()
 Irct codec constructor function; this is where the codec state gets created (unused by now) More...
 
static int irct_encode_packetout (const char *textPkt, int textSize, int last_p, ogg_packet *op)
 Creates an irct packet from some binary text (used when encoding) More...
 

Detailed Description

A namespace implementing our tricky codec to send and receive text multiplexed inside an ogg stream.

Function Documentation

static void KviOggIrcText::_tp_readbuffer ( oggpack_buffer *  opb,
char *  buf,
const long  len 
)
static

Reads len bytes from the bitpacking buffer opb to buf.

Parameters
opbThe bitpacking buffer containing data
bufAddress of a preallocated buffer where to copy data
lenLength in octects to copy
Returns
void

References i.

Referenced by irct_decode_headerin(), and irct_decode_packetin().

static void KviOggIrcText::_tp_writebuffer ( oggpack_buffer *  opb,
const char *  buf,
const long  len 
)
static

Writes len bytes from buf to the bitpacking buffer opb.

Parameters
opbThe bitpacking buffer where to copy data
bufAddress of a buffer containing source data
lenLength in octects to copy
Returns
void

References i.

Referenced by irct_encode_headerout(), and irct_encode_packetout().

static int KviOggIrcText::irct_decode_headerin ( ogg_packet *  op)
static

Decoded an irct header (used when decoding)

Parameters
opthe ogg packet that contains the header
Returns
int

References _tp_readbuffer(), KviMemory::allocate(), and KviRuntimeInfo::version().

Referenced by KviOggTheoraDecoder::addData().

static int KviOggIrcText::irct_decode_packetin ( char **  textPkt,
int *  textSize,
ogg_packet *  op 
)
static

Extracts some bunary text from an irct packet (used when decoding)

Parameters
textPktthe buffer That will contains the text
textSizewill be set at the size of the text buffer
opthe ogg packet that contains the text
Returns
int

References _tp_readbuffer(), and KviMemory::allocate().

Referenced by KviOggTheoraDecoder::addData().

static int KviOggIrcText::irct_encode_clear ( )
static

Irct codec destructor function; this is where the codec state gets cleared (unused by now)

Returns
int

Referenced by KviOggTheoraDecoder::~KviOggTheoraDecoder(), and KviOggTheoraEncoder::~KviOggTheoraEncoder().

static int KviOggIrcText::irct_encode_headerout ( ogg_packet *  op)
static

Creates an irct header (used when encoding)

Parameters
opthe ogg packet that will contain the header
Returns
int

References _tp_writebuffer(), and KviMemory::allocate().

Referenced by KviOggTheoraEncoder::KviOggTheoraEncoder().

static int KviOggIrcText::irct_encode_init ( )
static

Irct codec constructor function; this is where the codec state gets created (unused by now)

Returns
int

Referenced by KviOggTheoraEncoder::KviOggTheoraEncoder().

static int KviOggIrcText::irct_encode_packetout ( const char *  textPkt,
int  textSize,
int  last_p,
ogg_packet *  op 
)
static

Creates an irct packet from some binary text (used when encoding)

Parameters
textPktthe buffer containing the text
textSizesize of the text buffer
last_ppacket number in the irct stream
opthe ogg packet that will contain the text
Returns
int

References _tp_writebuffer(), and KviMemory::allocate().

Referenced by KviOggTheoraEncoder::addTextFrame().