Commit Graph

32 Commits

Author SHA1 Message Date
Thomas Goyne 6fad60e58d Use NSDMIs where applicable 2013-12-11 18:50:12 -08:00
Thomas Goyne d6a5d9c458 Use initializer lists in some places 2013-12-11 18:50:11 -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 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 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 ff03fef2db Use the C++ versions of C headers 2012-12-01 17:24:59 -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 bc74dfc33b Update the video matrix tagging scheme
Write the color range and color space used to convert video to RGB to
the YCbCr Matrix field, or None if no non-RGB video was opened. See
http://code.google.com/p/xy-vsfilter/issues/detail?id=91 for related
discussion.

Originally committed to SVN as r6762.
2012-05-11 14:38:44 +00:00
Thomas Goyne b32515da80 Strip trailing whitespace from all cpp and h files
Originally committed to SVN as r6600.
2012-03-25 04:05:06 +00:00
Thomas Goyne ea130d9af2 Automatically set the aspect ratio when opening anamorphic video with ffms
Originally committed to SVN as r6506.
2012-02-23 01:30:59 +00:00
Thomas Goyne 6c365f0e6a Remove VideoProvider::GetPosition, as it's unused and unneeded
Originally committed to SVN as r6433.
2012-02-02 19:18:30 +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 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 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 acba2c6b63 Rewrite VFR handling in Aegisub.
Kill vfr.h and vfr.cpp and use the libaegisub versions of them instead.

Rather than the globals VFR_Input and VFR_Output, everything related to
frame rate is now part of the video context. Most things which used to
use VFR_Output now call VideoContext::TimeAtFrame etc.; video providers,
rather than modifying VFR_Input directly, now have getters for their
frame rates which VideoContext calls. Read-only public access to
VFR_Input and VFR_Output are still provided (hopefully temporarily) for
a few things which were awkward to do through VideoContext.

The Avisynth provider now might correctly handle VFR MKVs which can be
opened with DirectShowSource but not DSS2.

Rework keyframe handling as well, so that it continues to match the vfr
handling in design and implementation.

Originally committed to SVN as r4662.
2010-07-08 04:29:04 +00:00
Karl Blomster abd2597d0f Change GetDesiredCacheSize() to WantsCaching() since video providers aren't setting number of frames to cache anymore.
Originally committed to SVN as r3831.
2009-11-29 19:07:53 +00:00
Amar Takhar 8504b4790d Remove '#pragma once' from 84 files that don't need it. Thanks to Plorkyeran for testing this on windows. The next step is to detangle the remaining files that currently require it.
Originally committed to SVN as r3533.
2009-09-11 18:51:48 +00:00
Amar Takhar 774fb0f674 Fix all the headers in *., this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
  * Sorting alphabetically.
  * Same operation as r3515.

Note: This is broken when precompiled headers are not in use, I'll fix that after this commit so the two changes don't get jumbled up.

Originally committed to SVN as r3525.
2009-09-11 02:36:34 +00:00
Amar Takhar 7a8c5229fd * Remove wxprec.h from all files other than agi_pre.h. Including this in various headers is useless as it includes wx.h which includes dozens of 'common' wx headers. With this we're unable to tell which files rely on which interfaces. This commit removes them and manually places in required headers as-needed.
* Update agi_pre.h to include some missing headers, also move required windowsheaders to the top of the list
 * Use <> versus "" for the wx header in avisynth_wrap.cpp
 * Remove xx/wx.h from agi_pre.h as it's included by wxprec.h.

Originally committed to SVN as r3513.
2009-09-10 10:26:50 +00:00
Karl Blomster 1a182098fc Document the Y4M video provider.
Originally committed to SVN as r3376.
2009-08-07 19:59:37 +00:00
Amar Takhar 583cf55afb Add Doxygen skel info for video_provider_yuv4mpeg.h which was having errors in the first round.
Originally committed to SVN as r3328.
2009-07-30 04:25:52 +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 a0370f9004 Remove Aegisub::String class as it's causing problems in wx2.9. The original plan was to have it so external modules wouldn't have to depend on wx. We'll think of a different solution when the time comes. closes #940
Originally committed to SVN as r3220.
2009-07-23 15:16:53 +00:00
Karl Blomster 7157d50e73 Re-fix the VFR fix in r3084 by restoring the old behavior (which was correct for the only existing providers at the time it was implemented, I think) under a special condition that only triggers for the AVS provider. This does not really actually fix any bugs; the new behavior wasn't any better (in fact it was probably incorrect in some cases) but at least this way doesn't have any of the regressions the new way might have introduced.
Originally committed to SVN as r3211.
2009-07-23 02:06:47 +00:00
Karl Blomster d1762c5270 The Great Colorspace Reworking of '09, part 2 of ???: change all video providers to always output RGB32, and remove the formatMask parameter of GetFrame(). This may break the dshow video provider but I have no way of testing it and AFAIK nobody else does either. If someone actually uses it, they can fix it themselves. Updates #926.
Originally committed to SVN as r3185.
2009-07-20 03:50:25 +00:00
Karl Blomster 9ff3762eaf Removed the extremely deprecated fps parameter of the video provider constructors, since it hasn't been used by anything for years and was of questionable utility when it actually was used in the Elder Days.
Originally committed to SVN as r3178.
2009-07-20 00:39:38 +00:00
Karl Blomster 9e150d282d Cosmetics in the y4m video provider
Originally committed to SVN as r3177.
2009-07-19 22:51:19 +00:00
Amar Takhar ee537d06f6 Add missing <wx/filename.h> and <wx/log.h> headers.
Originally committed to SVN as r3175.
2009-07-19 18:50:27 +00:00
Karl Blomster 2b2a7f4212 Implement a YUV4MPEG video provider. (YUV4MPEG is an uncompressed video format originally created for use by mjpegtools but is also commonly used by a lot of Unix video software; see http://wiki.multimedia.cx/index.php?title=YUV4MPEG2 or http://manpages.ubuntu.com/manpages/karmic/en/man5/yuv4mpeg.5.html (man 5 yuv4mpeg, if you have mjpegtools installed) for a description of the format.)
Currently lacks a few features (no RFF flag parsing is done, interlacing is not supported and the colorspace conversion to RGB32 could stand considerable improvement) but at least now Aegisub is capable of reading video without FFMS2 or Avisynth. Updates #920.

Originally committed to SVN as r3168.
2009-07-19 04:13:46 +00:00