diff options
author | Grigori Goronzy <greg@blackbox> | 2009-07-11 02:18:51 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2009-07-11 02:22:18 +0200 |
commit | 2c412cdab94a7bb27c5a1e04ab902295215de888 (patch) | |
tree | c1372ebf5e6473b287e152a40c88587f3470d237 /libass/ass_drawing.c | |
parent | 613a22ab9b96453c10de6d75b43067652ad6d7db (diff) | |
download | libass-2c412cdab94a7bb27c5a1e04ab902295215de888.tar.bz2 libass-2c412cdab94a7bb27c5a1e04ab902295215de888.tar.xz |
Message callback funtionality
Introduce functionality for providing a message callback that is used
for passing messages to the controlling application instead of simply
printing them to standard output. The function pointer to the callback
is stored in the ass_library_t instance. ass_msg needs access to it, so
in many places the library instance needs to be passed around now.
The default behavior is the old one: messages of MSGL_INFO or lower
are printed to the standard output, prefixed with "[ass]".
Diffstat (limited to 'libass/ass_drawing.c')
-rw-r--r-- | libass/ass_drawing.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libass/ass_drawing.c b/libass/ass_drawing.c index c05a962..f75bbd9 100644 --- a/libass/ass_drawing.c +++ b/libass/ass_drawing.c @@ -139,8 +139,9 @@ static void drawing_finish(ass_drawing_t *drawing) for (i = 0; i < ol->n_points; i++) ol->points[i].y += offset; - ass_msg(MSGL_V, "Parsed drawing with %d points and %d contours", - ol->n_points, ol->n_contours); + ass_msg(drawing->library, MSGL_V, + "Parsed drawing with %d points and %d contours", ol->n_points, + ol->n_contours); } /* @@ -364,6 +365,7 @@ ass_drawing_t *ass_drawing_new(void *fontconfig_priv, ass_font_t *font, drawing->size = DRAWING_INITIAL_SIZE; drawing->ftlibrary = lib; + drawing->library = font->library; drawing_make_glyph(drawing, fontconfig_priv, font, hint); drawing->scale_x = 1.; |