Commit Graph
70 Commits
Author SHA1 Message Date
itsmattkc 81ad7b5054 ffmpegdecoder: fixed deadlock when closing a decoder instance 2020-04-21 23:15:21 +10:00
itsmattkc 290c8724c4 Merge pull request #1131 from luzpaz/typos-followup
Fix typos cont.
2020-04-16 12:21:45 +10:00
itsmattkc 9f7a9d85b4 ffmpegdecoder: fixed deadlock on non-video streams 2020-04-14 23:42:31 +10:00
itsmattkc a2f954a0a7 memorypool: implemented arenas
A pool can allocate/destroy any amount of arenas during runtime, meaning it
won't run out of memory but we still get the advantages of one large allocation
as opposed to hundreds of small allocations.
2020-04-14 16:23:45 +10:00
itsmattkc feceef0d62 ffmpegdecoder: impose limit on memory frame cache 2020-04-14 15:16:38 +10:00
itsmattkc 9cc343bf13 ffmpegdecoder: share framepool with all instances
We can conserve memory by sharing our frame pool amongst instances of the same
stream.
2020-04-14 14:51:31 +10:00
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 f80a82459b ffmpegdecoder: clear cache_at_zero flag if frames are removed 2020-04-13 13:24:30 +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
luz.paz 4e1cd870a9 Fix typos cont. 2020-03-21 13:46:38 -04:00
itsmattkc d4d969872f ffmpegdecoder: if data is less than duration, fill remainder with 0s
Fixes bug where random/uninitialzed audio values may appear in some
circumstances.

Also switches swr_convert_frame to swr_convert for a small
optimization/improvement, no need to use AVFrame struct when we're only
interested in samples.
2020-03-18 19:05:02 +11:00
itsmattkc de5955b403 oiiodecoder: implemented rudimentary image sequence support 2020-03-02 14:06:44 +11:00
itsmattkc 597f50fa37 ffmpeg: print more debug information, less useless information 2020-02-29 17:22:19 +11:00
itsmattkc 139c14f941 footage: fixed appearance of some metadata, particularly audio metadata 2020-02-29 17:19:47 +11:00
itsmattkc adcab06d4e fixed faulty while loop break 2020-02-27 18:15:55 +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 02ce48d0c6 various: pixel optimizations
Several things are accomplished in this commit, including:

- Use OIIO instead of our own functions for pixel format conversions
  (cleaner code/less for us to maintain)

- Fold all PixelService functions into the PixelFormat class
  (cleaner code)

- Moved OpenGL pixel definitions to OpenGL classes and out of the
  global classes.

- Add support for RGB buffers as well as RGBA (optimization)
2020-02-27 13:54:38 +11:00
itsmattkc 0fbffc9b8f ffmpegdecoder: mild code cleanup 2020-02-27 01:05:22 +11:00
itsmattkc faffbb0f38 renderer: re-use already created textures if the images are known not to change 2020-02-25 14:57:49 +11:00
itsmattkc 6239107670 ffmpegdecoder: run timer in main thread at all times 2020-02-24 11:56:48 +11:00
itsmattkc 412ea9cede ffmpegdecoder: fixed bug with frame identification 2020-02-24 02:01:42 +11:00
itsmattkc d3bc12b2f5 ffmpegdecoder: use stricted memory interval 2020-02-23 22:18:10 +11:00
itsmattkc c7cb227abb ffmpegdecoder: fixed memory leak introduced in previous commit 2020-02-23 21:24:07 +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 dcedf12dbe ffmpegdecoder: stop clear_timer on deconstruction 2020-02-21 14:25:27 +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 4532c3884e ffmpegdecoder: fixed cast issue on gcc 2020-02-21 00:21:31 +11:00
itsmattkc 2299fda73a ffmpegdecoder: handle media that starts at a non-zero pts 2020-02-21 00:09:45 +11:00
itsmattkc 162c91ec52 ffmpegdecoder: allow probe duration pickup to be cancelled 2020-02-20 23:54:40 +11:00
itsmattkc bc2be7a2a4 ffmpegdecoder: use simpler loop to find duration if the container doesn't
provide one
2020-02-20 23:52:23 +11:00
itsmattkc 73e639757e ffmpegdecoder: fix bug that slowed down low fps footage unnecessarily 2020-02-20 23:34:49 +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 53551246da decoder: signal indexing progress
Better UI interactions, actually shows the progress of the index function in
the task manager now.
2020-02-19 12:19:42 +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 35ab379e9f ffmpegdecoder: updated comment to better describe error handling 2020-02-16 10:28:18 +11:00