diff options
author | Timothy Gu <timothygu99@gmail.com> | 2014-08-16 01:06:36 (GMT) |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2014-08-16 02:58:23 (GMT) |
commit | 71fbb5425000dde563bf9e5f3bae7b9816e938a2 (patch) | |
tree | 17df83c5eb60a88a25403a5a53e5b010406a23df | |
parent | 626b5ac24c725204c5d2a795e42a8e1408e231b5 (diff) | |
download | mxe-71fbb5425000dde563bf9e5f3bae7b9816e938a2.zip mxe-71fbb5425000dde563bf9e5f3bae7b9816e938a2.tar.gz mxe-71fbb5425000dde563bf9e5f3bae7b9816e938a2.tar.bz2 |
Add package vidstab
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
-rw-r--r-- | index.html | 4 | ||||
-rw-r--r-- | src/vidstab-1-lib-type.patch | 42 | ||||
-rw-r--r-- | src/vidstab-2-lib-type-fix.patch | 65 | ||||
-rw-r--r-- | src/vidstab-test.c | 34 | ||||
-rw-r--r-- | src/vidstab.mk | 31 |
5 files changed, 176 insertions, 0 deletions
@@ -2370,6 +2370,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre> <td class="website"><a href="https://www.gnu.org/software/vcdimager/">vcdimager</a></td> </tr> <tr> + <td class="package">vidstab</td> + <td class="website"><a href="http://public.hronopik.de/vid.stab/features.php?lang=en">vid.stab video stablizer</a></td> + </tr> + <tr> <td class="package">vigra</td> <td class="website"><a href="http://hci.iwr.uni-heidelberg.de/vigra">vigra</a></td> </tr> diff --git a/src/vidstab-1-lib-type.patch b/src/vidstab-1-lib-type.patch new file mode 100644 index 0000000..6fbf225 --- /dev/null +++ b/src/vidstab-1-lib-type.patch @@ -0,0 +1,42 @@ +This file is part of MXE. +See index.html for further information. + +This patch has been taken from: +https://github.com/georgmartius/vid.stab/pull/19 + +From 1b6d48225e6c0c2c04598782582c9a0f1ea1d8e4 Mon Sep 17 00:00:00 2001 +From: Timothy Gu <timothygu99@gmail.com> +Date: Fri, 8 Aug 2014 14:56:19 -0700 +Subject: [PATCH] Support changing lib type through BUILD_SHARED_LIBS + +--- + CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f310e4d..e9a2af4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,6 +12,9 @@ set(MINOR_VERSION 0) + set(PATCH_VERSION 0) + set(VIDSTAB_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}${PATCH_VERSION}) + ++option(BUILD_SHARED_LIBS "build shared libraries instead of static libraries" ++ ON) ++ + add_definitions( -Wall -O3 -g -Wno-pointer-sign -fPIC -std=gnu99) + # add_definitions( -Wall -O0 -g -Wno-pointer-sign ) + +@@ -43,8 +46,7 @@ set(HEADERS src/frameinfo.h src/transformtype.h src/libvidstab.h + + + # Create the vidstab library +-# add_library (vidstab STATIC ${SOURCES}) +-add_library (vidstab SHARED ${SOURCES}) ++add_library (vidstab ${SOURCES}) + + #set version of lib + set_target_properties(vidstab PROPERTIES SOVERSION ${MAJOR_VERSION}.${MINOR_VERSION}) +-- +2.0.3 + diff --git a/src/vidstab-2-lib-type-fix.patch b/src/vidstab-2-lib-type-fix.patch new file mode 100644 index 0000000..1a6f365 --- /dev/null +++ b/src/vidstab-2-lib-type-fix.patch @@ -0,0 +1,65 @@ +This file is part of MXE. +See index.html for further information. + +This patch has been taken from: +https://github.com/georgmartius/vid.stab/pull/20 + +From f06ce5b7ad4fc60ecf11b86059541c7dc321806c Mon Sep 17 00:00:00 2001 +From: Timothy Gu <timothygu99@gmail.com> +Date: Fri, 15 Aug 2014 17:58:49 -0700 +Subject: [PATCH] Fix if BUILD_SHARED_LIBS is OFF + +The option() disrupts toolchain files. + +Signed-off-by: Timothy Gu <timothygu99@gmail.com> +--- + CMakeLists.txt | 26 ++++++++++++-------------- + 1 file changed, 12 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e9a2af4..920a2da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,9 +12,6 @@ set(MINOR_VERSION 0) + set(PATCH_VERSION 0) + set(VIDSTAB_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}${PATCH_VERSION}) + +-option(BUILD_SHARED_LIBS "build shared libraries instead of static libraries" +- ON) +- + add_definitions( -Wall -O3 -g -Wno-pointer-sign -fPIC -std=gnu99) + # add_definitions( -Wall -O0 -g -Wno-pointer-sign ) + +@@ -48,17 +45,18 @@ set(HEADERS src/frameinfo.h src/transformtype.h src/libvidstab.h + # Create the vidstab library + add_library (vidstab ${SOURCES}) + +-#set version of lib +-set_target_properties(vidstab PROPERTIES SOVERSION ${MAJOR_VERSION}.${MINOR_VERSION}) +- +- +-target_link_libraries(vidstab m) +-if(ORC_FOUND) +-target_link_libraries(vidstab ${ORC_LIBRARIES}) +-endif() +-if(USE_OMP) +-target_link_libraries(vidstab gomp) +-endif() ++if(BUILD_SHARED_LIBS) ++ #set version of lib ++ set_target_properties(vidstab PROPERTIES SOVERSION ${MAJOR_VERSION}.${MINOR_VERSION}) ++ ++ target_link_libraries(vidstab m) ++ if(ORC_FOUND) ++ target_link_libraries(vidstab ${ORC_LIBRARIES}) ++ endif() ++ if(USE_OMP) ++ target_link_libraries(vidstab gomp) ++ endif() ++endif(BUILD_SHARED_LIBS) + + + #if(!NOHEADERS) +-- +2.0.3 + diff --git a/src/vidstab-test.c b/src/vidstab-test.c new file mode 100644 index 0000000..8c99149 --- /dev/null +++ b/src/vidstab-test.c @@ -0,0 +1,34 @@ +/* + * This file is part of MXE. + * See index.html for further information. + */ + +#include <vid.stab/libvidstab.h> + +int main(int argc, char *argv[]) +{ + VSFrameInfo fi; + VSMotionDetect md; + VSMotionDetectConfig conf; + + (void)argc; + (void)argv; + + conf.algo = 1; + conf.modName = "vidstabtest"; + conf.shakiness = 5; + conf.accuracy = 15; + conf.stepSize = 6; + conf.contrastThreshold = 0.25; + conf.show = 0; + conf.virtualTripod = 0; + + vsFrameInfoInit(&fi, 320, 240, PF_YUV420P); + + if (vsMotionDetectInit(&md, &conf, &fi) != VS_OK) + return 1; + + vsMotionDetectionCleanup(&md); + + return 0; +} diff --git a/src/vidstab.mk b/src/vidstab.mk new file mode 100644 index 0000000..83a549a --- /dev/null +++ b/src/vidstab.mk @@ -0,0 +1,31 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := vidstab +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.98b +$(PKG)_CHECKSUM := 1030a1baa9b2cba844758a6cd8dd5d5fc23f9cd9 +$(PKG)_SUBDIR := vid.stab-release-$($(PKG)_VERSION) +$(PKG)_FILE := vid.stab-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/georgmartius/vid.stab/archive/release-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://github.com/georgmartius/vid.stab/tags' | \ + grep '<a href="/georgmartius/vid.stab/archive/' | \ + $(SED) -n 's,.*href="/georgmartius/vid.stab/archive/release-\([0-9][^"]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + mkdir '$(1)/build' + cd '$(1)/build' && cmake .. \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + $(MAKE) -C '$(1)/build' -j $(JOBS) + $(MAKE) -C '$(1)/build' -j 1 install + + '$(TARGET)-gcc' \ + -W -Wall -Werror -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-vidstab.exe' \ + `'$(TARGET)-pkg-config' --static --cflags --libs vidstab` +endef
\ No newline at end of file |