diff --git a/bindings/python/openshot.i b/bindings/python/openshot.i index 67e38618..f468bc35 100644 --- a/bindings/python/openshot.i +++ b/bindings/python/openshot.i @@ -141,6 +141,16 @@ %template() std::pair; %template() std::pair; +/* Wrap std templates (list, vector, etc...) */ +%template(ClipList) std::list; +%template(EffectBaseList) std::list; +%template(CoordinateVector) std::vector; +%template(PointsVector) std::vector; +%template(FieldVector) std::vector; +%template(MappedFrameVector) std::vector; +%template(MetadataMap) std::map; +%template(AudioDeviceInfoVector) std::vector; + /* Make openshot.Fraction more Pythonic */ %extend openshot::Fraction { %{ @@ -311,12 +321,3 @@ #endif -/* Wrap std templates (list, vector, etc...) */ -%template(ClipList) std::list; -%template(EffectBaseList) std::list; -%template(CoordinateVector) std::vector; -%template(PointsVector) std::vector; -%template(FieldVector) std::vector; -%template(MappedFrameVector) std::vector; -%template(MetadataMap) std::map; -%template(AudioDeviceInfoVector) std::vector; diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index eaafcb1f..f0287091 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -126,10 +126,10 @@ Keyframe::Keyframe(double value) { } // Constructor which takes a vector of Points -Keyframe::Keyframe(const std::vector& points) : Points(points) {}; +Keyframe::Keyframe(const std::vector& points) : Points(points) {}; // Constructor which takes a vector of std::pair tuples (and adds them all) -Keyframe::Keyframe(const std::vector& coordinates) { +Keyframe::Keyframe(const std::vector& coordinates) { for (const auto& co : coordinates) { AddPoint(Point(co)); } diff --git a/src/KeyFrame.h b/src/KeyFrame.h index 7e912f6c..42dd47ae 100644 --- a/src/KeyFrame.h +++ b/src/KeyFrame.h @@ -62,8 +62,8 @@ namespace openshot { std::vector Points; ///< Vector of all Points public: - using CoordinateVector = std::vector; - using PointsVector = std::vector; + using CoordinateVec = std::vector; + using PointsVec = std::vector; /// Default constructor for the Keyframe class Keyframe() = default; @@ -72,10 +72,10 @@ namespace openshot { Keyframe(double value); /// Constructor which adds a supplied vector of Points - Keyframe(const PointsVector& points); + Keyframe(const PointsVec& points); /// Constructor which takes a vector of std::pair tuples - Keyframe(const CoordinateVector& coordinates); + Keyframe(const CoordinateVec& coordinates); /// Add a new point on the key-frame. Each point has a primary coordinate, a left handle, and a right handle. void AddPoint(Point p);