#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_keepalive (kate_state *k, kate_float t, ogg_packet *op) |
int | kate_ogg_encode_finish (kate_state *k, kate_float 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) |
int kate_ogg_decode_headerin | ( | kate_info * | ki, | |
kate_comment * | kc, | |||
ogg_packet * | op | |||
) |
Decodes a Kate header
ki | the kate_info structure to fill from headers | |
kc | the kate_comment structure to fill from headers | |
op | the ogg_packet to test |
1 success, and all headers have been decoded
KATE_E_* error
References kate_decode_headerin(), KATE_E_INVALID_PARAMETER, and kate_ogg_decode_headerin().
Referenced by kate_ogg_decode_headerin().
int kate_ogg_decode_is_idheader | ( | const ogg_packet * | op | ) |
Checks whether an Ogg packet contains a Kate identification header.
op | the ogg_packet to test |
0 success, and the packet does not contain a Kate identification header
KATE_E_* error
References kate_decode_is_idheader(), and kate_ogg_decode_is_idheader().
Referenced by kate_ogg_decode_is_idheader().
int kate_ogg_decode_packetin | ( | kate_state * | k, | |
ogg_packet * | op | |||
) |
Decodes a Kate data packet
k | the kate_state structure to decode a packet for | |
op | the ogg_packet to test |
1 success, and we're at end of stream
KATE_E_* error
References kate_decode_packetin(), KATE_E_INVALID_PARAMETER, and kate_ogg_decode_packetin().
Referenced by kate_ogg_decode_packetin().
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.
k | the kate_state structure to encode headers for | |
t | the time at which to insert the packet | |
op | the ogg_packet to encode headers to |
KATE_E_* error
References kate_encode_finish(), kate_ogg_encode_finish(), and kate_state::kes.
Referenced by kate_ogg_encode_finish().
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.
k | the kate_state structure to encode headers for | |
kc | the comments to encode in headers | |
op | the ogg_packet to encode headers to |
1 success, and all headers have been encoded
KATE_E_* error
References kate_encode_headers(), kate_ogg_encode_headers(), and kate_state::kes.
Referenced by kate_ogg_encode_headers().
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.
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 headers to |
KATE_E_* error
References kate_encode_keepalive(), kate_ogg_encode_keepalive(), and kate_state::kes.
Referenced by kate_ogg_encode_keepalive().
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.
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 headers to |
KATE_E_* error
References kate_encode_text(), kate_ogg_encode_text(), and kate_state::kes.
Referenced by kate_ogg_encode_text().