Commit graph

57 commits

Author SHA1 Message Date
Thomas Goyne
261ceaf969 Pass nullptr for the codepage for ass_read_memory
Passing a codepage makes libass convert to UTF-8 even if it's already
UTF-8.
2014-03-02 07:16:23 -08:00
Thomas Goyne
6fad60e58d Use NSDMIs where applicable 2013-12-11 18:50:12 -08:00
Thomas Goyne
535a17bcf2 Remove pointess OSX_ prefix from functions 2013-10-21 18:11:37 -07:00
Thomas Goyne
af74371f6d Retry commits of file writes for up to a second to work around AV scanning
Poorly-written antivirus software briefly lock newly written files to
scan them for viruses, which makes the rename from the temp file to
actual file fail. Work around this by retrying the rename up to ten
times.

Closes #1620.
2013-07-02 20:09:01 -07:00
Thomas Goyne
a1d44cafc1 Redesign VideoFrame
Eliminate the manual memory management and shuffle around where the
copies are made to eliminate the need for non-owning video frames.
2013-07-01 18:35:09 -07:00
Thomas Goyne
de7b09f7f7 Change some enums into enum classes 2013-06-12 20:01:21 -07:00
Thomas Goyne
9735397a93 Make libass a hard dependency
There's really no point in letting people build Aegisub without any
subtitle renderers.
2013-06-11 19:46:12 -07:00
Thomas Goyne
4662f34774 Use std::this_thread on Windows to avoid having to build boost.chrono 2013-05-02 09:25:18 -07:00
Thomas Goyne
380e5fd99f Use boost::thread in LibassSubtitlesProvider
libstdc++ 4.7's std::thread is missing sleep_for.
2013-04-29 20:18:29 -07:00
Thomas Goyne
a0d3dbc550 Extract Loading/Saving/Undo stuff from AssFile
Add SubsController, which deals with things like what subtitle file is
currently open, rather than the contents of the current subtitle file.
Move the rest of the relevant logic from FrameMain there in addition to
all of the stuff from AssFile.
2013-02-06 13:22:32 -08:00
Thomas Goyne
2113ed9580 Use boost.gil for overlaying images from libass 2013-02-06 13:22:16 -08:00
Thomas Goyne
1e0f08c0ed Mostly purge wxWidgets from non-UI stuff
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.

Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.

Move the path token management logic to libaegisub (and rewrite it in
the process).

Add a basic thread pool based on asio and std::thread to libaegisub.

This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne
009518271a Document a few things and kill all remaining placeholders 2012-12-02 13:08:42 -08:00
Thomas Goyne
96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne
1a6caa27b6 Switch to using lambdas in a few places 2012-11-26 07:11:30 -08:00
Thomas Goyne
06aaaff16b NULL -> nullptr 2012-11-13 08:51:01 -08:00
Thomas Goyne
0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne
e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne
0f071d978a Rewrite the OS X bundle utils in Obj-C++ and return std::strings rather than malloced char *
Originally committed to SVN as r6896.
2012-06-12 03:13:49 +00:00
Thomas Goyne
8fdd5d987e Remove the encoding parameter from AssFile::SaveMemory, as it only supports utf-8, and simplify the implementation
Originally committed to SVN as r6220.
2012-01-08 01:33:19 +00:00
Thomas Goyne
92949bc965 Remove AegisubApp::Get, as wxGetApp() does the same thing
Originally committed to SVN as r6051.
2011-12-22 21:17:30 +00:00
Thomas Goyne
a8caf35ebe Fix flipped subtitles with libass + avisynth
Originally committed to SVN as r5707.
2011-10-01 18:35:25 +00:00
Thomas Goyne
53b6765dd8 Redesign DialogProgress
Add agi::ProgressSink and agi::BackgroundRunner interfaces to libaegisub
which represent a generic progress sink and a thing which calls funtions
that need progress sinks. Make DialogProgress implement
agi::BackgroundRunner, invoking the passed function on a worker thread
and giving it a progress sink to update the dialog with.

Rewrite Automation4::ProgressSink, LuaThreadedCall and all related
classes to be based on agi::ProgressSink. Automation now simply uses
DialogProgress (although that's merely an implementation detail) and
adds a single method to route dialog opening from the worker thread to
the GUI thread.

Originally committed to SVN as r5634.
2011-09-28 19:47:40 +00:00
Thomas Goyne
d990bbbb99 Eliminate all unnecessary uses of L and _T
Originally committed to SVN as r5611.
2011-09-28 19:43:11 +00:00
Thomas Goyne
824294078f Move YUV -> RGB conversion to VideoProviderYUV4MPEG and remove support for formats other than RGB32 from AegiVideoFrame
Originally committed to SVN as r5079.
2010-12-31 21:03:11 +00:00
Thomas Goyne
833e69b09f Replace MIN/MAX/MID with std::min/std::max/mid
Originally committed to SVN as r5078.
2010-12-31 21:03:03 +00:00
Thomas Goyne
3345797ff6 Use signals in AudioController and AudioTimingController
Originally committed to SVN as r4907.
2010-12-08 08:09:16 +00:00
Amar Takhar
c15777f844 Merge audio_display_rewrite branch to trunk. This is not a complete work, don't expect to time anything for a while.
Originally committed to SVN as r4903.
2010-12-08 03:36:10 +00:00
Thomas Goyne
1b8b53c14e Pass a double pointer rather than a reference to a pointer to wait_for_cache_thread. Fixes endless 'caching' of fonts on linux.
Originally committed to SVN as r4843.
2010-11-11 05:29:13 +00:00
Thomas Goyne
c6f20504cb Fix memory leak in libass provider
Originally committed to SVN as r4819.
2010-10-20 00:28:28 +00:00
Thomas Goyne
49a57729ef Always load initialize fontconfig on a worker thread so that installing a font then opening a new video does not block the GUI thread
Originally committed to SVN as r4818.
2010-10-17 02:36:28 +00:00
Thomas Goyne
f4577a8b3a Don't format libass messages which won't be logged
Originally committed to SVN as r4807.
2010-10-11 20:48:29 +00:00
Thomas Goyne
1fbe7b4f1e Increase the size of the buffer used for formatting messages from libass as they can occasionally be longer than 256 characters
Originally committed to SVN as r4796.
2010-10-08 06:06:50 +00:00
Thomas Goyne
7e72a9e0cf Add background fontconfig cache updating
When the libass provider is enabled, initialize fontconfig on program
startup rather than waiting for the user to open a video. If the user
tries to open a video while the cache is still being updated, display a
"progress" dialog,

Updates #1115.

Originally committed to SVN as r4768.
2010-09-01 06:50:35 +00:00
Amar Takhar
d4ba1f48ca Remove libosxutil and fold it into libaegisub.
Originally committed to SVN as r4743.
2010-08-14 17:42:37 +00:00
Thomas Goyne
a400800b54 Remove the override for fonts.conf location on Windows as the default is close enough to sensible.
Originally committed to SVN as r4731.
2010-08-12 01:12:00 +00:00
Thomas Goyne
c8851828cd Get the libass provider working on Windows. Requires a valid fontconfig config file (currently not included).
Originally committed to SVN as r4730.
2010-08-10 05:50:14 +00:00
Thomas Goyne
ff85906cdc Fix compilation errors
Originally committed to SVN as r4718.
2010-08-02 07:21:02 +00:00
Thomas Goyne
71fb04cd29 Rework most of the various factories to not need an explicit helper class for each class constructable via a factory.
Originally committed to SVN as r4716.
2010-08-02 06:31:38 +00:00
Thomas Goyne
4ef9d41601 Don't require that subtitles passed to SubtitlesProvider::LoadSubtitles be a copy that can be deleted
Originally committed to SVN as r4477.
2010-06-11 02:25:28 +00:00
Amar Takhar
d295ce7b0a Convert a bunch of wxLog* to the new logging method.
Originally committed to SVN as r4399.
2010-06-01 08:21:30 +00:00
Grigori Goronzy
e9c806d0de Handle libass messages with wxLog* family of functions
Originally committed to SVN as r4357.
2010-05-24 03:41:06 +00:00
Amar Takhar
d348b4e33e Fix all the headers in *.cpp, this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
 * Sorting alphabetically.

Originally committed to SVN as r3515.
2009-09-10 13:06:40 +00:00
Amar Takhar
eb807fea3d Add (char *) before string constant to silence warning. to ass_read_memory.
Originally committed to SVN as r3453.
2009-09-02 08:06:51 +00:00
Grigori Goronzy
a9b80dea4c Update libass and adjust to API changes.
Update the internal libass copy to git commit cf7c6e4c and fix the
libass provider; libass types were renamed.

Originally committed to SVN as r3446.
2009-09-02 01:23:51 +00:00
Amar Takhar
6ee2f98349 Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs.  This isn't the actual document in itself but empty documentation using any old documentation if it was there.

This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.

Some notes:
 * Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
 * Some multiline comments may have been munged into single line comments
 * Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
 * Enum comments can go after the enumeration itself '[value] /// comment'
 * include/aegisub/*.h haven't been converted yet, this will be done in a later commit
 * Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.

See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.

Originally committed to SVN as r3312.
2009-07-29 22:59:22 +00:00
Amar Takhar
12aa34088a Switch all headers to using Doxygen and cleanup contact info
* Swap old email + website address with 'Aegisub Project http://www.aegisub.org/'
 * Set categories for all files (jfs)
 * Add descriptions for each file (jfs)
 * Add $Id$ keyword

Originally committed to SVN as r3310.
2009-07-29 05:43:02 +00:00
Amar Takhar
c329c4e047 Update to 9ad13b from the libass git repo. (http://greg.geekmind.org/viewgit/) This change also includes the ability to split off fontconfig cache updating into it's own step so dialogues can be used to warn the user about the font cache being updated (it can take several mins on slow machines with lots of fonts). Updates #841
Originally committed to SVN as r3176.
2009-07-19 19:33:29 +00:00
Amar Takhar
75bfada57e Actually fix libosxutil includes, as many times as I'd like to belive using 'diff' to transfer from a working copy to a non-working copy is the safest I always endup convincing myself that it's impossible to screw-up a _two_ line patch.
Originally committed to SVN as r3121.
2009-07-13 22:38:43 +00:00
Amar Takhar
4599eec308 Wrap libosxutils headers with "extern C"
Originally committed to SVN as r3118.
2009-07-13 22:32:11 +00:00