Subtitle module - SPSubInterface

Module used to manipulate single subtitles in the subtitles collections.

Constants

Subtitles number

See Subtitles module.

Property  number

Use this to specify which property should be manipulated by a particular getter or setter function - what_prop parameter. Always use the constants, the actual numbers may change in future versions of SP.

Integer
SUB_SF = 1
SUB_EF = 2
SUB_REF = 3 (get only)
SUB_NSF = 4
(get only)
SUB_DURATION_F = 5 (get only)
SUB_MARGIN_L = 13
SUB_MARGIN_R = 14
SUB_MARGIN_V = 15
SUB_MARGIN_V2 = 16
SUB_TEXT_CHAR_COUNT = 21
(get only)
SUB_LINE_COUNT = 22
Floating point
SUB_ST = 6
SUB_ET = 7
SUB_RET = 8
(get only)
SUB_NST = 9 (get only)
SUB_DURATION_T = 10 (get only)
String
SUB_STYLE = 11
SUB_PAINT_STYLE = 12
(get only)
SUB_CHARACTER_NAME = 17
SUB_EFFECT = 18
SUB_TEXT_DELIMITER = 19
SUB_TEXT = 20

Line properties
SUB_LINE_TEXT = 23
SUB_LINE_STYLE = 24
SUB_LINE_POS_X = 25
SUB_LINE_POS_Y = 26

Property getters and setters

These functions are used to set or get values of subtitles collection's properties.  Common parameters are:

Return value of getter function is either:
Return value of setter function can be either:
get_subtitle_int_prop(subs_no, sub_no, what_prop)
set_subtitle_int_prop(subs_no, sub_no, what_prop, prop_value)
get_subtitle_float_prop(subs_no, sub_no, what_prop)
set_subtitle_float_prop(subs_no, sub_no, what_prop, prop_value)
get_subtitle_string_prop(subs_no, sub_no, what_prop)
set_subtitle_string_prop(subs_no, sub_no, what_prop, prop_value)
get_subtitle_line_prop(subs_no, sub_no, line_no, what_prop)
set_subtitle_line_prop(subs_no, sub_no, line_no, what_prop, prop_value)

Subtitle manipulation methods

These functions of SPSubInterface enable to call corresponding methods of TSubtitle in SP. Common parameters are subs_no and sub_no with the same meaning as with property getters.

recalc_fps(subs_no, sub_no)
shift_f(subs_no, sub_no, delta)
shift_t(subs_no, sub_no, delta)
clear(subs_no, sub_no)
text_remove_line(subs_no, sub_no, line_no)
check_sub_length(subs_no, sub_no, max_length)
swap_content(subs_no, sub_no, other_subs, other_sub)