<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-forward-container">
      <table class="moz-email-headers-table" width="1" height="4"
        cellspacing="0" cellpadding="0" border="0">
        <tbody>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
          <tr>
            <th valign="BASELINE" nowrap="nowrap" align="RIGHT"><br>
            </th>
            <td><br>
            </td>
          </tr>
        </tbody>
      </table>
      VLC and vlc-dev are not compatible with opencv4.<br>
      <br>
      - video_filter/opencv_example.cpp should be rewritten or excluded.
      It seems to require objectdetect_c.h, which is not longer part of
      opencv.<br>
      <br>
      - video_filter/opencv_wrapper.c needes to be converted to a cpp
      file, to enable cplusplus a.o.<br>
      <br>
      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.<br>
      <br>
      opencv_wrapper_cpp.patch:<br>
      <br>
      --- a/modules/video_filter/opencv_wrapper.c<br>
      +++ b/modules/video_filter/opencv_wrapper.c<br>
      @@ -154 +154 @@<br>
      -    p_sys = malloc( sizeof( filter_sys_t ) );<br>
      +    p_sys = (filter_sys_t *)malloc(sizeof (filter_sys_t));<br>
      @@ -167 +167 @@<br>
      -    p_sys->p_opencv = vlc_object_create( p_filter,
      sizeof(filter_t) );<br>
      +    p_sys->p_opencv = (filter_t*) vlc_object_create( p_filter,
      sizeof(filter_t) );<br>
      @@ -266 +266 @@<br>
      -    filter_sys_t *p_sys = p_filter->p_sys;<br>
      +    filter_sys_t *p_sys = static_cast<filter_sys_t
      *>(p_filter->p_sys);<br>
      @@ -281 +281 @@<br>
      -    filter_sys_t* p_sys = p_filter->p_sys;<br>
      +    filter_sys_t *p_sys = static_cast<filter_sys_t
      *>(p_filter->p_sys);<br>
      @@ -317 +317 @@<br>
      -    filter_sys_t* p_sys = p_filter->p_sys;<br>
      +    filter_sys_t *p_sys = static_cast<filter_sys_t
      *>(p_filter->p_sys);<br>
      @@ -402 +402 @@<br>
      -    filter_sys_t *p_sys = p_filter->p_sys;<br>
      +    filter_sys_t *p_sys = static_cast<filter_sys_t
      *>(p_filter->p_sys);<br>
      <br>
      <br>
      configure_ac.patch:<br>
      <br>
      --- a/configure.ac<br>
      +++ b/configure.ac<br>
      @@ -2017 +2017 @@<br>
      -PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper],
      [opencv > 2.0], (OpenCV (computer vision) filter), [auto])<br>
      +PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper],
      [opencv4], (OpenCV (computer vision) filter), [auto])<br>
      <br>
      <br>
      video_filter_makefile_am.patch:<br>
      <br>
      --- a/modules/video_filter/Makefile.am<br>
      +++ b/modules/video_filter/Makefile.am<br>
      @@ -157 +157 @@ cpp-Version<br>
      -libopencv_wrapper_plugin_la_SOURCES =
      video_filter/opencv_wrapper.c<br>
      +libopencv_wrapper_plugin_la_SOURCES =
      video_filter/opencv_wrapper.cpp<br>
      @@ -175,6+175,6 @@ objdetect_c.h missing, not provided by opencv4<br>
      -libopencv_example_plugin_la_SOURCES =
      video_filter/opencv_example.cpp video_filter/filter_event_info.h<br>
      -libopencv_example_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
      $(OPENCV_CFLAGS)<br>
      -libopencv_example_plugin_la_LIBADD = $(OPENCV_LIBS)<br>
      -libopencv_example_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath
      '$(video_filterdir)'<br>
      -video_filter_LTLIBRARIES += $(LTLIBopencv_example)<br>
      -EXTRA_LTLIBRARIES += libopencv_example_plugin.la<br>
      +#libopencv_example_plugin_la_SOURCES =
      video_filter/opencv_example.cpp video_filter/filter_event_info.h<br>
      +#libopencv_example_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
      $(OPENCV_CFLAGS)<br>
      +#libopencv_example_plugin_la_LIBADD = $(OPENCV_LIBS)<br>
      +#libopencv_example_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath
      '$(video_filterdir)'<br>
      +#video_filter_LTLIBRARIES += $(LTLIBopencv_example)<br>
      +#EXTRA_LTLIBRARIES += libopencv_example_plugin.la<br>
      <br>
      In the hope, this could be helpful,<br>
      <br>
      thanks<br>
      <br>
      walther<br>
      <br>
      <br>
    </div>
  </body>
</html>