Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

/dar/build/libkate-0.3.7/include/kate/oggkate.h File Reference


Detailed Description

The libkate Ogg interface public API.

#include <stddef.h>
#include <stdint.h>
#include <ogg/ogg.h>
#include "kate/kate.h"

Go to the source code of this file.

Functions

int kate_ogg_encode_headers (kate_state *k, kate_comment *kc, ogg_packet *op)
int kate_ogg_encode_text (kate_state *k, kate_float start_time, kate_float stop_time, const char *text, size_t sz, ogg_packet *op)
int kate_ogg_encode_text_raw_times (kate_state *k, kate_int64_t start_time, kate_int64_t stop_time, const char *text, size_t sz, ogg_packet *op)
int kate_ogg_encode_repeat (kate_state *k, kate_float t, kate_float threshold, ogg_packet *op)
int kate_ogg_encode_repeat_raw_times (kate_state *k, kate_int64_t t, kate_int64_t threshold, ogg_packet *op)
int kate_ogg_encode_keepalive (kate_state *k, kate_float t, ogg_packet *op)
int kate_ogg_encode_keepalive_raw_times (kate_state *k, kate_int64_t t, ogg_packet *op)
int kate_ogg_encode_finish (kate_state *k, kate_float t, ogg_packet *op)
int kate_ogg_encode_finish_raw_times (kate_state *k, kate_int64_t t, ogg_packet *op)
int kate_ogg_decode_is_idheader (const ogg_packet *op)
int kate_ogg_decode_headerin (kate_info *ki, kate_comment *kc, ogg_packet *op)
int kate_ogg_decode_packetin (kate_state *k, ogg_packet *op)


Function Documentation

int kate_ogg_decode_headerin kate_info ki,
kate_comment kc,
ogg_packet *  op
 

Decodes a Kate header

Parameters:
ki the kate_info structure to fill from headers
kc the kate_comment structure to fill from headers
op the ogg_packet to test
Returns:
0 success

1 success, and all headers have been decoded

KATE_E_* error

int kate_ogg_decode_is_idheader const ogg_packet *  op  ) 
 

Checks whether an Ogg packet contains a Kate identification header.

Parameters:
op the ogg_packet to test
Returns:
1 success, and the packet contains a Kate identification header

0 success, and the packet does not contain a Kate identification header

KATE_E_* error

int kate_ogg_decode_packetin kate_state k,
ogg_packet *  op
 

Decodes a Kate data packet

Parameters:
k the kate_state structure to decode a packet for
op the ogg_packet to test
Returns:
0 success

1 success, and we're at end of stream

KATE_E_* error

int kate_ogg_encode_finish kate_state k,
kate_float  t,
ogg_packet *  op
 

Encodes an end-of-stream data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init. No other packet may be encoded afer an end of stream packet is encoded.

Parameters:
k the kate_state structure to encode headers for
t the time at which to insert the packet
op the ogg_packet to encode the packet to
Returns:
0 success

KATE_E_* error

int kate_ogg_encode_finish_raw_times kate_state k,
kate_int64_t  t,
ogg_packet *  op
 

Encodes an end-of-stream data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init. No other packet may be encoded afer an end of stream packet is encoded.

Parameters:
k the kate_state structure to encode headers for
t the time at which to insert the packet
op the ogg_packet to encode the packet to
Returns:
0 success

KATE_E_* error

int kate_ogg_encode_headers kate_state k,
kate_comment kc,
ogg_packet *  op
 

Encodes a Kate header to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
kc the comments to encode in headers
op the ogg_packet to encode headers to
Returns:
0 success

1 success, and all headers have been encoded

KATE_E_* error

int kate_ogg_encode_keepalive kate_state k,
kate_float  t,
ogg_packet *  op
 

Encodes a keepalive data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
t the time at which to insert the keepalive packet
op the ogg_packet to encode the packet to
Returns:
0 success

KATE_E_* error

int kate_ogg_encode_keepalive_raw_times kate_state k,
kate_int64_t  t,
ogg_packet *  op
 

Encodes a keepalive data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
t the time at which to insert the keepalive packet
op the ogg_packet to encode the packet to
Returns:
0 success

KATE_E_* error

int kate_ogg_encode_repeat kate_state k,
kate_float  t,
kate_float  threshold,
ogg_packet *  op
 

Encodes a repeat data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
t the time at which to insert the repeat packet
threshold the minimum age an active event must be for a repeat packet to be encoded
op the ogg_packet to encode the packet to
Returns:
0 success, and no repeat packets were needed

1 success, and a repeat packet was encoded

KATE_E_* error

int kate_ogg_encode_repeat_raw_times kate_state k,
kate_int64_t  t,
kate_int64_t  threshold,
ogg_packet *  op
 

Encodes a repeat data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
t the time at which to insert the repeat packet
threshold the minimum age an active event must be for a repeat packet to be encoded
op the ogg_packet to encode the packet to
Returns:
0 success, and no repeat packets were needed

1 success, and a repeat packet was encoded

KATE_E_* error

int kate_ogg_encode_text kate_state k,
kate_float  start_time,
kate_float  stop_time,
const char *  text,
size_t  sz,
ogg_packet *  op
 

Encodes a text data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
start_time the start time, in seconds, of the event
stop_time the stop time, in seconds, of the event
text the text this event will hold (may be empty if none)
sz the size, in bytes, of the text
op the ogg_packet to encode the packet to
Returns:
0 success

KATE_E_* error

int kate_ogg_encode_text_raw_times kate_state k,
kate_int64_t  start_time,
kate_int64_t  stop_time,
const char *  text,
size_t  sz,
ogg_packet *  op
 

Encodes a text data packet to an Ogg packet The kate_state structure should have been initialized with kate_decode_init or kate_encode_init.

Parameters:
k the kate_state structure to encode headers for
start_time the start time, in seconds, of the event
stop_time the stop time, in seconds, of the event
text the text this event will hold (may be empty if none)
sz the size, in bytes, of the text
op the ogg_packet to encode the packet to
Returns:
0 success

KATE_E_* error


Generated on Wed Nov 17 09:57:05 2010 for libkate by  doxygen 1.3.9.1