summaryrefslogtreecommitdiffstats
path: root/sub/osd_dummy.c
Commit message (Collapse)AuthorAgeFilesLines
* osd: make osd_ass_0/1 defineswm42016-05-031-3/+0
| | | | So we can concatenate them with strings at compile time.
* osd: fix build with --disable-libasswm42016-03-161-1/+1
|
* osd, lua: manage multiple ASS overlays set with set_osd_ass() callswm42016-03-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Until now, there was only 1 global ASS overlay that could be set by all scripts. This was often perceived as bug when multiple scripts tried to set their own ASS overlay. This was kind of hard to solve because the script could set its own ASS PlayResX/Y, which makes it impossible to share a single ASS_Renderer for multiple scripts. The OSC unfortunately makes use of this feature (and unfortunately can't be fixed because it's a POS), so we're stuck with this complication. Implement the worst-case solution and fix this by creating separate ASS track and renderer objects for each script that wants to set an ASS overlay. The z-order is decided by the order the scripts set their text first. This is essentially random, unless you do it at script init, and you pass scripts in a specific order. Script initialization is currently serialized (as a feature), so the first loaded script gets lowest Z-order. The Lua script API interestingly remains the same. (And also will remain undocumented, unsupported, and potentially volatile.)
* osd, lua: remove weird OSD scalingwm42016-03-071-7/+0
| | | | | | | | | | | | | | | | | | | | | Do not scale OSD mouse input to the ASS OSD script resolution. The original idea of this mechanism was that the user doesn't have to care about the actual resolution of anything, and can just use the OSD resolution consistently. But this made things worse. Remove the implicit scaling, and always use the screen resolution. (Except with --vo=xv, where additional scaling is forced upon everything.) Drop get_osd_resolution(). There is no replacement. Rename get_screen_size() and get_screen_margins() to use "osd" instead of "screen". For anything but --vo=xv these are equivalent, but with --vo=xv the OSD resolution has additional implicit scaling. Add code to osc.lua which emulates the old behavior. Note that none of the changed functions were public API, so implicit breakage of scripts which used it is just going to happen.
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* Add some missing "const"swm42014-10-101-2/+2
| | | | | | | The one in msg.c was mistakenly removed with commit e99a37f6. I didn't actually test the change in ao_sndio.c (but obviously "ap" shouldn't be static).
* command: allow using ASS tags on OSD messageswm42014-09-181-0/+3
| | | | | | | | | | | We don't allow this by default, because it would be silly if random external data (like filenames or file tags) could accidentally trigger them. Add a property that magically disables this ASS tag escaping. Note that malicious input could still disable ASS tag escaping by itself. This would be annoying but harmless.
* sub: uglify OSD code path with lockingwm42014-01-181-1/+1
| | | | | | | | | | | | | | | Do two things: 1. add locking to struct osd_state 2. make struct osd_state opaque While 1. is somewhat simple, 2. is quite horrible. Lots of code accesses lots of osd_state (and osd_object) members. To make sure everything is accessed synchronously, I prefer making osd_state opaque, even if it means adding pretty dumb accessors. All of this is meant to allow running VO in their own threads. Eventually, VOs will request OSD on their own, which means osd_state will be accessed from foreign threads.
* Rename sub.c/.h to osd.c/.hwm42013-11-241-1/+1
| | | | | This was way too misleading. osd.c merely calls the subtitle renderers, instead of actually dealing with subtitles.
* Add initial Lua scripting supportwm42013-09-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | This is preliminary. There are still tons of issues, and any aspect of scripting may change in the future. I decided to merge this (preliminary) work now because it makes it easier to develop it, not because it's done. lua.rst is clear enough about it (plus some sarcasm). This requires linking to Lua. Lua has no official pkg-config file, but there are distribution specific .pc files, all with different names. Adding a non-pkg-config based configure test was considered, but we'd rather not. One major complication is that libquvi links against Lua too, and if the Lua version is different from mpv's, you will get a crash as soon as libquvi uses Lua. (libquvi by design always runs when a file is opened.) I would consider this the problem of distros and whoever builds mpv, but to make things easier for users, we add a terrible runtime test to the configure script, which probes whether libquvi will crash. This is disabled when cross-compiling, but in that case we hope the user knows what he is doing.
* sub: allow rendering OSD in ASS image format directly, simplifywm42012-10-161-18/+4
| | | | | | | | | | | | | | | | | | | | | Before this commit, the OSD was drawn using libass, but the resulting bitmaps were converted to the internal mplayer OSD format. We want to get rid of the old OSD format, because it's monochrome, and can't even be rendered directly using modern video output methods (like with OpenGL/Direct3D/VDPAU). Change it so that VOs can get the ASS images directly, without additional conversions. (This also has the consequence that the OSD can render colors now.) Currently, this is vo_gl3 only. The other VOs still use the old method. Also, the old OSD format is still used for all VOs with DVD subtitles (spudec). Rewrite sub.c. Remove all the awkward flags and bounding boxes and change detection things. It turns out that much of that isn't needed. Move code related to converting subtitle images to img_convert.c. (It has to be noted that all of these conversions were already done before in some places, and that the new code actually makes less use of them.)
* Remove teletext supportwm42012-08-031-4/+0
| | | | | | | | Teletext requires special OSD support. Because I can't even test teletext, I can't restore support for it. Since teletext can be considered ancient and obscure, and since it doesn't make sense to keep the remaining teletext code without being able to use it, I'm removing it.
* osd: remove freetype font rendering codewm42012-07-281-0/+43
The previous commit made libass the default OSD renderer. This commit removes the disabled freetype renderer completely. The commits were done separately to make rolling back easier, because using libass for OSD rendering is a risky choice. Also remove freetype/fontconfig/fribidi code. This is all done by libass now. If mplayer is compiled without libass, no OSD is displayed.