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.h | |
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.h')
-rw-r--r-- | libass/ass.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libass/ass.h b/libass/ass.h index d911e99..e0160d6 100644 --- a/libass/ass.h +++ b/libass/ass.h @@ -22,6 +22,7 @@ #define LIBASS_ASS_H #include <stdio.h> +#include <stdarg.h> #include "ass_types.h" /// Libass renderer object. Contents are private. @@ -69,6 +70,9 @@ void ass_set_style_overrides(ass_library_t *priv, char **list); void ass_process_force_style(ass_track_t *track); +void ass_set_message_cb(ass_library_t *priv, + void (*msg_cb)(int, char *, va_list *)); + /** * \brief initialize the renderer * \param priv library handle |