Commit Graph
52 Commits
Author SHA1 Message Date
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 3bd1c885cf decoder: round double to int 2020-02-20 19:24:59 +11:00
itsmattkc e373c40853 ffmpegdecoder: handle eof in retrieve 2020-02-20 16:50:03 +11:00
itsmattkc 3e776b62e1 oiiodecoder: added new mutex structures 2020-02-20 16:38:23 +11:00
itsmattkc 1cce8abd85 frame: added bool function returning whether the frame is allocated or not 2020-02-20 16:37:43 +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 e68e89c40b renderer/decoder: use same background mechanism to conform audio as well 2020-02-19 16:45:34 +11:00
itsmattkc a719618b31 waveinput: better handling of WAV data sections 2020-02-19 12:45:21 +11:00
itsmattkc 56adf5005f decoder: provide conform progress signal 2020-02-19 12:45:01 +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 5e75e9b3b0 waveinput/output: allowed external access to data length value 2020-02-19 11:40:54 +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
itsmattkc cb3ef5d994 decoder: ensure indextask is started in the taskmanager's thread 2020-02-16 10:27:23 +11:00
itsmattkc cdfba418fc ffmpegdecoder: added fixme comments for errors that aren't handled 2020-02-16 00:45:36 +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 5d58479f0a oiiodecoder: fixed erroneous processing of extension_list 2020-01-26 14:43:45 +11:00
itsmattkc 490a634473 oiiodecoder: fixed segfault caused by some OIIO decoders if they received
unexpected data

When "probing" footage, Olive runs it past all of its decoders until one
responds that it can decode this file. However this caused issues when some
OIIO decoders would erroneously pick up incompatible files, try to read them
and segfault the entire app (notable OpenJPEG with MPEG-4 and RLA with WAVE
audio). We now use the file extension to check with OIIO if it "should" be
compatible before actually testing if it is.

This is not a "perfect" solution (i.e. someone could recreate the segfault by
renaming an MPEG-4 file to an image extension like .JPG), but is probably as
much as can be done Olive-side and should filter out all segfaults under normal
circumstances.
2020-01-26 11:54:49 +11:00
itsmattkc 8b0c7edfec OIIO: added support for OIIO 1.x
OIIO 2.x uses std::unique_ptr while 1.x uses raw pointers. Olive can now handle
both, manually destroying the raw pointers when necessary if running on OIIO
1.x.
2020-01-26 11:33:45 +11:00
itsmattkc 149d125e39 msvc: updated code for higher warning level 2020-01-24 12:00:55 +11:00
itsmattkc c0300371c7 ffmpegdecoder: fixed flawed debug line 2020-01-20 04:58:39 +11:00
itsmattkc 4697b98980 fixed gcc compile issues 2020-01-19 20:39:48 +11:00
itsmattkc 1101b58ee8 allow setting of pixel format/ocio method/sample format in preferences
Implementation isn't perfect yet, viewer/renderer doesn't update yet when
the preference is changed so a sequence needs to be re-opened for the change to
take effect.
2020-01-18 03:37:36 +11:00
itsmattkc f8f932112c fixed bug where the node remove with exclusive deps command would never run 2020-01-17 13:56:45 +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 75a9291cd2 refactored import function for greater robustness
The import function was written early on in the rewrite as a multithreaded
background task that was considered somewhat flawed. While it worked for the
most part, there were possibilities of race conditions that could have
potentially been fatal, particularly since media could theoretically be
deleted while the import/probe tasks were running in the background.

With the save/load functions coming in, it became even more complicated as
projects may include metadata about the footage that can't be implemented
easily when the footage is imported/probed in the background. Making importing
a modal task fixes all of these issues, it's still done in a background thread
to not hang the GUI thread, but the GUI thread can be briefly "paused" in a
user friendly way so that all these functions can be safer.
2020-01-15 15:19:14 +11:00
itsmattkc ca89e2b818 use lossless compression on indexed frames
We use Qt's built in zlib compression on the fastest setting (it was found that
higher compression took 5x as long with a negligible decrease in size). This
helps keep disk cache sizes low.
2020-01-12 04:21:07 +11:00
itsmattkc 3b2aa33960 store indexed frames in their native format
While there are clear efficiencies in storing the frame out of the codec,
there's little benefit to storing it in a format higher than its native pixel
format since the pixel conversion is generally fairly quick. This commit will
index all frames in their native pixel format.
2020-01-12 03:57:29 +11:00
itsmattkc 1c5d55012b video renderer will always render frames closest to the playhead first
A few commits ago, the render behavior was changed to only render within a
user-specified range of the playhead. This works well, but it would still
render from the start of the range (usually before the playhead) to the end,
meaning it couldn't keep up with the playhead as well as it should. This
commit prioritizes frames close to the playhead and renders outwards to
address this.
2020-01-12 01:14:56 +11:00
itsmattkc 0823c84fb2 acknowledge video stream start times 2020-01-11 17:44:52 +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 b8aabb7e01 updated exporter to work with new frame flow 2020-01-08 02:27:47 +11:00
itsmattkc 0db13a96ab implemented a footage viewer
Essentially a minor derivation of a viewer type that can automatically view
footage from the project (i.e. not in a sequence).
2019-12-30 20:17:48 +11:00
itsmattkc 1a1a7f029a changed waveinput error messages from debug to critical 2019-12-26 21:50:55 +11:00
itsmattkc 61c60e00d6 various small code cleanups and improvements
Largely refactoring work to make the code somewhat nicer to work with.
2019-12-26 19:00:08 +11:00
itsmattkc 520b8b46fa place timecode conversion functions into a Timecode class rather than an olive namespace
Code cleanup and improvement.
2019-12-26 17:20:58 +11:00
itsmattkc 3a7b3ffac6 implemented audio exporting
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.
2019-12-23 01:45:27 +11:00