Commit Graph

49 Commits

Author SHA1 Message Date
Jonathan Thomas
09ce05bbf2 Many improvements for smooth audio playback when 'time' keyframes are used for time remapping.
- Added new Frame::ReverseAudio() helper method - for time keyframe support playing backwards audio
- Fixed math rounding error on time keyframe Resampler, to use the rounded source samples value
- Removed some unused args and Frame audio methods
- Reset FrameMapper resample context when non-adjacent frames are requested
- Correctly reverse Frame audio if a time keyframe is present, and reversing audio
- Rewrite Keyframe::IsIncreasing() function, to give accurate direction of time keyframes at any index (special logic to support first and last indexes)
- Fixed Keyframe unit tests - since logic has changed a bit
- Improved time mapping unit tests
- Replace many c-style casts with static_cast
- Added new sine.wav test file
2023-03-10 01:15:14 -06:00
Frank Dana
957d4f6a06 Fix class_name for Tracker and ObjectDetection (#827)
Effect class name is used when introspecting the available effects
for a given build of libopenshot, for example when extracting
translation strings for OpenShot. The EffectInfo::class_name member
needs to match the name of the class it describes, which two of ours
did not.

- ObjectDetection had its class name set to "Object Detector", which
  obviously isn't the class name.
- Tracker, worse, was allowing class_name to be **SET** from the
  JSON parameters passed to its SetJSON() method, making the class
  name mutable at the whim of the class's callers.
2022-06-17 15:30:08 -04:00
FeRD (Frank Dana)
7ac54f05cc Fold libopenshot_protobuf into libopenshot
- Move .proto files to src/ dir (not src/protobuf_messages)
- Generate protobuf files in src/CMakeLists.txt and include in
  'openshot' library target
- Don't install generated *.pb.h headers, which are now private
2021-10-17 23:31:02 -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
Brenno A. C. Caldato
461a0307a8 Merge pull request #674 from OpenShot/fix-saving
Changed JSON communication for detected objects
2021-05-19 11:56:20 -03:00
Brenno
e45b81bd7b Updated Json communication of Tracker effect 2021-05-11 12:12:35 -03:00
Frank Dana
d54e1aa673 Merge branch 'develop' into effect-parenting 2021-05-04 07:58:43 -04:00
Frank Dana
813c5175ca OpenCV: Adapt to API changes in OpenCV 4.5.2+ (#639)
* CVTracker: Handle API changes in OpenCV
The former cv::Tracker API we've been using is now cv::legacy::Tracker,
starting in OpenCV 4.5.1.

* CVTracker: Move some includes, add std:: prefixes

* Move ClipProcessingJobs into openshot NS

* OpenCV 4.5.1 message and auto-disabling

* Add fstream includes, explicit std:: namespace
Work around a MacOS bug where bare fstream resolves to the wrong class.

Co-authored-by: Brenno <brenno.caldato@gmail.com>
Co-authored-by: Brenno A. C. Caldato <BrennoCaldato@users.noreply.github.com>
2021-05-04 07:33:47 -04:00
Brenno
0b8481f335 Fixed aspect ratio and off-center displacement when attaching a clip to a tracked object 2021-04-20 23:09:07 -03:00
Brenno
f491d585fc Added author and added licence in ClipProcessingJobs 2021-04-20 23:07:23 -03:00
Brenno
5f853a3430 Fixed attaching a clip to Tracker and ObjectDetection
Some problems still persists
- Saved projects are not loading properly
- There is an aspect ratio issue when attaching an emoji to the ObjectDetection
2021-04-18 19:28:28 -03:00
Brenno
2cf2c55f9b Changed None to empty string, corrected dynamic pointers 2021-04-12 21:32:27 -03:00
FeRD (Frank Dana)
c8c92b5c5d Merge branch 'develop' into effect-parenting 2021-04-10 19:26:22 -04:00
Jonathan Thomas
a972995308 Removing some debug logging related to opencv effects 2021-04-08 22:36:28 -05:00
Brenno
c55efd1897 Added opacity to Tracker effect
Optimization improvements are still necessary
2021-03-28 15:55:22 -03:00
Brenno
4ea85ec859 Implemented Stroke width and background color for Tracker bounding boxes 2021-03-27 22:50:01 -03:00
Brenno
aa3068239d Fixed draw_box scope 2021-03-18 13:13:34 -03:00
Brenno
7272ff0928 Allow the user to hide the blue bounding box on the Tracker effect
This will still keep the child clip visible
2021-03-18 12:25:22 -03:00
Brenno
c60dd400c1 Updated JSON functions related to Tracked Objects 2021-02-04 15:57:30 -03:00
Brenno
d24c2e451c Added support to insert the image of a clip inside a Tracked Object 2021-02-04 15:45:33 -03:00
Brenno
2e47325c8f Added support to set the visibility of a Tracked Object
Added the property "Keyframe visible"  to TrackedObjectBase, so the user can set the Tracked Object to be visible or invisible  along the chosen frames.
2021-02-04 15:09:13 -03:00
Brenno
c0c2a82336 Merge branch 'develop' into keyframe-refactor 2021-02-01 14:22:41 -03:00
FeRD (Frank Dana)
be16403078 Add Exceptions.h include to new effects 2021-01-28 20:15:25 -05:00
Brenno
a94f09d105 ObjectDetection: updated object selection and transform handler
Removed the necessity to append the detected object index (related to the frame) to the effect JSON - which makes the JSON smaller and the performance better.
2021-01-27 17:18:23 -03:00
Brenno
d6e0acb0cb ObjectDetection: show object's icons and transform handlers per frame
Only show the tracked object's icon (on the mini-GUI to attach a clip to it) and transform handler if the object appears on the screen (i.e. it has data for the requested frame)
2021-01-22 20:03:05 -03:00