Commit Graph

61 Commits

Author SHA1 Message Date
Jonathan Thomas
4d3aab8206 Merge remote-tracking branch 'origin/caching-timing-improvements' into caching-timing-improvements
# Conflicts:
#	src/Qt/PlayerPrivate.cpp
2022-01-17 14:55:25 -06:00
Jonathan Thomas
84eb008109 Using more aggressive adjustment increment, and adding DEBUG output 2022-01-17 14:53:39 -06:00
jackson
a42f82b7a9 add logging file 2022-01-15 02:14:38 -06:00
Jonathan Thomas
a5f35fb42a Refactoring the VideoCacheThread to check every frame before requesting it. Adding a new method: Contains() to our cache objects, to facilitate this. Removing cache clearning experimental code from Timeline (causing playback issues). Refactoring PrivatePlayer playback timing code, to calculate an average # of frame difference between audio and video threads, and slowly adjust back towards zero when needed. 2022-01-14 15:16:04 -06:00
jackson
951215e569 Simplify math, add max sleep time.
- Simplified to one formula.
- Removed additional case for skipping frames.
2022-01-03 21:22:09 -06:00
jackson
f6942b28a8 Re-included debug statement 2021-12-30 01:16:59 -06:00
jackson
a180209f3b Better comment, tune the timing
- Spent time tuning the function so it keeps the error (video/audio difference) low
- Broke up the code, and added comments to improve readability.
2021-12-30 01:08:19 -06:00
jackson
28fb27840c skip frames when over a frame_duration behind 2021-12-29 01:27:56 -06:00
jackson
8a9c00d3f6 - Searched for word 'millisecond' replaced with 'microsecond'
- Simplify timing correction with the cube of the difference between audio and video times.
    - If the correction is longer than it took to generate a frame. skip frames until under a frame behind.
2021-12-27 19:14:33 -06:00
Jonathan Thomas
91c47eb98b Removing debug output, and adding some improved handling of audio/video sync conditions 2021-12-07 13:37:29 -06:00
Jonathan Thomas
089b30f7c5 Switch from milli seconds to micro seconds, for added precision. For example, instead of sleeping for 0.041666667 seconds... due to milliseconds, we were only sleeping 0.41. This would de-sync the audio and video pretty quickly, over a few seconds, causing stuttering 2021-12-06 17:30:45 -06:00
Jonathan Thomas
f3e7208df6 Adding some additional logging 2021-12-06 15:47:32 -06:00
Jonathan Thomas
09bcf2ab15 Fix sleep time calculation to change when the project profile is changed (big bug), and add some additional logging/debugging statements 2021-12-03 15:21:11 -06:00
Jonathan Thomas
4a52941708 Experimental logging to detect delay on Windows playback 2021-12-03 00:43:13 -06:00
Jonathan Thomas
eae3fb130d Adding in a limit on video playback sleep, so we don't get a huge, runaway wait time. Also adding in a kill time when shutdown threads (so we don't wait indefinitely for them to stop) 2021-11-04 17:33:14 -05:00
FeRD (Frank Dana)
fe58e8028d Move some headers around 2021-11-01 11:04:31 -04:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
Jonathan Thomas
47afa205c7 Merge pull request #585 from OpenShot/opencv
3 New OpenCV Effects (Tracker, Stabilization, and Object Detection)
2021-01-28 17:28:15 -06:00
FeRD (Frank Dana)
2f3615f706 Move Exceptions.h includes to .cpp files 2021-01-26 10:52:04 -05:00
FeRD (Frank Dana)
0cb9286da3 Merge branch 'fix-swig-flags' into opencv_build_config 2021-01-13 09:20:35 -05:00
Frank Dana
6009a26e4c Eliminate TooManySeeks exception (#611)
Since commit bfa050409c (2015-08-24),
there is no code in libopenshot which ever throws TooManySeeks.

- Removed catch() statements for TooManySeeks from multiple functions
- Removed the exception from Exceptions.h
- in Qt/AudioPlaybackThread.h:
  - Removed the "SafeTimeSliceThread" class definition, as it only
    existed to catch TooManySeeks.
  - Replaced SafeTimeSliceThread with a standard juce::TimeSliceThread
2021-01-01 05:24:48 -05:00
Jonathan Thomas
df154c3844 Fixing color format for opencv conversion 2020-10-30 18:23:45 -05:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
Frank Dana
e500cae9f5 Replace sleep()/usleep() with std::chrono calls (#473) 2020-09-02 02:07:54 -04:00
FeRD (Frank Dana)
6aebb10cea More explicit prefixing in Qt/ and Player classes 2019-09-21 00:14:32 -04:00