libkate 0.4.3
Functions
Decoding

Functions

int kate_decode_is_idheader (const kate_packet *kp)
 
int kate_decode_headerin (kate_info *ki, kate_comment *kc, kate_packet *kp)
 
int kate_decode_init (kate_state *k, kate_info *ki)
 
int kate_decode_packetin (kate_state *k, kate_packet *kp)
 
int kate_decode_eventout (kate_state *k, kate_const kate_event **event)
 
int kate_decode_seek (kate_state *k)
 

Detailed Description

Function Documentation

◆ kate_decode_eventout()

int kate_decode_eventout ( kate_state k,
kate_const kate_event **  event 
)

Requests a pointer to the event decoded by the last packet, if there is one.

Parameters
kthe kate_state to get the event from
eventa pointer to where to place the pointer to the event, if any
Returns
0 success, an event was returned
1 success, but there was no event to return
KATE_E_* error

References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.

Referenced by kate_high_decode_packetin().

◆ kate_decode_headerin()

int kate_decode_headerin ( kate_info ki,
kate_comment kc,
kate_packet kp 
)

Decodes a header packet, and updates the kate_info and kate_comment structures from the decoded data.

Parameters
kithe kate_info structure to update
kcthe kate_comment structure to update
kpthe packet to decode
Returns
0 success
1 success, and all headers have been decoded
KATE_E_* error

References kate_packet::data, KATE_E_BAD_PACKET, KATE_E_INVALID_PARAMETER, and kate_packet::nbytes.

Referenced by kate_high_decode_packetin(), and kate_ogg_decode_headerin().

◆ kate_decode_init()

int kate_decode_init ( kate_state k,
kate_info ki 
)

Initializes a kate_state structure for decoding using the supplied kate_info structure. When done, the kate_state should be cleared using kate_clear.

Parameters
kthe kate_state to initialize for decoding
kithe kate_info structure initialized from the decoded headers
Returns
0 success
KATE_E_* error

References KATE_E_INVALID_PARAMETER, KATE_E_OUT_OF_MEMORY, and kate_state::ki.

◆ kate_decode_is_idheader()

int kate_decode_is_idheader ( const kate_packet kp)

Checks if a packet is a Kate ID header

Parameters
kpthe packet to inspect
Returns
0 the packet is not an ID header
!=0 the packet is an ID header

References kate_packet::data, and kate_packet::nbytes.

Referenced by kate_ogg_decode_is_idheader().

◆ kate_decode_packetin()

int kate_decode_packetin ( kate_state k,
kate_packet kp 
)

Decodes a data packet.

Parameters
kthe kate_state to decode to
kpthe packet to decode
Returns
0 success
1 success, and we're at end of stream
KATE_E_* error

References kate_packet::data, KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_packet::nbytes.

Referenced by kate_high_decode_packetin(), and kate_ogg_decode_packetin().

◆ kate_decode_seek()

int kate_decode_seek ( kate_state k)

Informs the Kate decoder that seeking has occured. This will cause the decoder to use any future repeat packets to recover data from past events which are still active, but which original packets were before the seek point, and therefore unavailable.

Parameters
kthe kate_state for which a seek occured
Returns
0 success
KATE_E_* error

References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.