| int kate_encode_add_bitmap | ( | kate_state * | k, | |
| const kate_bitmap * | kb | |||
| ) |
Adds a bitmap to the currently encoded event.
| k | the kate_state to add the bitmap to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_add_bitmap_index | ( | kate_state * | k, | |
| size_t | bitmap | |||
| ) |
Adds a bitmap to the currently encoded event by its index into the list of predefined bitmaps.
| k | the kate_state to add the bitmap to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nbitmaps.
| int kate_encode_add_meta | ( | kate_state * | k, | |
| const kate_meta * | km | |||
| ) |
Adds a set of metadata to this event
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_add_motion | ( | kate_state * | k, | |
| kate_motion * | km, | |||
| int | destroy | |||
| ) |
Adds a motion to the currently encoded event. If destroy is set, the motion will be automatically destroyed after the current event has been encoded.
| k | the kate_state to add the motion to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_add_motion_index | ( | kate_state * | k, | |
| size_t | motion | |||
| ) |
Adds a motion to the currently encoded event by its index into the list of predefined motions.
| k | the kate_state to add the motion to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nmotions.
| int kate_encode_finish | ( | kate_state * | k, | |
| kate_float | t, | |||
| kate_packet * | kp | |||
| ) |
Finalizes the currently encoded stream. No more events may be added after this is called.
| k | the kate_state to encode to
|
References kate_duration_granule(), KATE_E_INVALID_PARAMETER, kate_encode_finish_raw_times(), and kate_state::ki.
Referenced by kate_ogg_encode_finish().
| int kate_encode_finish_raw_times | ( | kate_state * | k, | |
| kate_int64_t | t, | |||
| kate_packet * | kp | |||
| ) |
Finalizes the currently encoded stream. No more events may be added after this is called.
| k | the kate_state to encode to
|
References kate_info::granule_shift, KATE_E_BAD_GRANULE, KATE_E_INIT, KATE_E_INVALID_PARAMETER, KATE_E_NOT_FOUND, and kate_state::ki.
Referenced by kate_encode_finish(), and kate_ogg_encode_finish_raw_times().
| kate_int64_t kate_encode_get_granule | ( | const kate_state * | k | ) |
Retrieves the current granulepos
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_headers | ( | kate_state * | k, | |
| kate_comment * | kc, | |||
| kate_packet * | kp | |||
| ) |
Encodes a header. This should be repeatedly called at the beginning of encoding, until a positive value is returned, marking the encoding of the last header.
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
Referenced by kate_ogg_encode_headers().
| int kate_encode_init | ( | kate_state * | k, | |
| kate_info * | ki | |||
| ) |
Initializes a kate_state structure for encoding using the supplied kate_info structure. When done, the kate_state structure should be cleared using kate_clear.
| k | the kate_state structure to initialize for encoding
|
References KATE_E_INVALID_PARAMETER, KATE_E_OUT_OF_MEMORY, kate_state::ki, and kate_info::num_headers.
| int kate_encode_keepalive | ( | kate_state * | k, | |
| kate_float | t, | |||
| kate_packet * | kp | |||
| ) |
Emits a keepalive packet, to help with seeking.
| k | the kate_state to encode to
|
References kate_duration_granule(), KATE_E_INVALID_PARAMETER, kate_encode_keepalive_raw_times(), and kate_state::ki.
Referenced by kate_ogg_encode_keepalive().
| int kate_encode_keepalive_raw_times | ( | kate_state * | k, | |
| kate_int64_t | t, | |||
| kate_packet * | kp | |||
| ) |
Emits a keepalive packet, to help with seeking.
| k | the kate_state to encode to
|
References kate_info::granule_shift, KATE_E_BAD_GRANULE, KATE_E_INIT, KATE_E_INVALID_PARAMETER, KATE_E_NOT_FOUND, and kate_state::ki.
Referenced by kate_encode_keepalive(), and kate_ogg_encode_keepalive_raw_times().
| int kate_encode_merge_meta | ( | kate_state * | k, | |
| kate_meta * | km | |||
| ) |
Adds a set of metadata to this event
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_repeat | ( | kate_state * | k, | |
| kate_float | t, | |||
| kate_float | threshold, | |||
| kate_packet * | kp | |||
| ) |
Emits a repeat packet, to help with seeking. The first active event at time t, if it or its latest repeat (whichever is the latest) was emitted more than threshold ago, of if threshold is zero, will have a repeat packet emitted. kate_encode_repeat is designed to be called in a loop, as it will return a repeat packet for only one event even if more than one event needs a repeat. When the returned value is 0, no more events need repeating at time t.
| k | the kate_state to encode to
|
References kate_duration_granule(), KATE_E_INVALID_PARAMETER, kate_encode_repeat_raw_times(), and kate_state::ki.
Referenced by kate_ogg_encode_repeat().
| int kate_encode_repeat_raw_times | ( | kate_state * | k, | |
| kate_int64_t | t, | |||
| kate_int64_t | threshold, | |||
| kate_packet * | kp | |||
| ) |
Emits a repeat packet, to help with seeking. The first active event at time t, if it or its latest repeat (whichever is the latest) was emitted more than threshold ago, of if threshold is zero, will have a repeat packet emitted. kate_encode_repeat is designed to be called in a loop, as it will return a repeat packet for only one event even if more than one event needs a repeat. When the returned value is 0, no more events need repeating at time t.
| k | the kate_state to encode to
|
References kate_info::granule_shift, KATE_E_BAD_GRANULE, KATE_E_INIT, KATE_E_INVALID_PARAMETER, KATE_E_NOT_FOUND, and kate_state::ki.
Referenced by kate_encode_repeat(), and kate_ogg_encode_repeat_raw_times().
| int kate_encode_set_bitmap | ( | kate_state * | k, | |
| const kate_bitmap * | kb | |||
| ) |
Adds a bitmap to the currently encoded event.
| k | the kate_state to set the bitmap for
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, and kate_state::ki.
| int kate_encode_set_bitmap_index | ( | kate_state * | k, | |
| size_t | bitmap | |||
| ) |
Sets the bitmap the event should use, by its index in the predefined bitmap list.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nbitmaps.
| int kate_encode_set_font_mapping_index | ( | kate_state * | k, | |
| size_t | font_mapping | |||
| ) |
Sets the font mapping this event's text should be displayed with, by its index into the predefined font mappings list.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nfont_mappings.
| int kate_encode_set_id | ( | kate_state * | k, | |
| kate_int32_t | id | |||
| ) |
This function is obsolete and should not be used. An event identifier is automatically generated for each event. It used to set a unique identifier for the currently encoded event, so it can be referred to later, but not does nothing.
| k | the kate_state to encode to
|
References KATE_E_IMPL, KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_set_language | ( | kate_state * | k, | |
| const char * | language | |||
| ) |
Sets the language used in this event's text, overriding the default language
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, and KATE_E_OUT_OF_MEMORY.
| int kate_encode_set_markup_type | ( | kate_state * | k, | |
| int | text_markup_type | |||
| ) |
Sets the markup type of this event
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_set_palette | ( | kate_state * | k, | |
| const kate_palette * | kp | |||
| ) |
Adds a palette to the currently encoded event.
| k | the kate_state to set the palette for
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, and kate_state::ki.
| int kate_encode_set_palette_index | ( | kate_state * | k, | |
| size_t | palette | |||
| ) |
Sets the palette the event should use for its bitmap, by its index in the predefined palette list.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::npalettes.
| int kate_encode_set_region | ( | kate_state * | k, | |
| const kate_region * | kr | |||
| ) |
Sets the region the event should be displayed in.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, and kate_state::ki.
| int kate_encode_set_region_index | ( | kate_state * | k, | |
| size_t | region | |||
| ) |
Sets the region the event should be displayed in, by its index in the predefined regions list.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nregions.
| int kate_encode_set_secondary_style | ( | kate_state * | k, | |
| const kate_style * | ks | |||
| ) |
Sets the secondary style the event should be displayed with.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, and kate_state::ki.
| int kate_encode_set_secondary_style_index | ( | kate_state * | k, | |
| size_t | style | |||
| ) |
Sets the secondary style the event should be displayed with, by its index in the predefined styles list.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nstyles.
| int kate_encode_set_style | ( | kate_state * | k, | |
| const kate_style * | ks | |||
| ) |
Sets the style the event should be displayed with.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, and kate_state::ki.
| int kate_encode_set_style_index | ( | kate_state * | k, | |
| size_t | style | |||
| ) |
Sets the style the event should be displayed with, by its index in the predefined styles list.
| k | the kate_state to encode to
|
References KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_state::ki, and kate_info::nstyles.
| int kate_encode_set_text_directionality | ( | kate_state * | k, | |
| kate_text_directionality | text_directionality | |||
| ) |
Sets the text directionality used in this event's text, overriding the default text directionality.
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_set_text_encoding | ( | kate_state * | k, | |
| kate_text_encoding | text_encoding | |||
| ) |
Sets the character encoding used in this event's text, overriding the default character encoding.
| k | the kate_state to encode to
|
References KATE_E_INIT, and KATE_E_INVALID_PARAMETER.
| int kate_encode_text | ( | kate_state * | k, | |
| kate_float | t0, | |||
| kate_float | t1, | |||
| const char * | text, | |||
| size_t | sz, | |||
| kate_packet * | kp | |||
| ) |
Encodes a text (which may be NULL) of the given size, starting at t0 and ending at t1. This should always be called when encoding an event, even if the text is NULL. After this is called, the event is fully encoded and cannot be added to anymore.
| k | the kate_state to add the text to
|
References kate_duration_granule(), KATE_E_INVALID_PARAMETER, kate_encode_text_raw_times(), and kate_state::ki.
Referenced by kate_ogg_encode_text().
| int kate_encode_text_raw_times | ( | kate_state * | k, | |
| kate_int64_t | t0, | |||
| kate_int64_t | t1, | |||
| const char * | text, | |||
| size_t | sz, | |||
| kate_packet * | kp | |||
| ) |
Encodes a text (which may be NULL) of the given size, starting at t0 and ending at t1. This should always be called when encoding an event, even if the text is NULL. After this is called, the event is fully encoded and cannot be added to anymore.
| k | the kate_state to add the text to
|
References kate_packet::data, kate_info::granule_shift, KATE_E_BAD_GRANULE, KATE_E_INIT, KATE_E_INVALID_PARAMETER, kate_text_validate(), kate_state::ki, and kate_packet::nbytes.
Referenced by kate_encode_text(), and kate_ogg_encode_text_raw_times().
1.6.3