Commit Graph

98 Commits

Author SHA1 Message Date
Thomas Goyne eb2a6e14fa Fix a crash caused by the video display recieving a paint event before the first video frame is ready
Originally committed to SVN as r5902.
2011-11-23 18:32:23 +00:00
Thomas Goyne 28c7e7dec3 Bind wxEVT_SIZE in the video display even when attached. There doesn't seem to be any reason not to and it fixes some bugs with resizing the main window.
Originally committed to SVN as r5873.
2011-11-18 01:20:47 +00:00
Thomas Goyne 4be9c302d3 Fix rendering of the clip visual tools with detached video
Originally committed to SVN as r5847.
2011-11-12 01:23:40 +00:00
Thomas Goyne 51149104d9 Make all of VideoBox's members private
Originally committed to SVN as r5846.
2011-11-12 01:23:29 +00:00
Thomas Goyne feb752c24c Store the video display and slider in the context directly rather than going through the video box. Fxes a crash when detaching video.
Originally committed to SVN as r5845.
2011-11-12 01:23:18 +00:00
Thomas Goyne be77dc8307 Mostly rewrite the visual tools and related classes
Convert all coordinates within the visual tools to Vector2D, which has
been significantly extended. Eliminates a lot of issues with accumulated
rounding errors and simplifies a lot of code.

Modernize the visual tools' interactions with the rest of Aegisub by
connecting to signals directly rather than routing everything through
the video display and converting the main visual tool mode toolbar to
the command system.

Extract all references to OpenGL from the visual tools and move them to
OpenGLWrapper as a first step towards making it possible to implement an
alternative video renderer. In the process, eliminate all uses of OpenGL
immediate mode.

Fix a bunch of minor issues and general instability.

Originally committed to SVN as r5823.
2011-11-06 17:18:20 +00:00
Thomas Goyne 1741ce93f6 Factor out the mouse wheel forwarding code in the audio display to a function used by the audio display, video display and subtitles grid, and make it actually work
Originally committed to SVN as r5781.
2011-10-25 19:40:45 +00:00
Thomas Goyne da6a208062 Bind wxEVT_LEFT_DCLICK in VideoDisplay so the cross and drag visual tools work
Originally committed to SVN as r5697.
2011-09-30 20:42:37 +00:00
Thomas Goyne cc147d1660 Eliminate uses of c_str made unnecessary by changed to wxString::Format in wx 2.9
Originally committed to SVN as r5612.
2011-09-28 19:43:48 +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 934a5b24eb Refine the commit types
Switch to a bitmask with much more finely-grained information about what
changed in the commit, fixing a few potential correctness problems and
significantly improving the performance of several scenarios where commits
are spammed very frequently.

Originally committed to SVN as r5590.
2011-09-15 05:16:32 +00:00
Thomas Goyne e5d660e281 Hide visual tools while video is playing. Closes #1336.
Originally committed to SVN as r5586.
2011-09-02 00:03:40 +00:00
Thomas Goyne d82e2bb496 Use wxEVT_CONTEXT_MENU for context menus rather than right button down so that the context menu key works correctly. Updates #1238.
Originally committed to SVN as r5578.
2011-08-31 04:17:37 +00:00
Thomas Goyne fc0db4fc36 Convert the VideoDisplay context menu over to the new menu system
Originally committed to SVN as r5563.
2011-08-27 06:30:35 +00:00
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 561216d4c8 Make hotkey::check take a project context and make FrameMain::context private
Originally committed to SVN as r5532.
2011-07-29 23:16:55 +00:00
Thomas Goyne 88f0659307 Rewrite the toolbar generation code
The old toolbar code didn't actually support any nontrivial
customization of toolbars, as it had a hardcoded list of commands which
would be enabled or disabled, and the checks for enabling/disabling
toolbar buttons was done only in the specific situations which those
commands used.

Make icon size a user customizable option and add support for
dynamically changing it at runtime.

Originally committed to SVN as r5468.
2011-07-15 04:06:23 +00:00
Thomas Goyne 256e098aa7 Remove header include order requirements
Originally committed to SVN as r5449.
2011-07-15 04:04:13 +00:00
Thomas Goyne 401f026180 Fix crash when detaching video
Originally committed to SVN as r5447.
2011-07-15 04:04:01 +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 9c97544fc5 Temporary hack to make the visual typesetting tool mode hotkeys work
Originally committed to SVN as r5445.
2011-07-15 04:03:48 +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 14420102e4 Update the frame number display and visual typesetting tool when opening a new video
Originally committed to SVN as r5264.
2011-01-23 07:47:52 +00:00
Thomas Goyne ccddf8eab1 Make hotkey::check return whether any hotkeys matched, and skip events which did not match any hotkeys
Originally committed to SVN as r5241.
2011-01-19 03:12:46 +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
Thomas Goyne 314a07c9ab Move post-video-load logic from FrameMain::LoadVideo to FrameMain::OnVideoOpen, and open videos via VideoContext directly
Originally committed to SVN as r5205.
2011-01-16 07:16:27 +00:00
Amar Takhar 75b732bf60 Use lowercase filenames for OS X includes. HFS is case-insensitive and since I'm cross-compiling the OS X version from Linux it fails when you try to include files using uppercase names when they're actually lowercase.
Originally committed to SVN as r5173.
2011-01-11 17:52:17 +00:00
Thomas Goyne e450cb3e7e Fix include paths
Originally committed to SVN as r5132.
2011-01-05 18:40:37 +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
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 ea93f6afba Remove pointless performance hurting call to glFinish
Originally committed to SVN as r5071.
2010-12-30 22:19:42 +00:00
Thomas Goyne a64dc820a4 Remove VideoDisplay's border as on Windows it's rendered on top of the client area, hiding part of the video and throwing off hit detection for the visual tools
Originally committed to SVN as r5061.
2010-12-30 19:13:53 +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 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 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 84f646b88b Fix bug where changing the script resolution would not update the current visual tool
Originally committed to SVN as r4803.
2010-10-11 20:06:15 +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 b9f9b0a80a Fix potential divide-by-zero with wxGTK when opening video.
Originally committed to SVN as r4741.
2010-08-13 05:51:31 +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 58ca596359 Define NOMINMAX on Windows and remove workarounds for problems caused by those macros.
Originally committed to SVN as r4732.
2010-08-12 06:39:49 +00:00
Thomas Goyne 87fac1c571 Reduce flickering when changing zoom level.
Originally committed to SVN as r4728.
2010-08-03 20:21:25 +00:00
Thomas Goyne d5cbb534f8 Make VideoDisplay's size calculations slightly less convoluted.
Originally committed to SVN as r4727.
2010-08-03 20:21:19 +00:00
Thomas Goyne 2a51ad837e Fix non-precompiled header compilation
Originally committed to SVN as r4723.
2010-08-02 22:14:11 +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 926b6152f1 Fix detached video crashes.
Originally committed to SVN as r4701.
2010-07-23 04:15:36 +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