|
libquicktime
|
Encode text. More...
Functions | |
| int | lqt_add_text_track (quicktime_t *file, int timescale) |
| Add a text track. | |
| void | lqt_set_text_language (quicktime_t *file, int track, const char *language) |
| Set the language for a text track. | |
| void | lqt_set_chapter_track (quicktime_t *file, int track) |
| Make a text track a chapter track. | |
| void | lqt_set_text_box (quicktime_t *file, int track, uint16_t top, uint16_t left, uint16_t bottom, uint16_t right) |
| Set the text box of a text track. | |
| void | lqt_set_text_fg_color (quicktime_t *file, int track, uint16_t r, uint16_t g, uint16_t b, uint16_t a) |
| Set the foreground color of a text track. | |
| void | lqt_set_text_bg_color (quicktime_t *file, int track, uint16_t r, uint16_t g, uint16_t b, uint16_t a) |
| Set the background color of a text track. | |
| int | lqt_write_text (quicktime_t *file, int track, const char *text, int64_t duration) |
| Write a text sample. | |
| void | lqt_set_text_pts_offset (quicktime_t *file, int track, int64_t offset) |
| Set an video pts offset. | |
Encode text.
| int lqt_add_text_track | ( | quicktime_t * | file, |
| int | timescale ) |
Add a text track.
| file | A quicktime handle |
| timescale | The timescale, in which timestamps will be given. |
References lqt_add_text_track().
Referenced by lqt_add_text_track().
| void lqt_set_text_language | ( | quicktime_t * | file, |
| int | track, | ||
| const char * | language ) |
Set the language for a text track.
| file | A quicktime handle |
| track | Track index (starting with 0) |
| language | ISO-639 Language code |
The language code is a 3-character code, English is "eng", Japanese is "jpn".
References lqt_set_text_language().
Referenced by lqt_set_text_language().
| void lqt_set_chapter_track | ( | quicktime_t * | file, |
| int | track ) |
Make a text track a chapter track.
| file | A quicktime handle |
| track | Track index (starting with 0) |
By default, text tracks are subtitles. By calling this function, you tell libquicktime, that the text track should be a chapter track.
References lqt_set_chapter_track().
Referenced by lqt_set_chapter_track().
| void lqt_set_text_box | ( | quicktime_t * | file, |
| int | track, | ||
| uint16_t | top, | ||
| uint16_t | left, | ||
| uint16_t | bottom, | ||
| uint16_t | right ) |
Set the text box of a text track.
| file | A quicktime handle |
| track | Track index (starting with 0) |
| top | Top border |
| left | Left border |
| bottom | Bottom border |
| right | Right border |
References lqt_set_text_box().
Referenced by lqt_set_text_box().
| void lqt_set_text_fg_color | ( | quicktime_t * | file, |
| int | track, | ||
| uint16_t | r, | ||
| uint16_t | g, | ||
| uint16_t | b, | ||
| uint16_t | a ) |
Set the foreground color of a text track.
| file | A quicktime handle |
| track | Track index (starting with 0) |
| r | Red |
| g | Green |
| b | Blue |
| a | Alpha |
Color values are between 0x0000 and 0xffff. The alpha value is only used for mp4.
References lqt_set_text_fg_color().
Referenced by lqt_set_text_fg_color().
| void lqt_set_text_bg_color | ( | quicktime_t * | file, |
| int | track, | ||
| uint16_t | r, | ||
| uint16_t | g, | ||
| uint16_t | b, | ||
| uint16_t | a ) |
Set the background color of a text track.
| file | A quicktime handle |
| track | Track index (starting with 0) |
| r | Red |
| g | Green |
| b | Blue |
| a | Alpha |
Color values are between 0x0000 and 0xffff. The alpha value is only used for mp4. For Quicktime, the text box is set to transparent if the alpha value is below 0x8000.
References lqt_set_text_bg_color().
Referenced by lqt_set_text_bg_color().
| int lqt_write_text | ( | quicktime_t * | file, |
| int | track, | ||
| const char * | text, | ||
| int64_t | duration ) |
Write a text sample.
| file | A quicktime handle |
| track | Track index (starting with 0) |
| text | A null-terminated UTF-8 string |
| duration | The duration associated with this sample |
References lqt_write_text().
Referenced by lqt_write_text().
| void lqt_set_text_pts_offset | ( | quicktime_t * | file, |
| int | track, | ||
| int64_t | offset ) |
Set an video pts offset.
| file | A quicktime handle |
| track | Track index (starting with 0) |
| offset | PTS offset of the subtitles (in timescale units) |
References lqt_set_text_pts_offset().
Referenced by lqt_set_text_pts_offset().