[vlc-devel] opencv4_patches opencv_wrapper
w.pelser
w.pelser at web.de
Mon Sep 23 16:41:08 CEST 2019
[vlc-devel] opencv4_patches opencv_wrapper
*Steve Lhomme* robux4 at ycbcr.xyz
<mailto:vlc-devel%40videolan.org?Subject=Re%3A%20%5Bvlc-devel%5D%20opencv4_patches%20opencv_wrapper&In-Reply-To=%3C5a2b66e4-ffd5-e85f-855b-76f6b19236ba%40ycbcr.xyz%3E>
/Mon Sep 23 12:48:30 CEST 2019/
* Previous message (by thread): [vlc-devel] opencv4_patches
opencv_wrapper
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/127618.html>
* *Messages sorted by:* [ date ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/date.html#127621>
[ thread ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/thread.html#127621>
[ subject ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/subject.html#127621>
[ author ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/author.html#127621>
------------------------------------------------------------------------
Hi,
On 2019-09-23 11:55, w.pelser wrote:
>//>//>//>//>//>//>//>//>//>/VLC and vlc-dev are not compatible with opencv4. />//>/- video_filter/opencv_example.cpp should be rewritten or excluded. It />/seems to require objectdetect_c.h, which is not longer part of opencv. />//>/- video_filter/opencv_wrapper.c needes to be converted to a cpp file, to />/enable cplusplus a.o. />//>/So I tried to do this with the help of the opencv_example.cpp file. My />/knowledge is very smal, but the following patches do not break my />/vlc-dev (git/videolan/vlc_branch_master) build anymore. />//>/opencv_wrapper_cpp.patch: />//>/--- a/modules/video_filter/opencv_wrapper.c />/+++ b/modules/video_filter/opencv_wrapper.c />/@@ -154 +154 @@ />/- p_sys = malloc( sizeof( filter_sys_t ) ); />/+ p_sys = (filter_sys_t *)malloc(sizeof (filter_sys_t)); />/@@ -167 +167 @@ />/- p_sys->p_opencv = vlc_object_create( p_filter, sizeof(filter_t) ); />/+ p_sys->p_opencv = (filter_t*) vlc_object_create( p_filter, />/sizeof(filter_t) ); />/@@ -266 +266 @@ />/- filter_sys_t *p_sys = p_filter->p_sys; />/+ filter_sys_t *p_sys = static_cast<filter_sys_t *>(p_filter->p_sys); />/@@ -281 +281 @@ />/- filter_sys_t* p_sys = p_filter->p_sys; />/+ filter_sys_t *p_sys = static_cast<filter_sys_t *>(p_filter->p_sys); />/@@ -317 +317 @@ />/- filter_sys_t* p_sys = p_filter->p_sys; />/+ filter_sys_t *p_sys = static_cast<filter_sys_t *>(p_filter->p_sys); />/@@ -402 +402 @@ />/- filter_sys_t *p_sys = p_filter->p_sys; />/+ filter_sys_t *p_sys = static_cast<filter_sys_t *>(p_filter->p_sys); />//>//>/configure_ac.patch: />//>/--- a/configure.ac />/+++ b/configure.ac />/@@ -2017 +2017 @@ />/-PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], />/[opencv > 2.0], (OpenCV (computer vision) filter), [auto]) />/+PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], />/[opencv4], (OpenCV (computer vision) filter), [auto]) />//>//>/video_filter_makefile_am.patch: />//>/--- a/modules/video_filter/Makefile.am />/+++ b/modules/video_filter/Makefile.am />/@@ -157 +157 @@ cpp-Version />/-libopencv_wrapper_plugin_la_SOURCES = video_filter/opencv_wrapper.c />/+libopencv_wrapper_plugin_la_SOURCES = video_filter/opencv_wrapper.cpp /
>It seems that you didn't rename the file in your patch so it shouldn't
>compile.
Yes, I renamed patched opencv_wrapper.c to opencv_wrapper.cpp. During build opencv_wrapper.c is buils as CC, opencv_wrapper.cpp is build as CXX. That's the point for me.
>As for C++ do you need it for linking ? Or do the API not work with C
>anymore ? In the former case you can just add dummy.cpp to you project
>and it will trigger the C++ handling of autotools.
The API does not work anymore with CC. See https://trac.videolan.org/vlc/ticket/22016 and the include lines always produce lots of fatal errors during build as CC.
My OS is openSUSE Tumbleweed, where opencv4 has become the default opencv-version. since then the trouble began. opencv3 is at its end and not developed further.
>/@@ -175,6+175,6 @@ objdetect_c.h missing, not provided by opencv4 />/-libopencv_example_plugin_la_SOURCES = video_filter/opencv_example.cpp />/video_filter/filter_event_info.h />/-libopencv_example_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENCV_CFLAGS) />/-libopencv_example_plugin_la_LIBADD = $(OPENCV_LIBS) />/-libopencv_example_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath />/'$(video_filterdir)' />/-video_filter_LTLIBRARIES += $(LTLIBopencv_example) />/-EXTRA_LTLIBRARIES += libopencv_example_plugin.la />/+#libopencv_example_plugin_la_SOURCES = video_filter/opencv_example.cpp />/video_filter/filter_event_info.h />/+#libopencv_example_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(OPENCV_CFLAGS) />/+#libopencv_example_plugin_la_LIBADD = $(OPENCV_LIBS) />/+#libopencv_example_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath />/'$(video_filterdir)' />/+#video_filter_LTLIBRARIES += $(LTLIBopencv_example) />/+#EXTRA_LTLIBRARIES += libopencv_example_plugin.la />//>/In the hope, this could be helpful, />//>/thanks />//>/walther />//>//>//>//>/_______________________________________________ />/vlc-devel mailing list />/To unsubscribe or modify your subscription options: />/https://mailman.videolan.org/listinfo/vlc-devel />//
------------------------------------------------------------------------
* Previous message (by thread): [vlc-devel] opencv4_patches
opencv_wrapper
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/127618.html>
* *Messages sorted by:* [ date ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/date.html#127621>
[ thread ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/thread.html#127621>
[ subject ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/subject.html#127621>
[ author ]
<https://mailman.videolan.org/pipermail/vlc-devel/2019-September/author.html#127621>
------------------------------------------------------------------------
More information about the vlc-devel mailing list
<https://mailman.videolan.org/listinfo/vlc-devel>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190923/7a9a8c7c/attachment.html>
More information about the vlc-devel
mailing list