37 namespace KviOggIrcText
50 for(i = 0; i < len; i++)
51 *buf++ = oggpack_read(opb, 8);
61 static void _tp_writebuffer(oggpack_buffer * opb,
const char * buf,
const long len)
65 for(i = 0; i < len; i++)
66 oggpack_write(opb, *buf++, 8);
95 oggpack_writeinit(&ob);
96 oggpack_write(&ob, 0, 8);
98 oggpack_write(&ob, 0, 8);
99 oggpack_write(&ob, 1, 8);
100 int bytes = oggpack_bytes(&ob);
102 memcpy(op->packet, oggpack_get_buffer(&ob), bytes);
104 oggpack_writeclear(&ob);
127 oggpack_writeinit(&ob);
130 int bytes = oggpack_bytes(&ob);
132 memcpy(op->packet, oggpack_get_buffer(&ob), bytes);
134 oggpack_writeclear(&ob);
138 op->packetno = last_p;
152 oggpack_readinit(&ob, op->packet, op->bytes);
153 quint8 ret,
version, subversion;
154 ret = oggpack_read(&ob, 8);
159 if(strncmp(buf,
"irct", 4) != 0)
161 version = oggpack_read(&ob, 8);
162 subversion = oggpack_read(&ob, 8);
176 oggpack_readinit(&ob, op->packet, op->bytes);
177 *textSize = op->bytes;
184 #endif //KVI_OGGIRCT_H_
static int irct_encode_init()
Irct codec constructor function; this is where the codec state gets created (unused by now) ...
Definition: KviOggIrcText.h:73
static void _tp_writebuffer(oggpack_buffer *opb, const char *buf, const long len)
Writes len bytes from buf to the bitpacking buffer opb.
Definition: KviOggIrcText.h:61
#define i
Definition: detector.cpp:73
static int irct_encode_headerout(ogg_packet *op)
Creates an irct header (used when encoding)
Definition: KviOggIrcText.h:92
static int irct_encode_clear()
Irct codec destructor function; this is where the codec state gets cleared (unused by now) ...
Definition: KviOggIrcText.h:82
void * allocate(int size)
COMPILE_MEMORY_PROFILE.
Definition: KviMemory.h:113
static int irct_decode_packetin(char **textPkt, int *textSize, ogg_packet *op)
Extracts some bunary text from an irct packet (used when decoding)
Definition: KviOggIrcText.h:173
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)
Definition: KviOggIrcText.h:121
static void _tp_readbuffer(oggpack_buffer *opb, char *buf, const long len)
Reads len bytes from the bitpacking buffer opb to buf.
Definition: KviOggIrcText.h:46
QString version()
Definition: KviRuntimeInfo.cpp:671
static int irct_decode_headerin(ogg_packet *op)
Decoded an irct header (used when decoding)
Definition: KviOggIrcText.h:149