Commit Graph

2559 Commits

Author SHA1 Message Date
Frank Dana
d909eccdf6 python/openshot.i: Convert to 4-space indents (#820) 2022-04-03 00:45:08 -04:00
JacksonRG
04db6ce801 Merge pull request #817 from OpenShot/revert-815-fix-time-keyframes
Revert "Only map key numbers to time once"
2022-03-21 22:43:05 -05:00
JacksonRG
0bf991601d Revert "Only map key numbers to time once" 2022-03-21 19:23:35 -05:00
JacksonRG
a505443283 Merge pull request #815 from OpenShot/fix-time-keyframes
Only map key numbers to time once
2022-03-21 17:58:29 -05:00
Frank Dana
08b4975600 Replace av_init_packet in FFmpeg 3.2+ (#784) 2022-03-16 23:58:06 -04:00
Frank Dana
aee76211ac Merge pull request #809 from ferdnyc/drop-ffmpegw-fmt
FFmpegWriter: Macro & member cleanup, to build with newer releases
2022-03-16 23:03:26 -04:00
jackson
132c2df270 Only map key numbers to time once 2022-03-16 21:58:09 -05:00
Frank Dana
9adb94c384 Add CODEOWNERS file (#806) 2022-03-13 20:23:24 -04:00
dependabot[bot]
98d247563b Bump actions/checkout from 2 to 3 (#813)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-13 20:22:18 -04:00
Frank Dana
6c546408ca src/FFmpegWriter.cpp: Fix indents 2022-03-13 20:00:43 -04:00
Jonathan Thomas
f29ce40861 Merge pull request #812 from OpenShot/clip-silence-past-reader-length
Silence Clip's audio when requesting a Frame past the end of the reader
2022-03-03 16:10:20 -06:00
Jonathan Thomas
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. 2022-03-02 16:24:09 -06:00
Jonathan Thomas
5148f40246 Merge pull request #811 from OpenShot/make-cache-less-aggressive
Allow Caching on Initial 'Pause' (based on Timeline cache size)
2022-03-01 13:10:59 -06:00
Jonathan Thomas
8864bea8e9 Renaming variable for clarity 2022-03-01 13:00:53 -06:00
Jonathan Thomas
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. 2022-02-28 15:45:46 -06:00
Jonathan Thomas
d8cb71c544 Merge pull request #810 from OpenShot/make-cache-less-aggressive
Make Cache Less Aggressive
2022-02-25 15:09:38 -06:00
Jonathan Thomas
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. 2022-02-24 15:56:39 -06:00
FeRD (Frank Dana)
2a93c0c3bf FFmpegWriter: Don't use AVPicture (gone in 5.0) 2022-02-24 10:34:41 -05:00
FeRD (Frank Dana)
eac566f81f FFmpegWriter: Don't force deprecated stream member 2022-02-24 07:55:03 -05:00
FeRD (Frank Dana)
93debab7c4 FFmpegWriter: Macro & member cleanup
- The `fmt` class member, which was of type AVFormat*, was really
  just an unnecessary copy of `(AVFormatContext*)oc->oformat`.
  But we were ASSIGNING into its members, which we were definitely
  not supposed to be doing. (And in recent FFmpegs, now that
  `AVFormat` has been `const`d, we can't.) It's gone; now we just
  use `oc->oformat` anywhere we used to access `fmt`.

- The preprocessor macro to allocate a new _stream_ was a mess of
  cross purposes: It did allocate a stream, but then it also
  allocated a new AvCodecCtx on newer FFmpeg releases. Worse (and
  always galling to me), it proceeded to assign to a variable
  that WASN'T passed in to the macro, just taking it on faith that
  it would only be used where that variable was defined. That's
  just... ugh. So I broke it apart into two steps (stream creation
  and context allocation), realized the stream creation code was
  the same for all ffmpeg versions and didn't need to be a macro
  at all, and now a 4-parameter, 6-line magical macro has been
  replaced with a simple, zero-side-effect one-liner.

- I also cleaned up the add_video_stream() code to be more like
  the add_audio_stream() code, since they were bad-different for
  no discernible reason.
2022-02-24 07:29:08 -05:00
Jonathan Thomas
f2b89e3254 Merge pull request #796 from OpenShot/caching-timing-improvements
Caching & Playback Timing Improvements
2022-02-13 14:09:34 -06:00
Jonathan Thomas
fdb5e527fb Remove debugging code 2022-02-13 13:55:34 -06:00
Jonathan Thomas
34a6af2a8a Removing test.sh file 2022-02-13 11:01:41 -06:00
Jonathan Thomas
fbd0ecfc83 Merge branch 'develop' into caching-timing-improvements 2022-02-13 10:59:27 -06:00
Jonathan Thomas
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.
2022-02-12 13:31:21 -06:00