Commit Graph

53 Commits

Author SHA1 Message Date
Jonathan Thomas
c7b36d9215 Slight refactor to our Python swig bindings to better support Arm64 pointer address space (required for Android) 2026-02-03 11:20:12 -06:00
Jonathan Thomas
44f92a0387 Improving swig to wrap pointers as PyLong_AsVoidPtr - to avoid Android memory addresses overflowing as an int. 2026-02-02 21:14:01 -06:00
Jonathan Thomas
23b4e748ea Improving swig bindings for Python, Java, and Ruby for access direct pixel byte array:
Example Code Snippets:
Python:
import openshot

r = openshot.FFmpegReader("/home/jonathan/Pictures/ChatGPT Image Mar 27, 2025, 09_50_56 AM.png")
r.Open()
f = r.GetFrame(1)
buf = f.GetPixelsBytes()
w, h = f.GetWidth(), f.GetHeight()
stride = f.GetBytesPerLine()

Ruby:
require "openshot"

r = Openshot::FFmpegReader.new("/home/jonathan/Pictures/ChatGPT Image Mar 27, 2025, 09_50_56 AM.png")
r.Open()
f = r.GetFrame(1)
buf = f.GetPixelsBytes
w = f.GetWidth
h = f.GetHeight
stride = f.GetBytesPerLine
2025-12-22 13:46:41 -06:00
Jonathan Thomas
3f60f601ca Take 2: Trying again to fix the python fallback directory detection for Launchpad build servers 2025-12-16 23:23:07 -06:00
Jonathan Thomas
353e6ae4f1 Changing python install detected folder, to be relative folder. This is breaking on some build servers, due to returning an absolute path that is installed outside of the install prefix. 2025-12-16 21:05:23 -06:00
Jonathan Thomas
68d3850efa Exposing VideoCacheThread to SWIG bindings for Python, Ruby, and Java. This will be called from openshot-qt in Python, to speed up exports. 2025-06-06 15:33:43 -05:00
Jonathan Thomas
d26ef4dcbb Merge branch 'develop' into lens-flare 2025-05-28 20:34:51 -05:00
Jonathan Thomas
3db2fe14fb Adding unit tests for Lens Flare effect, and adding effect to Python SWIG bindings 2025-05-28 17:40:47 -05:00
Jonathan Thomas
6a2f4f539f Adding missing effects to .i swig files 2025-05-25 23:29:50 -05:00
Jonathan Thomas
5c52be24c9 Fix Python install path detection for compatibility with Python 3.12+ 2025-05-05 20:08:58 -05:00
HaiVQ
cd887c7e8e Add Outline effect class and integrate into OpenShot 2024-12-10 17:13:34 +07:00
Jonathan Thomas
178cae48b7 Expose the Profile operators to SWIG for comparison 2024-10-10 12:46:16 -05:00
Jonathan Thomas
c838c126ad Improvements to AudioWaveformer to use RMS (Root Mean Square), and return both average RMS and max RMS for graphing, including some new unit tests. 2022-11-01 15:17:03 -05:00
Jonathan Thomas
9cd7dd68a8 Wrap vector<float> in Swig mappings, and enable thread-safe access to swig wrappers - so our long running waveformer does not block the Python GIL 2022-10-31 14:20:18 -05:00
Jonathan Thomas
2326532820 Initial commit of AudioWaveformer class, which is designed to iterate any ReaderBase, and return a reduced "average" sample set - more useful for generating waveforms - for example, reduce a 44100 samples per second down to 20 samples per second. 2022-10-30 22:04:19 -05:00
Frank Dana
d909eccdf6 python/openshot.i: Convert to 4-space indents (#820) 2022-04-03 00:45:08 -04:00
Jonathan Thomas
9eda757885 Merge branch 'develop' into audio-devices
# Conflicts:
#	src/AudioBufferSource.cpp
#	src/AudioReaderSource.cpp
#	src/AudioReaderSource.h
#	src/Clip.cpp
#	src/Frame.cpp
#	src/Qt/AudioPlaybackThread.h
#	src/audio_effects/Compressor.h
#	src/audio_effects/Delay.h
#	src/audio_effects/Echo.h
#	src/audio_effects/Expander.h
2021-12-02 22:05:19 -06:00
Jonathan Thomas
5adf45ab90 Merge pull request #768 from ferdnyc/fraction-operators
Fraction: Operators for direct autoconverting multiplication and division, in both C++ and Python
2021-11-10 22:20:11 -06:00
Jonathan Thomas
9c4a98a1cd Merge pull request #704 from ferdnyc/py_message
Exceptions: Add py_message() for Python
2021-11-10 22:13:57 -06:00
FeRD (Frank Dana)
59108504e3 Code changes for compatibility with JUCE 6.x
- Replace all juce::CriticalSection with std::recursive_mutex
- Replace all juce::AudioSampleBuffer with juce::AudioBuffer<float>
- Eliminate implicit reliance on 'using namespace juce;'
- Replace OpenShotAudio.h includes with targeted juce modules
2021-11-09 06:22:25 -05:00
FeRD (Frank Dana)
397db7ba31 Fraction: Python operators, formatter
- Equivalents of operator* and operator/ templates are provided
  by implemening `__mul__`, `__rmul__`, __truediv__`, `__rtruediv__`
  in Python code for `openshot.Fraction` class
- An implementation of `__format__` is also provided, allowing
  numeric format strings to be used directly on Fraction objects,
  e.g. `v = Fraction(3, 9); print(f"{v:0.3f}")  # prints '0.333'`
2021-10-31 07:52:12 -04:00
Frank Dana
2d2a062bdc Remove (broken) BlackMagic DeckLink support (#760) 2021-10-20 06:49:08 -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
FeRD (Frank Dana)
76fb7c8013 Rename AudioSampleBuffer to AudioBuffer<float>
For a long time now, juce::AudioSampleBuffer has been nothing but an
alias for its true (templated) type, AudioBuffer<float>.
2021-08-24 13:11:00 -04:00
FeRD (Frank Dana)
b39ff359ad Exceptions: Add py_message() for Python
- Most exceptions are now based on two new base classes,
  FileExceptionBase and FrameExceptionBase.
- All exception classes now export a `py_message()` method
  (inherited or defined) which constructs a message for Python
  that includes **all** arguments to the exception, not just
  the why() text.
- Python's exception handling is updated to catch
  openshot::ExceptionBase and display py_message() instead of why()
- (I didn't modify why() because it returns char*; py_message()
  returns a std::string.)
2021-07-12 22:47:43 -04:00