Commit Graph

40 Commits

Author SHA1 Message Date
Thomas Goyne 6fad60e58d Use NSDMIs where applicable 2013-12-11 18:50:12 -08:00
Thomas Goyne a7f4fb5b87 Run clang-modernize on things 2013-11-23 09:57:22 -08:00
Thomas Goyne 73e1dc1b60 Honor the color matrix tag from the subtitles file when appropriate
If the script's matrix matches the video's matrix, use that even if
Force BT.601 is on, and if it's TV.601, use that even if Force BT.601 is
off.

This should mostly eliminate the common problems resulting from  mixed
values of the Force BT.601 option.

Closes #1649.
2013-10-17 08:04:03 -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 f21a72992b Use unique_ptr for most non-wx owning pointers 2013-06-08 19:21:49 -07:00
Thomas Goyne d99647ba28 Fix crash when closing video while a frame request is pending 2013-02-08 21:05:57 -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 4116e88fe5 Get rid of auto-running exporters, since they aren't really used for anything anymore 2013-01-03 17:36:50 -08:00
Thomas Goyne 2bf92fec6e Fix crash when amending commits with video open
The video source's copy of the subtitle file was being discarded once it
was fully loaded (as it was previously never needed again), so amending
it only worked if the user had made a non-amend commit after the last
seek.
2012-12-29 08:40:10 -08:00
Thomas Goyne d0f4d9df99 Replace all uses of lagi_wxString with to_wx 2012-12-22 15:18:38 -08:00
Thomas Goyne 229e5d98c5 Avoid making a full copy of the file for ThreadedFrameSource when possible
When the set of changed lines is populated, only copy those lines rather
than the entire file. On large files, this makes amend commits roughly
twice as fast when video is open.
2012-12-17 09:32:42 -08:00
Thomas Goyne 91fa11e375 Relicense all of my stuff that's still 3-BSD to ISC 2012-12-02 13:14:24 -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 b8b9bfdfb6 Fix non-pch compilation 2012-11-18 21:10:36 -08:00
Thomas Goyne 89fef06d6b Replace all uses of auto_ptr with unique_ptr 2012-11-15 18:15:39 -08:00
Thomas Goyne 06aaaff16b NULL -> nullptr 2012-11-13 08:51:01 -08:00
Thomas Goyne 67df64e879 Use range-based for loops in a bunch of places 2012-11-12 18:35:25 -08:00
Thomas Goyne 0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne 83761d881a Convert AssFile::Line to an intrusive list
Gives O(1) pointer -> iterator conversions, better memory usage, better
performance, and overall slightly simplifies the code using it.
2012-11-10 18:05:56 -08:00
Thomas Goyne e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne 53433426bb Fix some stuff from Coverity Scan
Mostly just bugs in unreachable code and stylistic things, but there's a
few incorrect reachable things that were working by coincidence and
gratuitous dynamic_casts.
2012-10-15 18:16:09 -07:00
Thomas Goyne 2deafdd3a7 Fix race condition on shutdown that could result in the program not completely exiting on Windows
Originally committed to SVN as r6729.
2012-05-01 02:49:26 +00:00
Thomas Goyne b36c70ca7d Move a pile of things that shouldn't be in headers out of the headers
Originally committed to SVN as r6308.
2012-01-18 20:08:42 +00:00
Thomas Goyne cae10121ed Fix a bunch of -pedantic stuff
Originally committed to SVN as r6181.
2011-12-28 21:27:06 +00:00
Thomas Goyne 4133806fe7 Allow opening video with no working subtitle providers enabled
Originally committed to SVN as r6126.
2011-12-22 21:29:29 +00:00
Thomas Goyne 71345af81a Overload operator int() on AssTime and remove GetMS/SetMS
Originally committed to SVN as r6123.
2011-12-22 21:28:51 +00:00
Thomas Goyne df100fb5a5 Pass a project context to AssExportFilter::GetConfigDialogWindow so that export filters don't have to use things like AssFile::top and VideoContext::Get
Originally committed to SVN as r5629.
2011-09-28 19:46:53 +00:00
Thomas Goyne 5370f3fa04 Make ThreadedFrameSource never lock jobMutex and fileMutex at the same time. Moderately improves responsiveness of the audio display while video is loaded.
Originally committed to SVN as r5070.
2010-12-30 22:19:36 +00:00
Thomas Goyne 3d85cacae0 Apply the export transform when sending subtitles to the provider on the video worker thread rather than the GUI thread
Originally committed to SVN as r4849.
2010-11-18 06:15:41 +00:00
Thomas Goyne 4bf3b44cc0 Add missing swap in ThreadedFrameSource::ProcFrame that resulted in the full subtitle file never being loaded
Originally committed to SVN as r4793.
2010-10-08 06:06:32 +00:00
Thomas Goyne 35b9769092 Pass around shared_ptrs to newly allocated AegiVideoFrames rather than pointers into a buffer of AegiVideoFrames in ThreadedFrameSource
Originally committed to SVN as r4789.
2010-09-15 22:10:48 +00:00
Thomas Goyne dca2bd43fe Rearrange ThreadedFrameSource::Entry to allow the use of wxMutexLocker
Originally committed to SVN as r4788.
2010-09-15 22:10:42 +00:00
Thomas Goyne f37e1bf87a Fix thread warnings on shutdown on unix
Originally committed to SVN as r4766.
2010-08-27 01:01:35 +00:00
Thomas Goyne d83c59819f Fix deadlock on pthreads-using platforms
Originally committed to SVN as r4748.
2010-08-16 03:06:28 +00:00
Thomas Goyne ff85906cdc Fix compilation errors
Originally committed to SVN as r4718.
2010-08-02 07:21:02 +00:00
Thomas Goyne c10e9e3a5b Make video and audio providers throw typed exceptions.
Don't display error messages and try other providers when the user
cancels loading a file.

Remove files from the MRU lists if they can't be found.

Closes #717.

Originally committed to SVN as r4717.
2010-08-02 06:32:01 +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 da0fb8cde7 Fix gcc build errors introduced in r4702
Originally committed to SVN as r4704.
2010-07-23 06:21:22 +00:00
Thomas Goyne 397b234fba Move video decoding and subtitle rendering to a worker thread
Makes the click event handler for the grid no longer slow when video
autoscroll is enabled, making it harder to accidently select multiple
lines.

Makes seeking speed no longer limited by decoding/rendering speed;
seeking faster than video can be decoded simply results in dropped
frames.

Makes editing the file while a slow-rendering frame is visible far more
responsive.

Originally committed to SVN as r4702.
2010-07-23 05:58:39 +00:00