[vlc-devel] New Serivces Discovery Module for Onvif Cameras
remi at remlab.net
Sun Mar 3 17:53:10 CET 2019
Le lauantaina 2. maaliskuuta 2019, 16.22.53 EET Stephen Rhodes a écrit :
> I have developed a services_discovery module for VLC that will find ip
> cameras on the local network that are onvif compatible using udp
> broadcast. It includes a setting for a default username and password on
> the preferences panel. This can be very useful for those who like to use
> VLC to work with ip cameras, as it will no longer be necessary to manually
> input the RTSP string.
> Three files are attached that are placed into the
> modules/services_discovery folder, onvifdisc.c, onvif.c and onvif.h. Some
> modification to the Makefile.am is required as well. It has dependency on
> libxml2 and nettle.
For code review, it is much preferable to submit the entire change in diff
format, even for new files.
> diff --git a/modules/services_discovery/Makefile.am
> index efd9cf6..0d6f928 100644
> --- a/modules/services_discovery/Makefile.am
> +++ b/modules/services_discovery/Makefile.am
> @@ -13,6 +13,14 @@ libsap_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_sap)
> libsap_plugin_la_LIBADD = $(LIBS_sap) $(SOCKET_LIBS)
> sd_LTLIBRARIES += libsap_plugin.la
> +libonvifdisc_plugin_la_SOURCES = services_discovery/onvifdisc.c
> services_discovery/onvif.c services_discovery/onvif.h
> +libonvifdisc_plugin_la_CFLAGS = $(LIBXML2_CFLAGS) $(NETTLE_CFLAGS)
> +libonvifdisc_plugin_la_LIBADD = $(LIBXML2_LIBS) $(NETTLE_LIBS)
Those variables are not set by the current build system. This won't work
without corresponding configure.ac changes.
> +sd_LTLIBRARIES += libonvifdisc_plugin.la
This plugin cannot be enabled blindly since it requires dependencies that are
currently considered optional.
> +if HAVE_WIN32
> +libonvifdisc_plugin_la_LIBADD += -liphlpapi
> libavahi_plugin_la_SOURCES = services_discovery/avahi.c
> libavahi_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)
> libavahi_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(sddir)'
> I'm hoping this module can be added to the official VLC distribution. It
> has been well tested against a variety of cameras including
> HIKVISION, DAHUA, AXIS, SUNBA, AMCREST, SPECO, TRENDNET, REOLINK, FOSCAM,
> UTALENT, VIVOTEK, HIKAM
> Thank you for your consideration,
> Stephen Rhodes
More information about the vlc-devel