Commit Graph

  • a8e9c95fea Silence openshot::Frame audio when requesting a Clip::GetFrame() past the end of the Clip's Reader. For example, if a Clip has 1000 frames, and the user requests frame 1001, we will return the last cached openshot::Frame object, but we don't want to repeat the audio samples (causing a stutter). Any frame past the end of the reader, should always silence the audio samples. Also, fixed a few invalid comments, and added a Unit test. Jonathan Thomas 2022-03-02 16:24:09 -06:00
  • 5148f40246 Merge pull request #811 from OpenShot/make-cache-less-aggressive Jonathan Thomas 2022-03-01 13:10:59 -06:00
  • 8864bea8e9 Renaming variable for clarity Jonathan Thomas 2022-03-01 13:00:53 -06:00
  • c71a1af6ea Allow cache on initial pause, to use the Timeline cache size to initially cache a bunch more frames... and then fully pause. This allows for a balance between not-caching during pause (for Transform and Scrubbing performance), but still caching frames on pause so the user can wait for a smoother playback experience. Jonathan Thomas 2022-02-28 15:45:46 -06:00
  • d8cb71c544 Merge pull request #810 from OpenShot/make-cache-less-aggressive Jonathan Thomas 2022-02-25 15:09:38 -06:00
  • 64815d6bae Removing adaptive caching support, and make things generally less aggressive. Do not cache when paused (to allow for transform tool and timeline scrubbing to only render the current frame needed, for speed). This results in very smooth transform tool editing, very smooth timeline scrubbing, and I'm still seeing very smooth video playback when not paused. Needs more testing though. Jonathan Thomas 2022-02-24 15:56:39 -06:00
  • 2a93c0c3bf FFmpegWriter: Don't use AVPicture (gone in 5.0) FeRD (Frank Dana) 2022-02-24 10:34:41 -05:00
  • eac566f81f FFmpegWriter: Don't force deprecated stream member FeRD (Frank Dana) 2022-02-24 07:55:03 -05:00
  • 93debab7c4 FFmpegWriter: Macro & member cleanup FeRD (Frank Dana) 2022-02-24 07:29:08 -05:00
  • f2b89e3254 Merge pull request #796 from OpenShot/caching-timing-improvements Jonathan Thomas 2022-02-13 14:09:34 -06:00
  • fdb5e527fb Remove debugging code Jonathan Thomas 2022-02-13 13:55:34 -06:00
  • 34a6af2a8a Removing test.sh file Jonathan Thomas 2022-02-13 11:01:41 -06:00
  • fbd0ecfc83 Merge branch 'develop' into caching-timing-improvements Jonathan Thomas 2022-02-13 10:59:27 -06:00
  • d24e39407e Prevent crashes: - Tweaking GetSmallestFrame to not use an additional mutex. - Replace 2 mutex on Timeline::GetFrame with 1 mutex. - Remove mutex from Timeline::ClearAllCache. - Slow down loop on video cache thread. - Protect audioThread::Seek() if missing a source. - Rearrange StopPlayback to always stop the videoCache thread first. Jonathan Thomas 2022-02-12 13:31:21 -06:00
  • 97ed0f92ab Improved scrubbing to not wait on pre-roll Jonathan Thomas 2022-02-11 15:27:23 -06:00
  • fd3865a8e6 Detecting default sample rate of default audio device (Windows seems to play audio out of sync on certain audio drivers, if there is a mismatch between OpenShot and the default system audio sample rate). This info will help debug issues. Adding back in a mutex on Timeline::GetFrame causing crashes. Jonathan Thomas 2022-02-11 14:12:25 -06:00
  • ec64635a6c Don't use any input channels when initializing audio device Jonathan Thomas 2022-02-10 16:56:06 -06:00
  • 2e9afdb13f DEBUG output of default output sample rate Jonathan Thomas 2022-02-10 16:13:24 -06:00
  • 35d4629df6 Large refactor to caching and playback timing: - Support different speeds (-1X, 2X, 4X, etc...) - Clamp getFrame between 1 and timeline length - Support rewind using new timing code - Caching in both directions (based on previous speed) - Removing mutex from Timeline::GetFrame (cached path) - Caching supports actual speed now - Bust cache and trigger pre-roll if we encounter too many uncached frames. This will re-sync the video + audio threads. - Sleep less in cache loop / Adjusting min frames to 24 (trial and error). Too few and backwards playback suffers. Too many and all playback waits. Jonathan Thomas 2022-02-09 17:29:04 -06:00
  • 0035fc6498 Removing audio seek from PlayerPrivate.cpp pause code, since this causes crashes when terminating openshot-qt. Jonathan Thomas 2022-02-02 18:43:28 -06:00
  • 32347a4c60 Fixing memory issues with FrameMapper, Cache, and Keyframe objects (which use vectors that can hold tons of objects, and were not fully releasing the memory on the heap until the program terminates) Jonathan Thomas 2022-02-02 18:32:47 -06:00
  • 5fe398bda5 Reducing pre-roll to 12 frames Jonathan Thomas 2022-02-01 15:46:35 -06:00
  • f70ca4b877 Break out of cache loop if playback speed changes during caching. Move getFrame() below pause code, to prevent accidental incrementing video_position. Jonathan Thomas 2022-02-01 15:33:32 -06:00
  • 87a6aa9b39 Improved pausing code on video playback, to allow for scrubbing during paused state. Jonathan Thomas 2022-01-31 17:15:52 -06:00
  • ff455f0752 Moving from high resolution timer to system_clock, trying to avoid a Mac build error Jonathan Thomas 2022-01-31 15:28:46 -06:00
  • 176f2fff9c Big refactor of AudioReaderSource, to be simpler, and only fill the audio samples requested (removed double/internal buffer complexity). Also, we now initialize the audio device manager at a specific sampleRate and # of channels correctly. Removed 'latency' adjustment in PrivatePlayer (no longer needed with no read-ahead buffer). Increased the min_frames_required on the video cache to 24. Jonathan Thomas 2022-01-31 15:18:07 -06:00
  • 133bae40c3 Adding pre-roll to VideoCacheThread, and making video & audio threads wait for the isReady() method before playing. Also fixed an audio bug where our internal buffer was not being cleared on seek. Removed some unused caching from Clip, and did some minor refactor on FrameMapper/Clip cache clearing. Jonathan Thomas 2022-01-26 17:56:33 -06:00
  • f1c2cc06de Adding ability to open *.osp files in QtPlayer app. Jonathan Thomas 2022-01-26 15:12:15 -06:00
  • a86097a390 Make coverage work on macOS, enable in CI (#804) Frank Dana 2022-01-25 19:59:42 -05:00
  • 49d6ba3b2b Merge pull request #793 from ferdnyc/reformat-log-calls Frank Dana 2022-01-18 16:22:16 -05:00
  • 8633b3aba6 Win CI: Prune Qt5 package set (#800) Frank Dana 2022-01-18 16:18:10 -05:00
  • c55b644f70 Refactoring video playback timing to use absolute timestamps and predicted frame times, instead of relative sleep. Adjusting audio buffer smaller (less latency). Jonathan Thomas 2022-01-18 13:08:32 -06:00
  • 03262ab9c6 CI: Use windows-2022, clean-slate MSYS2 image (#799) Frank Dana 2022-01-18 07:57:21 -05:00
  • 4d3aab8206 Merge remote-tracking branch 'origin/caching-timing-improvements' into caching-timing-improvements Jonathan Thomas 2022-01-17 14:55:25 -06:00
  • 84eb008109 Using more aggressive adjustment increment, and adding DEBUG output Jonathan Thomas 2022-01-17 14:53:39 -06:00
  • a42f82b7a9 add logging file jackson 2022-01-15 02:14:38 -06:00
  • 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. Jonathan Thomas 2022-01-14 15:16:04 -06:00
  • 8344e5c7a1 FrameMapper: Reformat logging calls FeRD (Frank Dana) 2022-01-12 10:53:58 -05:00
  • 549149d657 src/Qt/*: Reformat logging calls, fix indents FeRD (Frank Dana) 2022-01-12 10:52:44 -05:00
  • 806052f9c8 Clip, Timeline: Reformat logging calls FeRD (Frank Dana) 2022-01-12 10:52:05 -05:00
  • 3b1d4102af FFmpegWriter: Format ZmqLogger calls, move headers FeRD (Frank Dana) 2022-01-12 01:08:31 -05:00
  • 951215e569 Simplify math, add max sleep time. jackson 2022-01-03 21:18:18 -06:00
  • f6942b28a8 Re-included debug statement jackson 2021-12-30 01:16:59 -06:00
  • a180209f3b Better comment, tune the timing jackson 2021-12-30 01:07:18 -06:00
  • 28fb27840c skip frames when over a frame_duration behind jackson 2021-12-29 01:27:56 -06:00
  • 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. jackson 2021-12-27 19:14:33 -06:00
  • 3c8dc71bf2 Merge pull request #719 from OpenShot/audio-devices Jonathan Thomas 2021-12-07 16:36:51 -06:00
  • 91c47eb98b Removing debug output, and adding some improved handling of audio/video sync conditions Jonathan Thomas 2021-12-07 13:37:29 -06:00
  • 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 Jonathan Thomas 2021-12-06 17:30:45 -06:00
  • f3e7208df6 Adding some additional logging Jonathan Thomas 2021-12-06 15:47:32 -06:00
  • 09bcf2ab15 Fix sleep time calculation to change when the project profile is changed (big bug), and add some additional logging/debugging statements Jonathan Thomas 2021-12-03 15:21:11 -06:00
  • 4a52941708 Experimental logging to detect delay on Windows playback Jonathan Thomas 2021-12-03 00:43:13 -06:00
  • ac3762923d Updating licensing for reuse compliance Jonathan Thomas 2021-12-02 22:10:08 -06:00
  • 9eda757885 Merge branch 'develop' into audio-devices Jonathan Thomas 2021-12-02 22:05:19 -06:00
  • 7b19fa2169 Merge pull request #782 from dankamongmen/dankamongmen/constify Jonathan Thomas 2021-12-02 16:59:34 -06:00
  • 99034feb4e constify some AVCodecIDs, necessary for new ffmpeg nick black 2021-11-21 23:25:37 -05:00
  • 18bdad4342 Merge pull request #781 from OpenShot/missing-memory-include Jonathan Thomas 2021-11-18 16:36:15 -06:00
  • 520c8c5be3 Resolve a build failure for missing <memory> include. This is needed for shared_ptr to build on certain compilers. Jonathan Thomas 2021-11-18 16:19:33 -06:00
  • e7ed3b3717 CacheBase: Add missing include (#780) Frank Dana 2021-11-15 06:13:29 -05:00
  • c96691808f Merge pull request #778 from ferdnyc/new-docs Jonathan Thomas 2021-11-11 14:15:55 -06:00
  • dec6b04442 Merge pull request #771 from ferdnyc/move-magick-code Jonathan Thomas 2021-11-11 14:15:21 -06:00
  • 0c1e9d0700 tests/Fraction: Approx() floating-point for 32bit (#777) Frank Dana 2021-11-11 08:20:07 -05:00
  • c9ad762f36 Switch to C++14 [[deprecated]] annotation FeRD (Frank Dana) 2021-11-11 07:04:26 -05:00
  • e11b9434cf Docs: Fix doc ambiguities when matching functions FeRD (Frank Dana) 2021-11-11 07:03:10 -05:00
  • 9aa9e70b41 Unexclude headers FeRD (Frank Dana) 2021-11-11 07:02:19 -05:00
  • 11bfccc581 Audio effects: Clean up doc comments, parameters FeRD (Frank Dana) 2021-11-11 06:28:52 -05:00
  • ce895cc86f Docs: Fix image paths, more PREDEFINED FeRD (Frank Dana) 2021-11-11 05:14:40 -05:00
  • 1686842eb6 Docs: Switch to doxygen_add_docs() FeRD (Frank Dana) 2021-11-11 05:14:40 -05:00
  • e4769eba14 Merge pull request #776 from OpenShot/revert-613-new-docs Jonathan Thomas 2021-11-10 22:56:41 -06:00
  • e085397cc1 Revert "Docs: Switch from UseDoxygen to doxygen_add_docs" Jonathan Thomas 2021-11-10 22:52:51 -06:00
  • 8a87784f45 Merge pull request #775 from OpenShot/revert-673-develop Jonathan Thomas 2021-11-10 22:51:01 -06:00
  • e598d82e83 Revert "fix cmake instructions using '-d' argument in MacOs" Jonathan Thomas 2021-11-10 22:50:17 -06:00
  • 5ed6929a88 ImageWriter: Fix includes FeRD (Frank Dana) 2021-11-10 23:33:27 -05:00
  • f8a73791a1 Merge branch 'develop' into move-magick-code Frank Dana 2021-11-10 23:26:27 -05:00
  • 5adf45ab90 Merge pull request #768 from ferdnyc/fraction-operators Jonathan Thomas 2021-11-10 22:20:11 -06:00
  • 6b2ca8aa80 Merge pull request #746 from jeffski/decide-content Jonathan Thomas 2021-11-10 22:16:01 -06:00
  • dab4568f33 Merge pull request #730 from ferdnyc/chromakey-unit Jonathan Thomas 2021-11-10 22:15:02 -06:00
  • 9c4a98a1cd Merge pull request #704 from ferdnyc/py_message Jonathan Thomas 2021-11-10 22:13:57 -06:00
  • 9c11729664 Merge pull request #673 from wasimafser/develop Jonathan Thomas 2021-11-10 22:08:57 -06:00
  • ed70b57238 Merge pull request #613 from ferdnyc/new-docs Jonathan Thomas 2021-11-10 22:07:08 -06:00
  • e1f75637ac Merge pull request #774 from ferdnyc/pre-juce612 Jonathan Thomas 2021-11-10 21:37:46 -06:00
  • 59108504e3 Code changes for compatibility with JUCE 6.x FeRD (Frank Dana) 2021-10-27 14:34:05 -04:00
  • ef535c859d ChromaKey: Replace juce math with cmath std:: fxns FeRD (Frank Dana) 2021-11-09 03:37:08 -05:00
  • a6f3547af4 Enums.h: Unindent FeRD (Frank Dana) 2021-10-27 14:34:05 -04:00
  • 42344a5d7f Merge pull request #773 from OpenShot/max-sleept-time Jonathan Thomas 2021-11-08 14:43:47 -06:00
  • 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) Jonathan Thomas 2021-11-04 17:33:14 -05:00
  • aee3a44b5b CI: Avoid always recompiling Resvg (#772) Frank Dana 2021-11-03 09:13:13 -04:00
  • 5662f15321 tests/QtImageReader: Fix indents FeRD (Frank Dana) 2021-11-03 06:57:31 -04:00
  • cff2109316 tests/ImageWriter: Increase coverage FeRD (Frank Dana) 2021-11-03 06:57:14 -04:00
  • 83133a80a4 tests/ChromaKey: Add license indentifiers FeRD (Frank Dana) 2021-11-02 14:04:14 -04:00
  • be20f9b343 Merge branch 'develop' into chromakey-unit Frank Dana 2021-11-02 14:02:45 -04:00
  • 1c5e9dbe38 TimelineBase: Add virtual defaulted destructor FeRD (Frank Dana) 2021-11-02 13:19:04 -04:00
  • 5da5adc3f8 Move ImageMagick code out of Frame class FeRD (Frank Dana) 2021-11-02 09:12:23 -04:00
  • f7cebb7f22 Merge pull request #767 from troyrollo/imagemagick-cassert-error-workaround Frank Dana 2021-11-02 06:37:28 -04:00
  • fe58e8028d Move some headers around FeRD (Frank Dana) 2021-11-01 11:04:31 -04:00
  • 233d555052 Avoid a bug in ImageMagick or cassert headers Troy Rollo 2021-10-31 10:48:51 +11:00
  • 974df9961a CI: Fix Resvg branch selection (#770) Frank Dana 2021-10-31 19:22:55 -04:00
  • 2a0076ca8f tests/Crop: Add license metadata (#769) Frank Dana 2021-10-31 10:04:51 -04:00
  • eab4b3e469 Merge branch 'crop-license-tag' into fraction-operators FeRD (Frank Dana) 2021-10-31 09:33:57 -04:00
  • a8ec79f64a tests/Crop: Add license metadata FeRD (Frank Dana) 2021-10-31 09:31:42 -04:00