Commit Graph

108 Commits

Author SHA1 Message Date
odrling 463f886a58
add missing includes
my gentoo ebuild seems to die on these includes... unlike a manual build
2024-04-02 18:44:59 +02:00
odrling 010f538efa
normalize timecodes for every formats except matroska 2024-04-02 18:44:57 +02:00
odrling 8348c1e0f5
shift video instead of subtitles
This is probably wrong in some cases. This is probably what we want with
matroska files.
2024-04-02 18:44:57 +02:00
Pierre Jeanjean 93398de478
Fix charset detection and conversion issues 2024-04-02 18:44:53 +02:00
arch1t3cht b3eb182259 Merge branch 'bugfixes' into feature 2023-10-13 23:56:15 +02:00
arch1t3cht b8f4c98c4c Move iconv include to charset_conv.h
On newer mac sdks iconv_t is defined differently, so it's harder to
just have a typedef for it.
2023-10-13 23:52:26 +02:00
Alex James 4f67db8dd7 libaegisub: Avoid calling iconv_close(iconv_invalid)
IsConversionSupported unconditionally calls iconv_close on the
descriptor returned by iconv_open. This may result in crashes if
iconv_open returns iconv_invalid.
2023-09-07 19:38:59 +02:00
arch1t3cht 66c90b7ed8 vfr: Ensure nonzero denominator 2023-01-30 01:56:52 +01:00
arch1t3cht 245cc68afa Fix FrameAtTime computation for CFR
The new formula is just the inverse function of the CFR part of
the TimeAtFrame function.

To see how the previous implementation was faulty, see either the added
tests, or
- In Aegisub, open a dummy video with a frame rate of 23.976
- Make a subtitle event with start time 04:44.41
- Double-click the line to (supposedly) seek to its first frame
- This will seek one frame earlier than it should, and the event will
  not be displayed on the resulting frame.
2022-11-02 02:19:38 +01:00
Myaamori 84ac716972 meson: add uchardet port
Meson port instead of using CMake as I ran into issues with the
src directory (where uchardet.h is located) not being appended
to the include path, and on Windows I ran into a Meson issue
where a -D macro definition was being interpreted as a filename.
In the end a Meson port seemed simpler than working out the CMake
issues, as the CMakeLists.txt files were straightforward and easy
to port.

Note that because of the directory structure of the uchardet source
I had to change the include directive from uchardet/uchardet.h
to just uchardet.h. This is actually more in line with the uchardet
pkg-config file, which appends /usr/include/uchardet to the include path.
2021-05-21 21:09:36 -04:00
Ryan 1384123e2d iconv wrapper: allocate a smaller buffer on the stack 2021-01-16 05:31:08 -05:00
Ryan d583744b69 Merge in work from TypesettingTools fork 2021-01-16 02:12:31 -05:00
Thomas Goyne 6ca879938d Always feed the entire file into uchardet when detection is needed
uchardet will report that a file is "ascii" if the first page has no bytes
>127, so we need to actually look at the entire file in case the first higher
byte is later in the file.
2019-09-28 18:13:44 -07:00
Thomas Goyne 8d17a0e88a Assume that files which start with a unicode BOM are valid files of that type 2019-09-28 18:13:44 -07:00
wangqr 7a1756a26f In tagless_find_helper only tag before start should be ignored
The search result is irrelevant to which tag we should ignore

Fix wangqr/Aegisub#17
2019-09-22 17:41:02 -07:00
wangqr bb5090ac3a Detect EBML magic number to skip encoding detection for MKV
MKV loads slow after f733297499
2019-09-22 17:40:46 -07:00
wangqr 698c41afef Fix iconv ConversionFailure on long path 2019-09-22 17:39:43 -07:00
Ryan Lucia 2411617158 Properly ignore ASS whitespace characters in character counter 2019-09-22 17:39:43 -07:00
Ryan Lucia a621072e7d Add support for WWXD keyframes in qpfile format 2018-05-10 03:28:51 -04:00
Ryan Lucia 869cdcc7a1 Properly ignore ASS whitespace characters in character counter 2018-05-07 18:09:42 -04:00
sidneys d4461f65be fix(updated-macos-build): prefix icu method calls (icu::BreakIterator, icu::Locale, icu::UnicodeString) 2018-03-31 02:58:27 +02:00
Thomas Goyne 45315476bd Switch to a maintained fork of universalchardet 2016-02-09 20:29:29 -08:00
Thomas Goyne 4366e59353 Update to Visual Studio 2015 2015-07-30 19:20:10 -07:00
Thomas Goyne b0f4c9f1ad Remove agi::vfr::Framerate's explicit swap implementation 2015-07-28 14:30:03 -07:00
Thomas Goyne fefa31eb47 Improve code coverage of tests 2015-07-28 14:30:03 -07:00
Thomas Goyne 3c55d4fde4 Fix incorrect results for non-regex skip tags searches
Closes #1865.
2015-07-27 10:29:22 -07:00
Thomas Goyne 74ac2ab1fe Extract some more find/replace logic to libaegisub 2015-07-27 10:29:22 -07:00
Thomas Goyne 878fd4453b Fix whitespace 2015-02-15 08:19:22 -08:00
Thomas Goyne e72ab0eda8 Remove an incorrect error message 2015-02-15 08:19:17 -08:00
Thomas Goyne 879788fe83 Eliminate some gratuitous exceptions 2015-02-15 08:19:10 -08:00
Thomas Goyne 5d8aeb8b40 Replace most remaining uses of boost::split with agi::Split 2015-02-08 08:11:14 -08:00
Thomas Goyne 7300a1bf2d Remove some redundant .get()s 2015-01-26 19:22:59 -08:00
Thomas Goyne b29fcd4f89 Add some extern template declarations for stuff with vtables 2014-12-28 20:43:29 -08:00
Thomas Goyne e485c469e2 Pull some of OptionValue to a cpp file 2014-12-28 20:21:48 -08:00
Thomas Goyne a6b1639320 Extract some bits that don't need to be templated from templates
Cuts compile time by about 10% and shrinks the final binary a little.
2014-12-28 16:46:38 -08:00
Thomas Goyne 010f6c4f79 Debloatify some stuff 2014-12-28 12:30:01 -08:00
Thomas Goyne 8567d9a573 Use more make_unqiue 2014-08-31 08:11:12 -07:00
Thomas Goyne 9ebb8d7df1 Silence a warning 2014-08-31 08:11:12 -07:00
Thomas Goyne 584284aa79 Reject vfr timecodes which are all identical 2014-07-15 09:11:40 -07:00
Thomas Goyne 92b8b2851b Don't build the dialogue lexer on every use
Building the lexer takes much longer than actually lexing, and since the
lexer is stateless there's no reason not to just make it static.
2014-07-14 10:10:22 -07:00
Thomas Goyne 706a72d5c1 Eliminate several memory allocations per line when reading thesaurus files 2014-07-14 10:10:21 -07:00
Thomas Goyne e713f741a4 Make some functions static 2014-07-08 16:38:16 -07:00
Thomas Goyne a11da3350c Save a backup copy of the old hotkey file if migrating from the old format 2014-07-07 09:42:02 -07:00
Thomas Goyne 935c6bc3a7 Store hotkeys in a less dumb format 2014-07-06 19:25:49 -07:00
Thomas Goyne f0f836c47b Eliminate a pointless std::map in charset_conv 2014-07-06 19:25:48 -07:00
Thomas Goyne a22dd0f9ca Clean up the json parser a little 2014-07-06 19:25:48 -07:00
Thomas Goyne d9016cc8ea Debloat and slightly speed up the MRU code 2014-07-06 19:25:48 -07:00
Thomas Goyne 518342b919 Make the hotkey code a bit less bloated 2014-07-06 19:25:48 -07:00
Thomas Goyne df8ad34838 Eliminate pointless runtime datastructures for CalltipProvider
And add some tests and make it actually work correctly.
2014-07-04 20:37:36 -07:00
Thomas Goyne 93522e30a8 Use a static table of tokens for agi::Path
The set of possible tokens is fixed, so using std::map is a bunch of
pointless overhead (that turns out to not even really simplify the
code).
2014-07-04 20:37:36 -07:00