Commit Graph
1878 Commits
Author SHA1 Message Date
itsmattkc cb5d816145 removed extraneous debug line in audiohybrid device
Code cleanup.
2019-11-23 17:03:37 +09:00
itsmattkc 2cfccbfbef copy node graph before rendering
Previous iterations would use mutexes to prevent changing of the graph
mid-render, however several user actions would need to capture these mutexes
causing the main thread to hang until the current render job (frame/range of
samples) was complete. We now copy the nodes necessary as part of the "compile"
process so that the main thread shouldn't need nearly as much blocking while
caching occurs.
2019-11-23 08:53:52 +09:00
itsmattkc b233aa5319 added signal for an edge changing that can ripple through the graph
Useful for detecting when a graph needs recompiling, in tandem with the
"InvalidateCache()" signal when necessary, this signal ripples through the
nodes when any of the connections change which will likely need handling by
the renderer.
2019-11-23 08:51:15 +09:00
itsmattkc b1535b73b7 implemented clear() function for nodegraphs
Added a convenient (destructive) way of emptying a NodeGraph completely.
2019-11-23 08:48:59 +09:00
itsmattkc 9131b32be4 small code cleanup in block class 2019-11-23 01:56:13 +09:00
itsmattkc bc9b7bc4f0 add mode for copying values only and not connections
Sometimes we'll be copying nodes without wanting to copy their connections,
since we'll want to connect them to equivalent copies rather than connecting
them to the same nodes the originals were connected to. We now have an extra
parameter to distinguish such operations.
2019-11-23 01:51:36 +09:00
itsmattkc 492c8f474a added clone functions for nodes
Since nodes are are extremely derivative types, we use a clone/copy function
to produce new types of the derived class easily.
2019-11-22 16:53:30 +09:00
itsmattkc 2599c1e8a4 forego memory sample buffer and only write samples that need writing
Rather than writing the entire sequence audio to disk every change, now we
just write the parts we need to write.
2019-11-20 10:32:46 +09:00
itsmattkc 6693fc75a3 fixed obviously wrong function
This function was written incorrectly and would almost always trigger an
infinite loop. It's now written correctly and achieves what's intended.
2019-11-19 22:25:04 +09:00
itsmattkc 84f77cd58d null-check track before splitting
Fixes access violation if the user tries to split a track that doesn't exist.
2019-11-19 22:25:04 +09:00
itsmattkc 8353b8d745 handle node providing less audio samples than expected for a given time
If the bytes retrieved is less than the bytes we expected for the time period
we're rendering, we fill the remainder with silence. Fixes segfault trying to
copy bytes that aren't actually allocated.
2019-11-19 22:25:04 +09:00
itsmattkc 073176a45d added function for returning a block at a time
Assists with certain timeline-related functions.
2019-11-19 22:25:04 +09:00
itsmattkc 8d599b60e4 reimplemented split at playhead functionality
Reimplemented an older but very useful timeline function for splitting blocks
at the current playhead.
2019-11-19 22:25:04 +09:00
itsmattkc 065fbc0428 return nullptr if a TrackReference references a track that doesn't exist
Fixes assert trying to access an array location that doesn't exist.
2019-11-19 22:24:23 +09:00
itsmattkc 54ecc01dbe clarified some fixme comments 2019-11-19 22:14:11 +09:00
itsmattkc 51c95cc48f ensure audio output is always closed when it's no longer needed 2019-11-19 11:09:21 +09:00
itsmattkc db9f188733 reimplemented infrastructure for autorecovery projects
Foundation for a fairly simple but likely essential autorecovery process.
Basically the same as what it was in 0.1.x but with a huge improvement: custom
autorecovery intervals. Ironically there isn't any "saving" to be done
just yet, but when there is, this infrastructure will be ready for it.
2019-11-18 13:47:42 +09:00
itsmattkc 7385e3dc56 fixes jitters by using signals/slots to pass image buffers around
Updating values rapidly would cause strange jitters as a
byproduct of the viewer trying to update from the renderer while
it was still working. Rather than the viewer trying to access the
the renderer, we now send textures in the initial update signal
to keep everything synchronized.
2019-11-18 02:14:54 +09:00
itsmattkc 8e6c23ffc1 fixed bug that caused some frames to never render indefinitely
Frames should no longer get stuck unrendered.
2019-11-17 17:14:08 +09:00
itsmattkc 2752a0a005 made output param cache thread safe
Multiple threads could be accessing these values at any given time, they'll
need to be thread safe.
2019-11-17 17:11:40 +09:00
itsmattkc 833d1f7d94 fixed bug where slider widget would signal that it had changed twice
When typing a slider value, it would always signal that it had changed twice.
This is obviously unnecessary and is fixed in this commit.
2019-11-17 13:49:40 +09:00
itsmattkc 51439c2992 removed extraneous debug line 2019-11-17 13:49:23 +09:00
itsmattkc 2f8675f5f9 cleaned up opengl backend
Removed some legacy code (that had been all commented out by now anyway)
2019-11-17 13:48:36 +09:00
itsmattkc 823e820bfa update length value from signals/slots
I was looking for a way to update the length value automatically with signals
and slots (rather than just checking every time the viewer time changes). This
should do the trick.
2019-11-17 13:46:14 +09:00
itsmattkc 9d154e1909 use different signals when the audio invalidates vs the video
Both audio and video renderers were working off the same invalidation signal
(i.e. changing audio would also trigger a re-render of the video). This is
obviously suboptimal and now they are separate.
2019-11-17 13:44:50 +09:00
itsmattkc b1f4bf3dbb delete mediaindex folder on close
Since we're storing media frames too with no disk space management
at the moment, we'll remove the mediaindex folder too on close
just for this testing period
2019-11-17 12:32:01 +09:00
itsmattkc 35802d37b0 ensure invalidated values are removed
When a node receives an InvalidateCache signal, it will
automatically signal its outputs to discard any cached values in
the invalidated time range
2019-11-17 12:31:10 +09:00
itsmattkc 863525c595 remove functions that were moved to the timerange class 2019-11-17 12:31:02 +09:00
itsmattkc 60a27961c2 cache frames alongside the frame index
Decoder will now pre-render/decode frames in advance of needing
them
2019-11-17 12:29:53 +09:00
itsmattkc c6d5fbae8c moved timerange functions to timerange class 2019-11-17 12:29:09 +09:00
itsmattkc cd69bd76b9 use sequence parameters as audio output parameters 2019-11-15 20:11:17 +09:00
itsmattkc 0081511f18 Merge branch 'master' of https://github.com/olive-editor/olive 2019-11-15 14:00:06 +09:00
itsmattkc a9660201f1 miscellaneous other changes to make audio rendering work
Many changes were made throughout the codebase to support audio, these are
most of the small changes necessary.

The audio support still is not perfect. I still need to write in resampling
support. After that it should work correctly with all audio types.
2019-11-15 13:57:49 +09:00
itsmattkc 0a68b2a1c3 make viewer work with new audio renderer setup
Previously, the viewer could be set up with a custom PCM file to test playback
and scrubbing. Now these functions are connected to the audio renderer to
work within the render system.
2019-11-15 13:56:14 +09:00
itsmattkc 16f80386e8 added qhash functions for timerange and rational
So these keys can be used in QHash containers, they need functions for how to
create those hashes.
2019-11-15 13:55:05 +09:00
itsmattkc 336b3a8e05 added support for returning audio in the FFmpegDecoder
FFmpeg decoder now indexes and returns audio as expected
2019-11-15 13:53:58 +09:00
itsmattkc 40b3879440 overhauled render classes to support video AND audio
Major refactoring work to try sharing as much code as possible between the
video renderers and audio renderers, as well as make them as
platform-independent as possible.
2019-11-15 13:50:58 +09:00
itsmattkc 9a44e656b5 added simple wave classes
To assist the input/output of PCM data, we use the fairly straight-forward
WAVE format. These classes simplify the input and output of such data.
2019-11-15 13:49:40 +09:00
itsmattkc 7a6dd02e5b furthered development of audio renderers
Mostly reimplementing functions from other workers to produce audio samples
2019-11-11 11:35:01 +09:00
lightyear15 96074d3f3a timerange quick refactor
std::swap can saves some lines of code,
and less code means less to maintain
2019-11-08 22:02:55 +01:00
itsmattkc 1206eb73b9 moved frame cache to external class that's easier to pass around 2019-11-06 23:46:44 +11:00
itsmattkc fea9fb24aa Merge branch 'master' of https://github.com/olive-editor/olive 2019-11-06 09:16:16 +11:00
itsmattkc 3b224c7638 multithreaded download and files that probably should have been in the last
commit

For testing the new iteration, the texture cache disk download was written
into the main thread instead of into the separate threads. Now they're back
in separate threads again.

Also I think some of these files probably should have been in the previous
commit.
2019-11-06 09:14:20 +11:00
itsmattkc 6de976c19f worked through new renderer worker annd split it off into gl and non-gl
specific code

The new rendering system is now starting to work as planned, however it is
still not as complete as the iteration before. But this should be a more
robust design moving forward. Work was also done towards splitting off all
OpenGL-specific worker code into a derived class. The hope is to have no
hard dependency on OpenGL and make swapping it out with other backends
straight-forward.
2019-11-05 03:39:56 +11:00
itsmattkc 6021852f18 moved decodercache to base folder for shared usage 2019-11-04 11:42:35 +11:00
itsmattkc 97a4294bb3 refactoring work to improve issues with new rendering pipeline 2019-11-04 11:34:43 +11:00
itsmattkc 663ae56ac4 more coherent render threading for now
Once again, conceptually this system should work, however it does not seem to
be the most efficient and it wouldn't surprise me if the multithreading was
eventually upgraded to an even more coherent system one day. However for
"core principles" this should be fairly decent.
2019-11-03 04:05:43 +11:00
itsmattkc 9c65cb854b rendering framework prototype largely complete
Most of the new concepts are down, but they're untested and bound to be full
of issues that need further design and bug squashing
2019-11-03 02:57:20 +11:00
itsmattkc 788502cd11 removed another unnecessary node function 2019-11-02 18:12:54 +11:00
itsmattkc 16ac2fc0e1 sweeping node graph changes for new rendering pipeline
The new rendering pipeline strives to simplify the nodes themselves as much
as possible and move much of the logic to an external rendering engine. This
change removes all of the responsibilities that no longer belong to the
nodes themselves and will soon be folded into the renderer.
2019-11-02 01:39:37 +11:00