diff options
Diffstat (limited to 'libass/mputils.h')
-rw-r--r-- | libass/mputils.h | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/libass/mputils.h b/libass/mputils.h index cff2693..6f0e332 100644 --- a/libass/mputils.h +++ b/libass/mputils.h @@ -1,31 +1,35 @@ -/* - * Copyright (C) 2006 Evgeniy Stepanov <eugeni.stepanov@gmail.com> - * - * This file is part of libass. - * - * libass is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libass is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with libass; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef LIBASS_MPUTILS_H -#define LIBASS_MPUTILS_H - -#include "mp_msg.h" +#ifndef __MPUTILS_H__ +#define __MPUTILS_H__ + #include "help_mp.h" -#include "libvo/font_load.h" // for blur() -#include "subreader.h" // for guess_buffer_cp -#include "libvo/sub.h" // for utf8_get_char -#include "libavutil/common.h" -#endif /* LIBASS_MPUTILS_H */ +unsigned utf8_get_char(char **str); + +void my_mp_msg(int lvl, char *lvl_str, char *fmt, ...); + +#ifdef __VISUALC__ +static void mp_msg(int mod, int level, const char *fmt, ...) { + // MSVC doesn't like the # used all around for mp_msg, so it breaks va_arg +} +#else +#define mp_msg(mod, level, args...) my_mp_msg(level, #level, args) +#endif + +#define MSGT_ASS 43 + +#define MSGL_FATAL 0 +#define MSGL_ERR 1 +#define MSGL_WARN 2 +#define MSGL_INFO 4 +#define MSGL_V 6 +#define MSGL_DBG2 7 + +void blur(unsigned char *buffer, unsigned short *tmp2, int width, int height, + int stride, int *m2, int r, int mwidth); + +void* guess_buffer_cp(unsigned char* buffer, int buflen, char *preferred_language, char *fallback); + +#define FFMAX(a,b) ((a) > (b) ? (a) : (b)) +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + +#endif |