Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Swig Support (org.openshot package + wrap shared pointers) #985

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bindings/java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ message(STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot)

### Set the swig package name for the JAR
set_source_files_properties(openshot.i PROPERTIES
SWIG_FLAGS "-package;org.openshot"
)

### Suppress a ton of warnings in the generated SWIG C++ code
set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \
-Wno-deprecated-copy -Wno-class-memaccess -Wno-cast-function-type \
Expand Down
8 changes: 4 additions & 4 deletions bindings/java/openshot.i
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
%include <std_except.i>

/* Include shared pointer code */
#%include <std_shared_ptr.i>
%include <std_shared_ptr.i>

/* Mark these classes as shared_ptr classes */
#ifdef USE_IMAGEMAGICK
#%shared_ptr(Magick::Image)
%shared_ptr(Magick::Image)
#endif
#%shared_ptr(juce::AudioBuffer<float>)
#%shared_ptr(openshot::Frame)
%shared_ptr(juce::AudioBuffer<float>)
%shared_ptr(openshot::Frame)

/* Instantiate the required template specializations */
%template() std::map<std::string, int>;
Expand Down
Loading