Commit Graph

41 Commits

Author SHA1 Message Date
Thomas Goyne e2f464c94f Add commands for the video display context menu items
Originally committed to SVN as r5562.
2011-08-27 06:30:29 +00:00
Thomas Goyne ca6d5b1f3e Rearrange VideoDisplay's privates to make them a bit less randomly ordered and switch from auto_ptr to scoped_ptr
Originally committed to SVN as r5561.
2011-08-27 06:30:23 +00:00
Thomas Goyne 0cb42343e0 Fix the video zoom dropdown
Originally committed to SVN as r5446.
2011-07-15 04:03:54 +00:00
Thomas Goyne 8d968e4dd5 Move the code for updating the time/frame display boxes from VideoDisplay to VideoBox
Originally committed to SVN as r5266.
2011-01-23 07:48:07 +00:00
Thomas Goyne 091c8170f2 Make several of VideoDisplay's members private
Originally committed to SVN as r5265.
2011-01-23 07:47:59 +00:00
Thomas Goyne df1dce3593 Kill SubtitlesGrid::ass and SubtitlesGrid::EditBox and convert everything that used them over to agi::Context
Originally committed to SVN as r5215.
2011-01-16 07:17:36 +00:00
Thomas Goyne d84b768171 Remove the 'audio' and 'grid' public members from VideoContext and migrate everything that used them over to Context
Originally committed to SVN as r5211.
2011-01-16 07:17:08 +00:00
Amar Takhar 167f09a610 Merge the dynamic menu, hotkey and toolbar branch to trunk. This doesn't include Windows support as vs2008 was being a major pain. This involves revisions r4921:4950, r4961:5002, r5005:5006, r5008:5056, r5062:5065, r5072, r5081:5082, r5087, r5096:5110, r5124:5125. Updates #1258.
Originally committed to SVN as r5126.
2011-01-05 13:00:46 +00:00
Amar Takhar 64f60e0215 Add missing header, thanks.. closes #1255
Originally committed to SVN as r5089.
2011-01-02 01:44:54 +00:00
Thomas Goyne a566955047 Rename signals.h to signal.h
Originally committed to SVN as r5075.
2010-12-31 21:02:42 +00:00
Thomas Goyne 6d2b941e76 Rework how committing changes works
Rather than everything having to separately commit changes to the ass
and then tell the subs grid to notify various parts of Aegisub about the
changes, committing the AssFile now triggers an event which objects
listen for.

AssFile::Commit now also has an argument to indicate what sorts of
changes were made to the file. For now these types are very broad.

Originally committed to SVN as r4901.
2010-12-07 19:09:28 +00:00
Thomas Goyne d9006b0eb4 Make VideoContext use events for some of its communication with other objects
Originally committed to SVN as r4900.
2010-12-07 19:09:21 +00:00
Thomas Goyne 6affce0581 Make OPT_GET return a const OptionValue* and add OPT_SUB/OPT_UNSUB for subscribing to option changes
Originally committed to SVN as r4834.
2010-11-08 05:08:24 +00:00
Thomas Goyne a278901e13 Update the time relative to frame box when the subtitle file is changed to reflect timing changes immediately
Originally committed to SVN as r4816.
2010-10-16 20:11:53 +00:00
Thomas Goyne 768f74ae3c Make VideoDisplay set its initial zoom itself rather than FrameMain
Originally committed to SVN as r4739.
2010-08-13 05:51:17 +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
Thomas Goyne 63cda2d755 Make gl contexts specific to VideoDisplays and only create/use them when the display is shown. Fixes a pile of X11-related assertion failures.
Originally committed to SVN as r4686.
2010-07-18 05:45:52 +00:00
Thomas Goyne b0afd8659c Frame data does need to be uploaded to the video card on every change as the subtitles and video frame are not seperate.
Originally committed to SVN as r4633.
2010-06-28 07:39:42 +00:00
Thomas Goyne 5588cda268 Significantly revamp how visual tools interact with the rest of the program
Rather than just have a single Refresh method that gets called whenever
something happens that could possibly be of interest to the visual
tools, add seperate methods for signaling frame number changes and
changes to the file, and use the new SelectionController stuff for other
things that used to merit a Refresh. This eliminates a large amount of
redundant reparsing of lines which happened on paint, as well as a large
number of redundant repaints.

Frame data is now only uploaded to the video card when the frame number changes
rather than when anything at all changes, slightly improving performance when
using mesa's software opengl implementation.

Vector clip and drag tools now do a slightly better job of not
discarding the user's selection for no apparent reason, and strange
selection behavior from clicking on visual features should now be
entirely fixed.

Everything but the constructor and toolbar event handler in the visual
tool implementations are now private.

Originally committed to SVN as r4631.
2010-06-28 07:13:15 +00:00
Thomas Goyne 5338a60cdb Fix compilation errors when not using precompiled headers
Originally committed to SVN as r4511.
2010-06-14 19:26:27 +00:00
Thomas Goyne fae2af36fc Only draw the line to the cursor in the rotatez tool if the cursor is over the video display.
Originally committed to SVN as r4457.
2010-06-07 07:24:37 +00:00
Thomas Goyne 625ce943f5 Cache OptionValue objects used by the video display
Originally committed to SVN as r4425.
2010-06-04 03:07:33 +00:00
Thomas Goyne 6c13d8f250 Fix merge error in r4401.
Originally committed to SVN as r4403.
2010-06-02 22:54:38 +00:00
Thomas Goyne 7bf9e41526 Document gl_text, fix some minor memory leaks and fix a rendering error that happened only in debug builds.
Originally committed to SVN as r4401.
2010-06-02 07:22:53 +00:00
Thomas Goyne a282393b47 Template VisualTool on the type of draggable features to use
Originally committed to SVN as r4320.
2010-05-20 08:55:46 +00:00
Thomas Goyne 2c876e79c3 Make visual tools use only screen coordinates.
Previously the visual typesetting tools and the overlay mask used
several coordinate frames, converting between them in many places in
inconsistent ways.  This elimiates all uses of coordinate frames other
than screen and script, and makes the conversion done in one place, and
only when parsing or serializing ASS.

This fixes:

 - A few minor rounding errors

 - Horrible brokeness when only part of the video frame is being
   displayed, due to higher levels of zoom than fit onscreen or panning
   the video

 - Distortion of the visual typesetting tools when the combination of
   overridden aspect ratio, script resolution, and video resolution did
   not result in square pixels.

 - Resolution-dependence of the visual typesetting tools, which resulted
   in some tools becoming hard to use at zooms outside the range of
   100-200%.

 - Some draggable controls used the mouse's script coordinates,
   resulting in noticable jerky movement at high zoom levels or when
   using strange script resolutions.

Closes #966.

Originally committed to SVN as r4289.
2010-05-16 06:39:11 +00:00
Thomas Goyne 94cf2949f1 Make the calculation of black borders in the video display happen on resize rather than on draw.
Originally committed to SVN as r4287.
2010-05-16 06:38:59 +00:00
Thomas Goyne 247e756c9b Move doxygen stuff for VideoDisplay to the header and fill in some missing docs.
Originally committed to SVN as r4278.
2010-05-13 18:37:46 +00:00
Thomas Goyne 290353d467 Bump copyright years on video_display.*
Originally committed to SVN as r4277.
2010-05-13 18:37:41 +00:00
Thomas Goyne 61c141a714 Change zoom to an arbitrary percentage rather than an index into a fixed list of allowed zooms
Originally committed to SVN as r4256.
2010-05-01 01:07:05 +00:00
Thomas Goyne 7ffc3d4080 Move more of the purely OpenGL-related code into VideoOutGL from VideoDisplay and simplify the calculation of the texture grid positions slightly.
Originally committed to SVN as r4037.
2010-01-24 19:05:20 +00:00
Thomas Goyne dcfdb02e6c Significantly reduce the number of unnecessary calls to VideoContext::GetFrame.
Originally committed to SVN as r3739.
2009-10-27 14:27:39 +00:00
Thomas Goyne 3032c4f883 Fix a memory leak and a minor graphical glitch that sometimes happened to the video slider when switching visual typesetting modes.
Originally committed to SVN as r3709.
2009-10-13 17:28:39 +00:00
Thomas Goyne cbd76e7010 Rewrite the video rendering code to support displaying videos which are larger than the maximum texture size. This does not currently support YV12 (which Aegisub currently never uses), but should be otherwise functional.
Originally committed to SVN as r3615.
2009-10-05 04:22:28 +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
Thomas Goyne 1a4e7375fd Add some documentation to VideoDisplay and clean up the includes a bit.
Originally committed to SVN as r3501.
2009-09-10 01:41:34 +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 91d73ec8ea SVN Transition Step 3/7
1. cd aegisub/
  2. svn mv *cpp *h src/
  3. svn mv Makefile.am MatroskaParser.c auto4_perldata.inc bitmaps boost \
     changelog.txt config gl include libosxutil libresrc md5.c msvc mythes.cxx \
     mythes.hxx res.rc src/
  4. cd ..
  5. svn mv FFmpegSource2/ INSTALL Makefile.am README  acinclude.m4 \
     autogen.sh automation/ bin build configure.in desktop dummy.txt lib \
     libass/ m4macros/ packages/ po/ scripts/ universalchardet/ aegisub/
  6. mkdir -p docs/wiki_convert
  7. svn add docs/wiki_convert
  8. cd docs
  9. svn mv aegisub_convert_docs.pl convert.bat output wiki_convert/

* See r2749 for full description.

Originally committed to SVN as r2752.
2009-03-08 08:30:39 +00:00