Commit graph

3011 commits

Author SHA1 Message Date
Niels Martin Hansen c7c95d20c0 Fix #825 for good, I hope. Get some sense worked into the handling of AssEntry::StartMS and AssDialogue::Start using some private members and virtual getter/setter functions.
Originally committed to SVN as r2931.
2009-05-14 23:45:20 +00:00
Niels Martin Hansen 153cfbcd5f More const correctness in AssTime, broke build because I forgot to add const keyword to implementation too.
Originally committed to SVN as r2930.
2009-05-14 23:27:38 +00:00
Niels Martin Hansen 20477198e6 Const correctness in AssTime.
Originally committed to SVN as r2929.
2009-05-14 23:09:04 +00:00
Niels Martin Hansen 33696616f4 Change audio autoscroll behaviour:
* In karaoke mode, instead of scrolling start to end of active line into view, scroll start of selection to end of line into view. This gives sensible results when horizontal zoom is great enough that the entire line isn't visible at once and the syllable is too far from the start of the line. This fixes #677.
* If the line is too long to fit in the display, always left-align it instead of sometimes left-aligning and sometimes centering. (I think the old behaviour depended on the actual scroll position.)

Originally committed to SVN as r2928.
2009-05-14 22:12:05 +00:00
Niels Martin Hansen b19d604de4 Undo last change, code *was* used after all. Strangely my compiler didn't complain on first try...
Removing the comment about "is this even used?" as well...

Originally committed to SVN as r2927.
2009-05-14 21:44:43 +00:00
Niels Martin Hansen 00df76c4fb Remove some unused code from karaoke UI.
Originally committed to SVN as r2926.
2009-05-14 21:26:39 +00:00
Niels Martin Hansen ef03e3050d Split audio sources in MSVC project into Backend and UI groups.
Originally committed to SVN as r2925.
2009-05-14 21:25:08 +00:00
harukalover 82fca6e35f * Fixed a mismatched new[]/delete
* Fixed a memory leak that would occur when loading subtitles from a matroska file

Originally committed to SVN as r2924.
2009-05-14 18:28:57 +00:00
harukalover 370b986181 * Fixed the styling assistant marking the script as modified when it was unfocused and the Enable preview checkbox was unchecked even if no changes actually were made in the styling assistant.
* Removed some no longer needed code in the styling assistant.

Originally committed to SVN as r2923.
2009-05-14 17:29:07 +00:00
Niels Martin Hansen 5a4ffa1005 Fix #845 by counting how many output lines were produced by applying a template to a line, instead of assuming that a template always gets applied, even if it's a code template.
Originally committed to SVN as r2922.
2009-05-14 15:34:37 +00:00
harukalover d8e6d94754 Made the styling assistant modeless so the user can access other controls within aegisub without having to close the styling assistant, fixes #397
Originally committed to SVN as r2921.
2009-05-14 07:02:01 +00:00
Karl Blomster 6a42e17409 - Reworked the SMPTE timecode handling with Plorkyeran's help. It does now handle dropframe timecodes as well; the ms->SMPTE handling has been tested and seems reasonably correct, while the reverse conversion remains untested and unused. The Adobe Encore export filter will now use dropframe timecodes properly (previously it would play pretend with wallclock hours/minutes/seconds and incorrect frame numbers).
- Changed the SubtitleFormat::AskForFPS dialog box; removed the "PAL/NTSC only" choice and added a "show SMPTE dropframe" parameter instead. Also added 50fps as a choice.

- While I was at it, reworked the TranStation export filter so it actually looks ahead to see if the next line will overlap with the current, and if so, move the end time of the current line backwards one frame, which fixes #767

Originally committed to SVN as r2920.
2009-05-13 20:24:21 +00:00
Karl Blomster 887b9b1988 Update ffms2.lib as per Myrsloik's last commit.
Originally committed to SVN as r2919.
2009-05-12 21:31:44 +00:00
Fredrik Mellbin 16f3f59cb2 FFMS2: api change so the logging level can be set arbitrarily, it also defaults to quiet now
Originally committed to SVN as r2918.
2009-05-12 20:50:40 +00:00
Niels Martin Hansen ae988ed37b Apparently not all platforms agree on providing MININT and MAXINT constants. Work around it by calculating those values ourselves.
Originally committed to SVN as r2917.
2009-05-12 20:48:05 +00:00
Niels Martin Hansen f425b58017 Integer-edits in Auto 4 Lua config dialogues now always get spin buttons. If no min/max is specified, minint/maxint are assumed.
Originally committed to SVN as r2916.
2009-05-12 20:26:19 +00:00
Niels Martin Hansen e87a031828 Normalise case for style section names.
fixes #690 (hopefully)

Originally committed to SVN as r2915.
2009-05-12 18:10:13 +00:00
Niels Martin Hansen 86e70e9094 Bump kara-templater version number.
Originally committed to SVN as r2914.
2009-05-12 16:39:53 +00:00
Niels Martin Hansen 7e90cdcf09 Add support for variable loops in kara-templater, and add a few more utility functions.
- Variable loops are controlled using the tenv.maxloop(newmax) function to set the loop counter max. This is a wrapper around setting tenv.maxj.
- Add tenv.relayer(newlayer) function for changing the Layer of an output line.
- Add tenv.restyle(newstyle) function for changing the Style of an output line, despite this usually breaking positioning/sizing information.
- tenv.maxloops is an alias for tenv.maxloop.
- tenv.loopctl(newj, newmaxj) controls both loop variables if anyone wants to do that.
This closes #753 but documentation still needs to be written.

Originally committed to SVN as r2913.
2009-05-12 16:36:51 +00:00
Niels Martin Hansen 95d71d1dcf Fix a bunch of bugs with config dialogues in Auto 4 Lua:
- When default buttons were present, pushing OK caused no button code to be returned at all.
- A load of controls not handling default/initial values properly, closes #775 and #776

Originally committed to SVN as r2912.
2009-05-12 15:32:11 +00:00
Niels Martin Hansen cad5b98e1b Extend Auto 4 Lua config dialogues test case to cover most interesting cases of controls.
Updates #775 and #776 since they need those cases.

Originally committed to SVN as r2911.
2009-05-12 15:24:07 +00:00
Niels Martin Hansen 54037c56e7 Make AssColor::Parse() also understand HTML colours with a bit of help from wx.
Originally committed to SVN as r2910.
2009-05-12 15:14:35 +00:00
Karl Blomster d56982ed4a Move the SMPTE timecode stuff out of the AssTime class and put it in a class of its own, FractionalTime. The AssTime to SMPTE part is tested and verified to work (in fact it looks like I unintentionally fixed an overlap bug in the TranStation export filter), while the SMPTE to AssTime part is completely untested (but it's currently not used anywhere so it's not like it matters).
Originally committed to SVN as r2909.
2009-05-10 03:50:58 +00:00
Karl Blomster 179d23fd5c Fix a memleak in the FFMS2 video provider (the frame was never unallocated on video close). Patch by Harukalover, fixes #838
Originally committed to SVN as r2908.
2009-05-10 00:12:04 +00:00
Fredrik Mellbin 2cab187fd8 FFMS2: beta 8
Originally committed to SVN as r2907.
2009-05-09 21:59:24 +00:00
Karl Blomster 3bdbcd7b5e Fix a minor bug that caused the add leadin/leadout buttons to not update the time edit boxes. Patch by Harukalover, fixes #836.
Originally committed to SVN as r2906.
2009-05-07 17:52:29 +00:00
Karl Blomster 87a39833b8 The buffer length/wanted latency in the dsound2 audio player are now tweakable in config.dat; the options are called "audio dsound buffer latency" and "audio dsound buffer length" respectively. Defaults to 100/5 respectively (should work for the people who used to get buffer errors); for better responsiveness try 80/4.
Originally committed to SVN as r2905.
2009-05-07 14:47:36 +00:00
Karl Blomster bfe40a6667 Fix a bug (in a somewhat questionable manner) that would cause the text file writer to occasionally think the system locale was Unicode when it wasn't (by using an uninitialized variable in a condition). Should fix the issue with the SRT export filter failing to write "1" on the first line when using "local" as the text encoding.
Originally committed to SVN as r2904.
2009-05-06 19:14:10 +00:00
Karl Blomster c6fe68c76d Add Aegisub::Script::set_undo_point() to auto4-perl. Currently not all that useful since auto4-perl currently only supports macros and nothing else, and using a macro sets an undo point after execution automatically anyway.
Originally committed to SVN as r2903.
2009-05-06 12:25:08 +00:00
Karl Blomster 02f7d0006c change how ffmsindex is linked to ffms2 (use a #pragma instead of an extra dependency in the project file)
Originally committed to SVN as r2902.
2009-05-05 21:43:49 +00:00
Niels Martin Hansen 36dbd86dd6 Oops, had swapped size and value parameters in a memset call.
Originally committed to SVN as r2901.
2009-05-04 19:15:57 +00:00
Amar Takhar c9affe9aeb Sigh, make gawk happy, I despise gawk someone please get rid of it forever.
Originally committed to SVN as r2900.
2009-05-04 08:06:26 +00:00
Amar Takhar 8c8a0abe38 Add a note why the 'sed' hack is nessicary.
Originally committed to SVN as r2899.
2009-05-04 06:52:45 +00:00
Amar Takhar f893e8a29f Add a crappy sed hack to silence gcc warnings, sigh, I wish ImageMagick would update convert already.
Originally committed to SVN as r2898.
2009-05-04 06:51:02 +00:00
Amar Takhar 5b356f2755 s/static/const/ to silence gcc warnings.
Originally committed to SVN as r2897.
2009-05-04 06:50:37 +00:00
Amar Takhar 2090994256 Silence a bunch of gcc 'newline' warnings.
Originally committed to SVN as r2896.
2009-05-04 06:50:12 +00:00
Amar Takhar b00e485149 Plug a bunch of memory leaks from uau in the mplayer2 repo: http://repo.or.cz/w/mplayer.git?a=commit;h=312d9e4b104741b834aa5d71b02228d0cd988a4e
libass: Fix cache lookup problem causing memory bloat

The cache code did hash lookups by storing key values in struct fields
and then hashing and comparing the struct as a single memory block. In
at least one case such a struct contained uninitialized padding bytes
which prevented the complete memory area of the struct from matching
even though the fields did. As a result the code failed to find
existing objects in the cache and stored new versions of them, causing
gigabytes of memory use in some circumstances. Initializing the struct
memory to zero before writing the fields avoided such memory use in
tests but is not guaranteed to work if I interpret the C standard
correctly (the compiler is allowed to write garbage over padding bytes
when changing struct member values).

Change the code to use struct-specific hashing and comparison
functions that work field by field to guarantee correct behavior.
Create these by replacing the struct definition with a template that
lists the fields and can be used the generate each of struct
definition, hash function and compare function with some preprocessor
magic (otherwise every field would need to be listed separately in all
three).

Originally committed to SVN as r2895.
2009-05-04 06:48:21 +00:00
Fredrik Mellbin 0a221706d5 FFMS2:
Fix an old bug that would drop the first or second video frame
Greatly improved audio decoding by adding a small internal cache

Originally committed to SVN as r2894.
2009-05-03 19:25:54 +00:00
Karl Blomster 869e5c7594 Implemented an automated cache cleaner that keeps the FFMS2 index cache at a manageable size. Cleaning is started when video is opened with the FFMS2 video provider and runs in its own thread. Removal is based on last access time, and the FFMS2 providers now explicitly touch the index files on reading to make sure access time is updated.
By default the cache is kept below 42MB and 20 files; to change the defaults change "FFmpegSource max cache size" and "FFmpegSource max cache files" in config.dat. Either or both may be set to 0, but the cleaner will not delete the last index file in the directory, regardless of cache settings and of the file's size.

Originally committed to SVN as r2893.
2009-05-03 18:05:30 +00:00
Karl Blomster e3ce74248d Fix compilation breakage introduced in r2891.
Originally committed to SVN as r2892.
2009-05-02 20:06:06 +00:00
Karl Blomster 45627548d6 Don't let the MKV parser crash on certain MKV's for which it cannot determine the filesize by itself. (Adaption of Myrsloik's similar fix for FFMS2.)
Originally committed to SVN as r2891.
2009-05-02 19:40:55 +00:00
Fredrik Mellbin 487dc50409 FFMS2: Add a missing function the updated matroska parser expects
Originally committed to SVN as r2890.
2009-05-01 16:58:15 +00:00
Amar Takhar 1cbd29531c Add an sh script to generate snap tarballs upon successful builds of UNIX platforms (excluding Darwin).
Originally committed to SVN as r2889.
2009-05-01 03:58:23 +00:00
Niels Martin Hansen b840c9f97e Ensure some fields in VideoContext get initialised.
Originally committed to SVN as r2888.
2009-04-30 22:13:10 +00:00
Karl Blomster 4445d812ce Re-update the license on Haali's matroska parser.
Originally committed to SVN as r2887.
2009-04-29 21:19:45 +00:00
Amar Takhar a9e1f80c8c Update libass from MPlayer r29129: Don't automatically wrap lines when WrapStyle==2.
Originally committed to SVN as r2886.
2009-04-29 21:06:54 +00:00
Fredrik Mellbin fad9a58240 FFMS2: Update Haali's matroska parser
Originally committed to SVN as r2885.
2009-04-29 21:06:07 +00:00
Karl Blomster 2f7b62d206 Update Haali's MatroskaParser.c/.h in the main source tree (there's a copy in the FFMS2 folder as well, which will be updated later). Should fix a crash with x264-generated MKV's.
Originally committed to SVN as r2884.
2009-04-29 21:00:08 +00:00
Niels Martin Hansen f0b442f4b4 Let AudioProvider::GetAudioWithVolume() catch exceptions in AudioProvider::GetAudio() and return blank audio when that happens. Errors are not logged or otherwise handled. This fixes #800 for most cases, even if poorly.
Originally committed to SVN as r2883.
2009-04-29 19:30:02 +00:00
Niels Martin Hansen a2822356bf Some more delayload vsprops files.
Originally committed to SVN as r2882.
2009-04-29 19:08:40 +00:00