summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Add meson as a secondary build systemRyan Lucia9 days1-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will bring back a first-party buildsystem for MSVC after the previous solution https://github.com/libass/libass-msvc was retired and make it easier to use libass as a subproject in other meson projects. It does not currently support all of our utilities nor testing and fuzzing infrastructure and x86_32 assembly is always built in PIC mode. Due to meson deficiencies shared libraries lack symbol export control and it is not possible to build x32 assembly. However, for packaging and downstream use it is feature complete on Windows and static-only builds are sufficient for subproject use on any platform, so it brings a net positive and keeping this level of support up alongside autotools is expected to be barely any effort. And ofc future meson versions and patches to this build setup might improve it further. The port was initially brought up by Ryan Lucia (CoffeeFlux) and later further adapted and polished for merge by arch1t3cht and torque, but several more people contributed bits and pieces. They are listed in the following. Reviewed-by: Eli Schwartz <eschwartz93@gmail.com> Reviewed-by: Oneric <oneric@oneric.stub> Co-authored-by: arch1t3cht <arch1t3cht@gmail.com> Co-authored-by: torque <torque@users.noreply.github.com> Co-authored-by: Luni-4 <luni-4@hotmail.it> Co-authored-by: Funami580 <Funami580@users.noreply.github.com> Co-authored-by: woclass <5158738+inkydragon@users.noreply.github.com> Co-authored-by: line0 <line0@inbox.lv> Co-authored-by: Myaamori <myaamori1993@gmail.com> Co-authored-by: Xavier Claessens <xavier.claessens@collabora.com>
* Switch to non-recursive MakefileOneric2022-05-121-7/+0
| | | | | | | | | | | | | | Non-recursive Makefiles allow better and more robust automatic dependency resolution and higher parallelism for shorter build-times. This change keeps all locations of the non-installed targets unchanged for minimal firction. Calling make from subdirectories no longer works, but instead the specific build targets can be invoked directly from the toplevel. If we bumped the required Automake version to 1.13+, the library fragment could use %reldir% or %D% to be unaffected by potential future directory moves, but it is unlikely we'll ever change the location or name of the libass directory.
* Avoid passing NULL to printf's %s if argc == 0Oneric2022-05-071-1/+1
| | | | This is undefined behaviour even if most libcs handle it gracefully.
* profile, test: set storage size before renderingOneric2022-05-071-4/+15
| | | | | | | | | | | | | | As programs provided with the library's source code they also serve as examples for how to correctly use the API, which usually means setting a storage size. compare already sets the storage size. profile can continue using a fixed size, it never outputs the rendering. test already had issues before if either the guessed storage size was incorrect or the frame size didn't match the intended aspect ratio. To fix both, add new optional arguments for storage and frame size.
* refactor: do not cast allocationsOneric2022-01-201-2/+2
|
* Fix embedded and memory fontsOneric2021-04-221-0/+1
| | | | | | | | | | | Previously only both only worked when ass_set_fonts was called after all embedded and memory fonts were already added. Especially for embedded fonts this meant it won't work for most users, except mpv, including our own utilities, even if extract_fonts was set. Now that it works, enable extract_fonts in our utilities. GitHub: fixes #266
* Fix memory leaksGrigori Goronzy2016-10-041-0/+1
| | | | Found by fuzzer test case id:000051,sig:11,sync:fuzzer3,src:004221.
* test: use proper fallback nameGrigori Goronzy2015-09-071-1/+1
| | | | | The correct generic family name is "sans-serif", the short form "Sans" is specific to fontconfig only.
* directwrite: add initial fontselect implementationfeliwir2015-07-101-0/+1
| | | | Incomplete, leaks memory, but capable of rendering something.
* Fix compiler compatibilityGrigori Goronzy2015-07-101-1/+2
|
* fontselect: expose a fontprovider listing APIStefano Pigozzi2015-07-101-0/+22
| | | | | | This allows client code to query libass for the font providers it was compiled with. It can be useful for clients so that they can show selection interfaces to their users.
* fontselect: expose a fontprovider selection APIStefano Pigozzi2015-07-101-1/+2
| | | | | | | | | Allow the user of libass to select the font provider from ass_set_fonts. This API change actually doesn't break client code which was passing `fc=1`; now the same value will autodetect a usable font provider. Also add an api to list available font providers as that is useful for client code to show drop down menus with a font provider to choose from.
* Fixed headers in profile and testRodger Combs2014-04-261-1/+2
|
* Test/Profile: Support out-of-tree builds11rcombs2014-01-251-3/+3
|
* Test: Render at 1280x72011rcombs2014-01-251-2/+2
|
* test: separate linker flagsGrigori Goronzy2011-09-251-1/+1
| | | | | Use separate linker flags for the test program to avoid unnecessarily linking the libass library against libpng.
* test: free imageGrigori Goronzy2011-07-151-0/+2
| | | | Reduces the noise in valgrind output.
* test: fix compilation with libpng 1.5, rename configure switchGrigori Goronzy2011-02-161-1/+1
| | | | | | | | | | | libpng 1.5 renamed the jmpbuf variable to jmp_buf. Since direct access to this variable is deprecated, it makes more sense to use the function png_jmpbuf() instead. Also, rename the --enable-png switch to --enable-test to make clear this is a debugging option. Initial patch by Alexis Ballier, aballier AT gentoo DOT org.
* test: Add license headerGrigori Goronzy2010-09-281-0/+19
|
* Set AM_CFLAGS instead of CFLAGS directlyGrigori Goronzy2010-08-091-0/+2
|
* Simplify test programGrigori Goronzy2010-02-061-6/+0
| | | | Lots of unnecessary calls to setup functions can be removed.
* Rename typedefs (breaks API)Grigori Goronzy2009-08-061-7/+7
| | | | | | Rename all typedefs from the convention foo_bar_t, which can possibly conflict with POSIX types, to FooBar (and ASS_FooBar for public API typedefs). Fix formatting and stray comments while at it.
* Improve message callback APIGrigori Goronzy2009-07-261-2/+2
| | | | | | Instead of passing a pointer to a va_list, pass the va_list itself. Additionally, use const char for the format string and use names in the prototype that describe the arguments' meaning.
* Test program: free track/renderer/libraryGrigori Goronzy2009-07-241-0/+5
| | | | | In the test program, free the track, renderer and library properly. This is useful for memory leak testing.
* Improve fontconfig setupGrigori Goronzy2009-07-171-1/+1
| | | | | | | Add an argument to ass_set_fonts for controlling whether the fontconfig font cache should be built/updated. Add a new function ass_fonts_update to make it possible to update fonts later on. Additionally, stop using FcConfigSetDefault for thread safety.
* Allow passing user data to callbackGrigori Goronzy2009-07-121-2/+2
| | | | | | It is often useful or necessary to pass custom data to a callback. Add an argument to the callback registering function to pass a void pointer object to the callback each time it is called.
* Convert test program to plain CGrigori Goronzy2009-07-113-173/+182
| | | | | The test program unnecessarily was using a few C++ features. Convert it to plain C to make everything work without a C++ compiler.
* Message callback funtionalityGrigori Goronzy2009-07-111-0/+11
| | | | | | | | | | | 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]".
* Test program: check track initializationGrigori Goronzy2009-07-071-0/+4
| | | | Stop in case the track initialization fails. This fixes a crash.
* Test program: nicer-looking backgroundGrigori Goronzy2009-06-251-2/+3
| | | | | | Use a uniformly colored background in the test program. This looks better than the randomly-looking pattern that was used before. A chessboard pattern would be even better, but this will do for now.
* ass_set_fonts: optionally pass fontconfig config pathgreg2009-06-201-1/+1
| | | | | | | Optionally pass a fontconfig config file to the fontconfig initialisation. This changes the public API.
* Remove wrappers for ass_set_fontsgreg2009-06-201-1/+1
| | | | | | | | | ass_set_fonts_ was wrapped through ass_set_fonts and ass_set_fonts_nofc to either use fontconfig or not. This is not very useful, since a simple parameter to ass_set_fonts_ can be used instead. Remove the wrapper functions and rename the real function to ass_set_fonts. This changes the public API.
* Add autotools infrastructure.greg2009-06-182-0/+161