libass doesn't free any font data it requests until the ass_renderer is
destroyed, so recreate it every time the font is changed to avoid
holding on to extremely large amounts of data when the user quickly
switches between fonts.
Closes#1320.
At least on OS X, allocating the buffers is one of the more expensive
parts of video playback, and on an arbitrary 720p H.264 file with simple
subtitles this cuts CPU usage while playing by about 30%.
Fixes errors when trying to automatically open audio from dummy video
and improves UX a little by disabling the Open Audio From Video menu
item when there are no audio tracks.
Add a new Project class which is responsible for everything related to
opening and closing audio, video, subtitles, timecodes and keyframes.
This pulls almost everything not directly related to playing audio/video
out of the audio and video controllers, pulls more crap out of
FrameMain, and happens to make things a little simpler in the process.
Use explicitly defaulted destructors for base cases when possible,
eliminate aggregate initialization constructors where possible, and push
some more stuff to NSDMIs.
Simply zero the memory for audio which hasn't been decoded yet, modify
the audio renderer to avoid caching blocks which aren't ready yet, and
add a progress indiciator to the audio display scrollbar.
Register functions which create each type of provider rather than the
provider types themselves so that the concrete types don't need to be
publicly exposed, and use a static list of providers rather than
registering them at runtime.