Commit Graph

120 Commits

Author SHA1 Message Date
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 89d7e0a321 Allow framerate transform to/from variable without external timecodes loaded
This is a potentially sensible operation (to convert from VFR to/from
the video's average FPS), so there's no reason to require that the input
and output timecodes be from different places.

Closes #1530.
2012-10-09 09:20:35 -07:00
Thomas Goyne 8fad077e88 Don't ignore loaded timecodes when converting frames to times for the subtitle renderer 2012-10-02 12:56:19 -07:00
Thomas Goyne 65d3c4cc2d Save keyframe and timecode file names even if video isn't loaded
Originally committed to SVN as r6947.
2012-07-24 02:40:34 +00: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 15eb4dc29d Fix bad option name that caused a fatal error on startup for clean installs
Originally committed to SVN as r6709.
2012-04-17 15:03:27 +00:00
Thomas Goyne 582e947c75 Fix errors when reattaching video with some video cards
With ATI cards, deleting a wxGLContext seems to invalidate ALL
wxGlContexts, rather than just things associated with the deleted one.
This resulted in video breaking after closing the detached video dialog,
as the embedded video display was trying to use an invalidated context.
To work around this, delete and recreate the context when reattaching
video.

Also recreate the visual typesetting tool as OpenGLText holds references
to textures created on construction.

Originally committed to SVN as r6646.
2012-04-03 17:38:38 +00:00
Thomas Goyne 9f9ada8f8d Fix race condition that could result in a crash when opening video
When opening the video resulted in the script resolution changing, the
subtitles file was committed at a time when IsLoaded() would return true
but VideoOpen hadn't been signalled yet, resulting in some VideoDisplay
code running before the display was initialized. If the video opened is
sufficiently fast to decode, this could result in a crash due to trying
to display a frame before the display is shown.

Originally committed to SVN as r6645.
2012-04-02 04:22:22 +00:00
Thomas Goyne c4a1a93b97 Center most of the message boxes over their parent windows
Originally committed to SVN as r6629.
2012-03-28 23:59:19 +00:00
Thomas Goyne 1d289bf8f8 Rework FrameMain::LoadList and OnSubtitlesOpen a bit
Fix some issues where a spurious load/unload dialog would be displayed
despite that nothing would be loaded even if the user selected yes, and
double-loading of audio when opening video and audio files with
automatic audio loading enabled.

Originally committed to SVN as r6618.
2012-03-27 04:23:45 +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 366baff2f8 Add option to force all video opened with FFMS2 to BT.601 for VSFilter compatibility
Originally committed to SVN as r6535.
2012-03-07 04:25:46 +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 aaf7285a6e Remove UI-related responsibilities from AudioController
Keeping track of audio markers and labels to be shown in the audio
display is not particularly related to AudioController's primary
responsiblity of controlling the playback of audio.

Originally committed to SVN as r6427.
2012-02-01 23:59:12 +00:00
Thomas Goyne 01b92aa4e3 Change AudioController's public API from samples to milliseconds
The sample rate of the currently open audio is not something that things
which do not interact with the raw audio data should have to care about,
or even know about.

Originally committed to SVN as r6426.
2012-02-01 23:58:58 +00:00
Thomas Goyne bce29f5a9a Fix bug where "Play current line" would not stop at the end of the line if video was already playing
Originally committed to SVN as r6353.
2012-01-25 00:40:21 +00:00
Thomas Goyne 3b5bc88285 Write the video's colorspace to the script info section
Originally committed to SVN as r6347.
2012-01-23 23:07:35 +00:00
Thomas Goyne 7dd6cfe37d Derive agi::acs exceptions from agi::FileSystemError and friends rather than having two sets of errors for the same thing
Originally committed to SVN as r6278.
2012-01-12 22:31:54 +00:00
Thomas Goyne 32abbde477 Pass a copy of the video filename to SetVideo in VideoContext::Reload so that it doesn't get cleared by Reset
Originally committed to SVN as r6240.
2012-01-08 01:35:31 +00:00
Thomas Goyne 02fa5bee3e Add option to automatically open audio when opening video. Closes #1134.
Originally committed to SVN as r6224.
2012-01-08 01:33:47 +00:00
Thomas Goyne cfc7e009f2 Don't disable or hide the visual tools while video is playing. Updates #1336.
Originally committed to SVN as r6168.
2011-12-27 01:38:00 +00:00
Thomas Goyne 29460b97b9 Rearrange VideoContext::Reset to fix error on shutdown
Originally committed to SVN as r6127.
2011-12-22 21:29:38 +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 e49486201d Eliminate the duplication between VideoContext::videoName and VideoContext::videoFile
Originally committed to SVN as r5969.
2011-12-06 00:17:54 +00:00
Thomas Goyne 2fa16a78c6 Move snapshot saving from VideoContext to the commands
Originally committed to SVN as r5968.
2011-12-06 00:17:45 +00:00
Thomas Goyne 8a7f4038c1 Make the video provider owned solely by ThreadedFrameSource rather than in a shared_ptr stored in several places
Originally committed to SVN as r5967.
2011-12-06 00:17:36 +00:00
Thomas Goyne 59fdab5fe7 Remove VideoContext::nextFrame as it's unused
Originally committed to SVN as r5966.
2011-12-06 00:17:25 +00:00
Thomas Goyne c26e61f209 Remove the audio resync code from VideoContext. It didn't actually work with the threaded video provider and should be unneccesary as video now always plays back at full speed (dropping frames if needed).
Originally committed to SVN as r5965.
2011-12-05 05:27:05 +00:00
Thomas Goyne 8ab9ba77ae Remove the prohibition against seeking while video is playing and just do Stop; Seek; Play as the slider already did in some cases
Originally committed to SVN as r5964.
2011-12-05 05:26:58 +00:00
Thomas Goyne 2e40652265 Simplify video playback logic
Originally committed to SVN as r5962.
2011-12-05 05:26:45 +00:00
Thomas Goyne 1f534bc757 Kill VideoContext::playMutex. I assume it was a relic from the old threaded video display code as it's completely pointless.
Originally committed to SVN as r5961.
2011-12-05 05:26:38 +00:00
Thomas Goyne ca91097b8f Revamp script resolution setting logic
Rather than setting the default script resolution to 640x480, leave it
unset in new files. When video is opened, if the user has not already
manually set a script resolution, automatically use the video's
resolution as the script resolution. If the user has and the set
resolution is not a multiple of the video resolution, use the old prompt
for updating it.

This eliminates the confusing prompt about mismatched resolutions when
opening video with a new file while hopefully resulting in users using
the correct resolution more often.

Originally committed to SVN as r5921.
2011-11-28 22:16:22 +00:00
Thomas Goyne df50af52e8 Remove OpenGL headers from video_context as it doesn't touch OpenGL anymore
Originally committed to SVN as r5905.
2011-11-23 18:33:02 +00:00
Thomas Goyne 893ec95841 Don't load the FPS from Aegisub keyframes. The format breaks vfr and setting the fps should be done with timecode files.
Originally committed to SVN as r5900.
2011-11-20 17:35:00 +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 31a3b9aae0 Do nothing if video is played with no video loaded rather than crashing
Originally committed to SVN as r5802.
2011-10-29 04:30:52 +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 1f095b0a01 Remove the SubsEditBox from the context in favor of the SubsEditTextCtrl as it was the only public member of SubsEditBox
Originally committed to SVN as r5595.
2011-09-15 05:17:07 +00:00
Thomas Goyne e12bcc6aef Bind VideoContext::OnFileSave to the file save signal rather than the commit signal
Originally committed to SVN as r5568.
2011-08-27 06:42:03 +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 6ad2098749 Make VideoSlider use commands for its key events
Originally committed to SVN as r5256.
2011-01-21 04:57:36 +00:00
Thomas Goyne 8c8b149236 Fix a few warnings in the reporter
Originally committed to SVN as r5219.
2011-01-16 07:18:06 +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 7210ea17d8 Add pre-save signal to AssFile and move most of the logic in FrameMain::SaveSubtitles to slots for this signal
Originally committed to SVN as r5207.
2011-01-16 07:16:40 +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
Thomas Goyne 64ebce6c0f Move NextFrame and PrevFrame from VideoSlider to VideoContext
Originally committed to SVN as r5200.
2011-01-16 07:15:53 +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 17c07cc131 Add timecodes opened signal to VideoContext
Originally committed to SVN as r5080.
2010-12-31 21:03:18 +00:00