Widget now supports creating keyframe and standard values, supports dragging
from sliders (not creating an undo command for each drag), and everything is
undoable.
Since EmitCachedFrameReady() makes a copy of the texture, we can economize a lot
by re-using the same copied texture for all the times rather than making a
separate copy for each time.
The ViewerGLWidget would receive raw GLuint textures while most of Olive uses
an OpenGLTexture C++ wrapper. Unfortunately this would lead to the C++ wrapper
getting destroyed since its instance wasn't kept in the ViewerGLWidget. This
meant by the time the ViewerGLWidget would re-draw, the texture would have
already been destroyed leading to some black frames. This is now fixed.
Previously the non-keyframed value was stored as a static keyframe but this
introduced issues when an input was in a state of keyframes being enabled but
0 keyframes existing. Having a standard value makes much more sense.
While the keyframes themselves are relatively simple, their usage is quite
complex and using QObjects as their base will help a ton of UI and backend
functionality.
Since all NodeInputs will generally only need their data type and default
value set once, we place it all into the constructor for cleaner and easier
to manage code.
The encoder was moved to its own thread and will transcode the PCM from the
audio renderer into the chosen codec while the video frames are still
received. The implementation isn't perfect and could use some cleaning up, but
it is functional at the moment.
Sending a texture directly from the texture cache is dangerous since once the
reference is relinquished, it could be picked up and used by another thread.
Copying the texture to a separate one takes a little extra time but lets the
viewer remain in control of that texture.
Since the backend parameters were hardcoded not too long ago, for testing the
parameters had to equal the backend parameters. Now that they are not hardcoded
we can use higher quality parameters in export contexts.
Various backend improvements are included in this commit, mostly for the
benefit of exporting. These include:
- Moving more non-GL code from OpenGL derivatives into base classes
- An "export mode" that changes the cache behavior of video backends
- Using the Viewer's UUID introduced a few commits ago
- No longer hardcoding the pixel format/render mode in the backend (since
they'll inevitably differ when exporting vs previewing)
- Improved signalling for frames that are completed
To aid generating a cache ID, each viewer node needs a UUID. Previous iterations
tried to hash a name and time, but a UUID is a much more efficient way to do
this.
With differently set speeds, these functions would mess with the timing in ways
that would be confusing to the user. Now they act in a much more intuitive way
and also prevent negative media times.
This likely isn't necessary, but was one of the steps made trying to debug
MSVC compilation. Considering the previous iteration was from 2012 and this
one is from 2019, it may have other improvements.
A slider can now hold a float value and display it in the UI converted to
either a percentage or a decibel (still returning a linear float value
programmatically for the rest of the code).
Earlier, footage that was not the same frame rate as the sequence had the chance
of their length value falling between a frame. This doesn't really help anything
with video since a frame is a discrete point in time, and only led to confusion
while navigating the timeline.
Splitting commands would run CopyInputs after set_length. Since length is now
a parameter (aka a NodeInput) the former would override the latter breaking the
implementation. This commit fixes that.
Transitions are nodes but have a few parameters that are programmatic and always
required. This lets people write external code for transitions as well.
OCIO config was set on a per-project basis, but we were using a singleton for
the ColorManager that would break if more than one project was ever open.
Now the ColorManager belongs to the Project and is always accessed through the
Project.
An earlier commit implementing media in and out parameters was primarily for
this addition. A simple control dialog for the clip's speed presentation
reimplemented from the old codebase.
This commit adds the background functionality of the render cache invalidating
whenever a footage's color space is changed. This includes when the project's
configuration is changed as well.
The viewer had the color management backend in place already, but the frontend
was non-functional. This commit implements most if not all color management
functionality.