Commit Graph
33 Commits
Author SHA1 Message Date
itsmattkc 7bfdf8af7c ffmpegframepool: implemented functional frame pool
Includes splitting off core functionality to a base MemoryPool class that can
be re-used later if necessary.
2020-04-14 02:43:12 +10:00
itsmattkc 6bb972b4db decoder: began implementation of a frame pool 2020-04-13 23:44:42 +10:00
itsmattkc cdf5a1058d ffmpegdecoder: re-use existing frame pool for memory management 2020-04-12 14:12:08 +10:00
itsmattkc 4d8af6855f ffmpegdecoder: made all instances shared
Decoders now share instances between them and can interact with other threads
to share resources and continue the work of others.
2020-04-12 01:49:10 +10:00
itsmattkc e6b47a817c ffmpegdecoder: separated instance from decoder entity
Should allow for different decoders in different threads to share a single
instance.
2020-04-11 17:37:52 +10:00
itsmattkc ce7fa12520 ffmpegdecoder: implemented basic decoder crosstalk 2020-04-11 13:18:44 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10:00
itsmattkc 6f0d72c05d renderer: switched audio rendering over to planar buffers
While planar audio cannot be used for playback, it's much easier for processing.
This should lead to cleaner and easier to write code in the future.
2020-03-31 18:01:20 +11:00
itsmattkc d87b4fde8c renderer/decoder: use divider at the footage level
Optimizes rendering if a divider is being used.
2020-02-27 15:47:08 +11:00
itsmattkc b1cb8489df memory: try caching frameptrs instead of avframes so we have more control 2020-02-23 21:20:33 +11:00
itsmattkc 48cdb3a6dd memorymanager: rewrote entire memory management system 2020-02-23 20:29:51 +11:00
itsmattkc 547990b920 ffmpegdecoder/memorymanager: fixed race condition in garbage collection 2020-02-21 23:15:09 +11:00
itsmattkc b0c9711974 ffmpegdecoder: fixed double mutex lock
Error() would call Close() getting stuck in a double mutex lock that could
stall workers. This commit fixes that.
2020-02-21 20:04:36 +11:00
itsmattkc e74c4c2d1c global: implemented rudimentary memory manager to use available system memory
without forcing the OS to page swap
2020-02-21 14:20:57 +11:00
itsmattkc 7797bf4971 ffmpegdecoder: added helper functions for memory handling 2020-02-21 01:18:21 +11:00
itsmattkc 2299fda73a ffmpegdecoder: handle media that starts at a non-zero pts 2020-02-21 00:09:45 +11:00
itsmattkc e373c40853 ffmpegdecoder: handle eof in retrieve 2020-02-20 16:50:03 +11:00
itsmattkc 2145efa2a0 decoder/renderer: use memory cache and single decoder to optimize frames for
cycles
2020-02-20 15:32:12 +11:00
itsmattkc 71048f40a8 ffmpegdecoder: removed all old code to clean up 2020-02-20 02:22:59 +11:00
itsmattkc 95ca19d547 ffmpegdecoder: began work on the index process working in tandem with the
retrieval process
2020-02-20 00:06:20 +11:00
itsmattkc 08e6c6ffc0 decoder: move conform function to base class
There's no reason the Conform() function can't live in the base class since its
functionality isn't necessarily specific to FFmpeg.
2020-02-19 12:28:37 +11:00
itsmattkc 03bdf01357 decoder/renderer: no longer index automatically as part of the retrieve
functions

Indexing is a lengthy process and had a high chance of getting RenderWorkers
stuck doing it rather than being responsive to cache requests. This commit
introduces a system where workers never index media, but instead signal that
media is not ready to their RenderBackends which ensure that the media gets
indexed and re-queues the affected frames when those indexes are ready.
2020-02-19 11:44:29 +11:00
itsmattkc 22046535ca various: added hooks so that various lengthy functions could be cancelled from another thread 2020-02-17 02:10:12 +11:00
itsmattkc 3efbcc28ef ffmpegdecoder: improved index reliability 2020-02-15 23:39:33 +11:00
itsmattkc f5de19dd6b ffmpeg: allow decoders immediate access to frames even while indexing
Previously, FFmpeg decoders needed to wait for the initial index to finish
before they could retrieve frames. Now they can retrieve frames while the
index is occurring, provided the appropriate frame has already been indexed (if
not, the retrieve will need to wait still).
2020-02-15 13:57:29 +11:00
itsmattkc 9de164cfba ffmpeg: disable multithreading in favor of our own
Our renderer system is already heavily multithreaded and prioritized to keep the
main thread active. As a result, FFmpeg receives little benefits from being
multithreaded and is actually detrimental to our main thread as it hasn't been
prioritized to keep the main thread as active as possible.
2020-02-14 10:08:19 +11:00
itsmattkc 653709dc84 try to index media immediately on import
Since indexing is supplemental, it can be made a background task that can occur
at more or less any time. So we run it as soon as possible.
2020-01-17 03:58:29 +11:00
itsmattkc 5daf126e8d completed hybrid index system 2020-01-11 03:45:58 +11:00
itsmattkc 5798349f92 began hybrid indexing system
This index system will have awareness of the disk cache state and be able to
fill in and store frames as necessary while keeping the disk cache under
user defined limits.
2020-01-11 03:20:46 +11:00
itsmattkc 594b1a2b58 use sample aspect ratio correctly 2020-01-11 00:16:54 +11:00
itsmattkc ba94ea51cd read and utilize the aspect ratio metadata from video files 2020-01-11 00:08:16 +11:00
itsmattkc d32306f88b only disk cache around the playhead 2020-01-10 20:35:48 +11:00
itsmattkc ee31da9e71 merged encoder and decoder code into one folder since they can share quite a bit of code 2019-12-21 20:03:25 +11:00