summaryrefslogtreecommitdiffstats
path: root/sub/sd_srt.c
Commit message (Collapse)AuthorAgeFilesLines
* sub: remove sd_srt.cwm42015-12-151-477/+0
| | | | | | | | The FFmpeg subtitle converter does the same. There used to be some deficiencies in FFmpeg's code, but it seems at least some of them have been fixed. There also used to be the timestamp issue (see previous commit messages), but this doesn't matter anymore. So no reason to keep this code - get rid of it.
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-291-1/+1
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* build: include <strings.h> for strcasecmp()wm42014-07-101-0/+1
| | | | | | | It happens to work without strings.h on glibc or with _GNU_SOURCE, but the POSIX standard requires including <strings.h>. Hopefully fixes OSX build.
* Audit and replace all ctype.h useswm42014-07-011-6/+6
| | | | | | | | | | | | | | | | Something like "char *s = ...; isdigit(s[0]);" triggers undefined behavior, because char can be signed, and thus s[0] can be a negative value. The is*() functions require unsigned char _or_ EOF. EOF is a special value outside of unsigned char range, thus the argument to the is*() functions can't be a char. This undefined behavior can actually trigger crashes if the implementation of these functions e.g. uses lookup tables, which are then indexed with out-of-range values. Replace all <ctype.h> uses with our own custom mp_is*() functions added with misc/ctype.h. As a bonus, these functions are locale-independent. (Although currently, we _require_ C locale for other reasons.)
* Add more constwm42014-06-111-1/+1
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* sub/osd: mp_msg conversionswm42013-12-211-6/+6
|
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-2/+2
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-161-2/+2
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-2/+2
| | | | Followup commit. Fixes all the files references.
* Fix some -Wshadow warningswm42013-07-231-4/+4
| | | | | | In general, this warning can hint to actual bugs. We don't enable it yet, because it would conflict with some unmerged code, and we should check with clang too (this commit was done by testing with gcc).
* sd_srt: handle '<font color="##FFA500">'wm42013-06-181-0/+2
| | | | Wow this is stupid.
* sd_srt, sd_microdvd: set ASS script resolutionwm42013-06-031-0/+8
| | | | | | | | | | | | | | | | | Both converters can output \pos and deal with font sizes, so they assume a specific script resolution (PlayResX/PlayResY). The implicit assumption was that a specific resolution was guaranteed. The MP_ASS_FONT_PLAYRESY constant is connected to this. Better make it explicit, so that the implicit dependency on MP_ASS_FONT_PLAYRESY is removed. (Unfortunately, libavcodec sub converters still don't set PlayResX/PlayResY explicitly, so the value set by that constant can't be declared as arbitrary yet.) PlayResY=288 is most likely the SSA natural script resolution (or something like this?), as well as the libass and VSFilter default. PlayResX=384 is the fallback value set by libass if PlayResY is set to 288, and PlayResX is unset.
* sub: add name field to all sub decoderswm42013-06-031-0/+1
| | | | Might help with debugging.
* sub: turn subassconvert_ functions into sub converterswm42013-06-031-3/+31
| | | | | | | | | | | | | | | | | This means subassconvert.c is split in sd_srt.c and sd_microdvd.c. Now this code is involved in the sub conversion chain like sd_movtext is. The invocation of the converter in sd_ass.c is removed. This requires some other changes to make the new sub converter code work with loading external subtitles. Until now, subtitles loaded via subreader.c was assumed to be in plaintext, or for some formats, in ASS (except in -no-ass mode). Then these were added to an ASS_Track. Change this so that subtitles are always in their original format (as far as decoders/converters for them are available), and turn every sub event read by subreader.c as packet to the dec_sub.c subtitle chain. This removes differences between external/demuxed and -ass/-no-ass code paths further.
* sub: split subassconvert.c into sd_microdvd.c and sd_srt.cwm42013-06-031-0/+438