2015-08-24 23:49:45 -05:00
|
|
|
/* ####################### src/openshot.i (libopenshot) ########################
|
2014-04-10 22:38:01 -05:00
|
|
|
# @brief SWIG configuration for libopenshot (to generate Ruby SWIG bindings)
|
|
|
|
|
# @author Jonathan Thomas <jonathan@openshot.org>
|
|
|
|
|
#
|
|
|
|
|
# @section LICENSE
|
|
|
|
|
#
|
2019-06-11 06:48:32 -04:00
|
|
|
# Copyright (c) 2008-2019 OpenShot Studios, LLC
|
2014-04-10 22:38:01 -05:00
|
|
|
# <http://www.openshotstudios.com/>. This file is part of
|
2019-08-05 02:19:52 -04:00
|
|
|
# OpenShot Library (libopenshot), an open-source project dedicated to
|
|
|
|
|
# delivering high quality video editing and animation solutions to the
|
2014-04-10 22:38:01 -05:00
|
|
|
# world. For more information visit <http://www.openshot.org/>.
|
|
|
|
|
#
|
|
|
|
|
# OpenShot Library (libopenshot) is free software: you can redistribute it
|
2014-07-11 16:52:14 -05:00
|
|
|
# and/or modify it under the terms of the GNU Lesser General Public License
|
2014-04-10 22:38:01 -05:00
|
|
|
# as published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# OpenShot Library (libopenshot) is distributed in the hope that it will be
|
|
|
|
|
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2014-07-11 16:52:14 -05:00
|
|
|
# GNU Lesser General Public License for more details.
|
2014-04-10 22:38:01 -05:00
|
|
|
#
|
2014-07-11 16:52:14 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
2014-04-10 22:38:01 -05:00
|
|
|
# along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
|
2015-08-24 23:49:45 -05:00
|
|
|
################################################################################ */
|
2014-04-10 22:38:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%module openshot
|
|
|
|
|
|
2019-07-12 13:28:47 -04:00
|
|
|
/* Suppress warnings about ignored operator= */
|
|
|
|
|
%warnfilter(362);
|
|
|
|
|
|
2019-09-28 21:43:59 -04:00
|
|
|
/* Don't generate multiple wrappers for functions with default args */
|
|
|
|
|
%feature("compactdefaultargs", "1");
|
|
|
|
|
|
2014-04-10 22:38:01 -05:00
|
|
|
/* Enable inline documentation */
|
|
|
|
|
%feature("autodoc", "1");
|
|
|
|
|
|
|
|
|
|
/* Include various SWIG helpers */
|
|
|
|
|
%include "typemaps.i"
|
|
|
|
|
%include "std_string.i"
|
|
|
|
|
%include "std_list.i"
|
|
|
|
|
%include "std_vector.i"
|
2018-02-03 01:57:18 -06:00
|
|
|
%include "std_map.i"
|
2014-04-10 22:38:01 -05:00
|
|
|
|
|
|
|
|
/* Unhandled STL Exception Handling */
|
|
|
|
|
%include <std_except.i>
|
|
|
|
|
|
|
|
|
|
namespace std {
|
|
|
|
|
template<class T> class shared_ptr {
|
|
|
|
|
public:
|
|
|
|
|
T *operator->();
|
|
|
|
|
};
|
2017-10-24 16:20:10 -05:00
|
|
|
}
|
2014-04-10 22:38:01 -05:00
|
|
|
|
|
|
|
|
/* Mark these classes as shared_ptr classes */
|
2016-02-23 01:24:13 -06:00
|
|
|
#ifdef USE_IMAGEMAGICK
|
2017-08-20 17:37:39 -05:00
|
|
|
%template(SPtrImage) std::shared_ptr<Magick::Image>;
|
2016-02-23 01:24:13 -06:00
|
|
|
#endif
|
2017-08-20 17:37:39 -05:00
|
|
|
%template(SPtrAudioBuffer) std::shared_ptr<juce::AudioSampleBuffer>;
|
|
|
|
|
%template(SPtrOpenFrame) std::shared_ptr<openshot::Frame>;
|
2014-04-10 22:38:01 -05:00
|
|
|
|
|
|
|
|
%{
|
2019-01-26 11:53:08 -05:00
|
|
|
/* Ruby and FFmpeg define competing RSHIFT macros,
|
|
|
|
|
* so we move Ruby's out of the way for now. We'll
|
|
|
|
|
* restore it after dealing with FFmpeg's
|
|
|
|
|
*/
|
|
|
|
|
#ifdef RSHIFT
|
|
|
|
|
#define RB_RSHIFT(a, b) RSHIFT(a, b)
|
|
|
|
|
#undef RSHIFT
|
|
|
|
|
#endif
|
2019-07-01 12:24:50 -05:00
|
|
|
#include "OpenShotVersion.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
#include "../../../include/ReaderBase.h"
|
|
|
|
|
#include "../../../include/WriterBase.h"
|
2016-08-31 02:02:54 -05:00
|
|
|
#include "../../../include/CacheBase.h"
|
2016-09-07 00:40:01 -05:00
|
|
|
#include "../../../include/CacheDisk.h"
|
2016-08-31 23:57:06 -05:00
|
|
|
#include "../../../include/CacheMemory.h"
|
2015-06-01 00:20:14 -07:00
|
|
|
#include "../../../include/ChannelLayouts.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
#include "../../../include/ChunkReader.h"
|
|
|
|
|
#include "../../../include/ChunkWriter.h"
|
|
|
|
|
#include "../../../include/ClipBase.h"
|
|
|
|
|
#include "../../../include/Clip.h"
|
|
|
|
|
#include "../../../include/Coordinate.h"
|
|
|
|
|
#include "../../../include/Color.h"
|
|
|
|
|
#include "../../../include/DummyReader.h"
|
|
|
|
|
#include "../../../include/EffectBase.h"
|
|
|
|
|
#include "../../../include/Effects.h"
|
2015-08-06 20:01:34 -05:00
|
|
|
#include "../../../include/EffectInfo.h"
|
2015-10-02 18:22:10 -05:00
|
|
|
#include "../../../include/Enums.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
#include "../../../include/Exceptions.h"
|
|
|
|
|
#include "../../../include/FFmpegReader.h"
|
|
|
|
|
#include "../../../include/FFmpegWriter.h"
|
|
|
|
|
#include "../../../include/Fraction.h"
|
|
|
|
|
#include "../../../include/Frame.h"
|
|
|
|
|
#include "../../../include/FrameMapper.h"
|
|
|
|
|
#include "../../../include/PlayerBase.h"
|
|
|
|
|
#include "../../../include/Point.h"
|
2014-04-11 00:28:29 -05:00
|
|
|
#include "../../../include/Profiles.h"
|
2019-08-14 10:21:57 -04:00
|
|
|
#include "../../../include/QtHtmlReader.h"
|
2015-06-01 00:20:14 -07:00
|
|
|
#include "../../../include/QtImageReader.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
#include "../../../include/QtPlayer.h"
|
2019-08-14 10:21:57 -04:00
|
|
|
#include "../../../include/QtTextReader.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
#include "../../../include/KeyFrame.h"
|
|
|
|
|
#include "../../../include/RendererBase.h"
|
2019-01-09 16:50:40 -06:00
|
|
|
#include "../../../include/Settings.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
#include "../../../include/Timeline.h"
|
2016-04-04 23:09:18 -05:00
|
|
|
#include "../../../include/ZmqLogger.h"
|
2019-04-23 16:45:02 -05:00
|
|
|
#include "../../../include/AudioDeviceInfo.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
|
2019-01-26 11:53:08 -05:00
|
|
|
/* Move FFmpeg's RSHIFT to FF_RSHIFT, if present */
|
|
|
|
|
#ifdef RSHIFT
|
|
|
|
|
#define FF_RSHIFT(a, b) RSHIFT(a, b)
|
|
|
|
|
#undef RSHIFT
|
|
|
|
|
#endif
|
|
|
|
|
/* And restore Ruby's RSHIFT, if we captured it */
|
|
|
|
|
#ifdef RB_RSHIFT
|
|
|
|
|
#define RSHIFT(a, b) RB_RSHIFT(a, b)
|
|
|
|
|
#endif
|
2014-04-10 22:38:01 -05:00
|
|
|
%}
|
|
|
|
|
|
|
|
|
|
#ifdef USE_BLACKMAGIC
|
|
|
|
|
%{
|
|
|
|
|
#include "../../../include/DecklinkReader.h"
|
|
|
|
|
#include "../../../include/DecklinkWriter.h"
|
|
|
|
|
%}
|
|
|
|
|
#endif
|
|
|
|
|
|
2016-02-23 00:27:03 -06:00
|
|
|
#ifdef USE_IMAGEMAGICK
|
|
|
|
|
%{
|
|
|
|
|
#include "../../../include/ImageReader.h"
|
|
|
|
|
#include "../../../include/ImageWriter.h"
|
|
|
|
|
#include "../../../include/TextReader.h"
|
|
|
|
|
%}
|
|
|
|
|
#endif
|
2014-04-10 22:38:01 -05:00
|
|
|
|
2019-07-01 12:24:50 -05:00
|
|
|
%include "OpenShotVersion.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/ReaderBase.h"
|
|
|
|
|
%include "../../../include/WriterBase.h"
|
2016-08-31 02:02:54 -05:00
|
|
|
%include "../../../include/CacheBase.h"
|
2016-09-07 00:40:01 -05:00
|
|
|
%include "../../../include/CacheDisk.h"
|
2016-08-31 23:57:06 -05:00
|
|
|
%include "../../../include/CacheMemory.h"
|
2015-06-01 00:20:14 -07:00
|
|
|
%include "../../../include/ChannelLayouts.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/ChunkReader.h"
|
|
|
|
|
%include "../../../include/ChunkWriter.h"
|
|
|
|
|
%include "../../../include/ClipBase.h"
|
|
|
|
|
%include "../../../include/Clip.h"
|
|
|
|
|
%include "../../../include/Coordinate.h"
|
|
|
|
|
%include "../../../include/Color.h"
|
|
|
|
|
#ifdef USE_BLACKMAGIC
|
|
|
|
|
%include "../../../include/DecklinkReader.h"
|
|
|
|
|
%include "../../../include/DecklinkWriter.h"
|
|
|
|
|
#endif
|
|
|
|
|
%include "../../../include/DummyReader.h"
|
|
|
|
|
%include "../../../include/EffectBase.h"
|
2015-08-06 20:01:34 -05:00
|
|
|
%include "../../../include/Effects.h"
|
|
|
|
|
%include "../../../include/EffectInfo.h"
|
2015-10-02 18:22:10 -05:00
|
|
|
%include "../../../include/Enums.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/Exceptions.h"
|
2019-01-26 11:53:08 -05:00
|
|
|
|
|
|
|
|
/* Ruby and FFmpeg define competing RSHIFT macros,
|
|
|
|
|
* so we move Ruby's out of the way for now. We'll
|
|
|
|
|
* restore it after dealing with FFmpeg's
|
|
|
|
|
*/
|
|
|
|
|
#ifdef RSHIFT
|
|
|
|
|
#define RB_RSHIFT(a, b) RSHIFT(a, b)
|
|
|
|
|
#undef RSHIFT
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/FFmpegReader.h"
|
|
|
|
|
%include "../../../include/FFmpegWriter.h"
|
2019-01-26 11:53:08 -05:00
|
|
|
|
|
|
|
|
/* Move FFmpeg's RSHIFT to FF_RSHIFT, if present */
|
|
|
|
|
#ifdef RSHIFT
|
|
|
|
|
#define FF_RSHIFT(a, b) RSHIFT(a, b)
|
|
|
|
|
#undef RSHIFT
|
|
|
|
|
#endif
|
|
|
|
|
/* And restore Ruby's RSHIFT, if we captured it */
|
|
|
|
|
#ifdef RB_RSHIFT
|
|
|
|
|
#define RSHIFT(a, b) RB_RSHIFT(a, b)
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/Fraction.h"
|
|
|
|
|
%include "../../../include/Frame.h"
|
|
|
|
|
%include "../../../include/FrameMapper.h"
|
|
|
|
|
%include "../../../include/PlayerBase.h"
|
|
|
|
|
%include "../../../include/Point.h"
|
2014-04-11 00:28:29 -05:00
|
|
|
%include "../../../include/Profiles.h"
|
2019-08-14 10:21:57 -04:00
|
|
|
%include "../../../include/QtHtmlReader.h"
|
2015-06-01 00:20:14 -07:00
|
|
|
%include "../../../include/QtImageReader.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/QtPlayer.h"
|
2019-08-14 10:21:57 -04:00
|
|
|
%include "../../../include/QtTextReader.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/KeyFrame.h"
|
|
|
|
|
%include "../../../include/RendererBase.h"
|
2019-01-09 16:50:40 -06:00
|
|
|
%include "../../../include/Settings.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/Timeline.h"
|
2016-04-04 23:09:18 -05:00
|
|
|
%include "../../../include/ZmqLogger.h"
|
2019-04-23 16:45:02 -05:00
|
|
|
%include "../../../include/AudioDeviceInfo.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
|
2016-02-23 00:27:03 -06:00
|
|
|
#ifdef USE_IMAGEMAGICK
|
|
|
|
|
%include "../../../include/ImageReader.h"
|
|
|
|
|
%include "../../../include/ImageWriter.h"
|
|
|
|
|
%include "../../../include/TextReader.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-02-09 02:37:05 -06:00
|
|
|
|
2014-04-10 22:38:01 -05:00
|
|
|
/* Effects */
|
2018-02-09 02:37:05 -06:00
|
|
|
%include "../../../include/effects/Bars.h"
|
2015-11-09 00:12:21 -06:00
|
|
|
%include "../../../include/effects/Blur.h"
|
2015-08-16 22:58:07 -05:00
|
|
|
%include "../../../include/effects/Brightness.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/effects/ChromaKey.h"
|
2018-03-03 18:02:14 -06:00
|
|
|
%include "../../../include/effects/ColorShift.h"
|
2018-03-05 02:12:37 -06:00
|
|
|
%include "../../../include/effects/Crop.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/effects/Deinterlace.h"
|
2018-02-06 02:26:35 -06:00
|
|
|
%include "../../../include/effects/Hue.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
%include "../../../include/effects/Mask.h"
|
|
|
|
|
%include "../../../include/effects/Negate.h"
|
2018-02-09 16:43:43 -06:00
|
|
|
%include "../../../include/effects/Pixelate.h"
|
2015-08-16 22:58:07 -05:00
|
|
|
%include "../../../include/effects/Saturation.h"
|
2018-02-06 00:51:59 -06:00
|
|
|
%include "../../../include/effects/Shift.h"
|
2018-02-08 03:51:32 -06:00
|
|
|
%include "../../../include/effects/Wave.h"
|
2014-04-10 22:38:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Wrap std templates (list, vector, etc...) */
|
2019-08-05 02:19:52 -04:00
|
|
|
%template(ClipList) std::list<openshot::Clip *>;
|
|
|
|
|
%template(EffectBaseList) std::list<openshot::EffectBase *>;
|
|
|
|
|
%template(CoordinateVector) std::vector<openshot::Coordinate>;
|
|
|
|
|
%template(PointsVector) std::vector<openshot::Point>;
|
|
|
|
|
%template(FieldVector) std::vector<openshot::Field>;
|
|
|
|
|
%template(MappedFrameVector) std::vector<openshot::MappedFrame>;
|
|
|
|
|
%template(MappedMetadata) std::map<std::string, std::string>;
|
|
|
|
|
%template(AudioDeviceInfoVector) std::vector<openshot::AudioDeviceInfo>;
|