<div dir="ltr"><div dir="ltr"><div>Thank you for the kind response, I appreciate you taking the time to read through my note.</div><div><br></div><div>In regards to the use of Nettle in the module, the Onvif specification requires a SHA1 hash for authentication.  Obviously, linking an entire library to use one function seems nonsensical, so several approaches were taken to isolate the function and establish independence.  These work reasonably well on Linux and macosx, however, Windows was problematic for some reason unknown.  Using Nettle was the only path I could find that worked on all platforms.</div><div><br></div><div>Regarding libxml2, I was surprised by the aversion to using this library, as it is pretty well known.  Going through the code I saw references to memory leaks and re-entrancy issues, which honestly, I have not encountered myself.  The vlc_xml module could certainly be used for generic xml functionality, however, the Onvif spec is anything but.</div><div><br></div><div>If you might indulge me briefly, the Onvif spec is a SOAP construct of the worst type of corporate buzzword programming.  The basic idea is to write a script describing the protocol and then generate source code using a SOAP compiler.  This ends up generating horrifically complex xml code that plumbs the depths of arcane and obscure xml syntax.  The end result, not surprisingly, is gigantic bloatware of marginal functionality.</div><div><br></div><div>To get around this problem, the xml code was generated by hand essentially by reverse engineering the protocol produced by the SOAP code.  This is an extremely tedious task and one I would not be in a position to replicate at this time.  </div><div><br></div><div>Having said all that, the extension of VLC with this functionality produces a very useful tool.  In addition to the Onvif Discovery module, I have a camera controls dialog as well that can manipulate camera parameters such as resolution, frame rate, PTZ, etc., pretty much the same functionality as Onvif Device Manager, if you are familiar with that program.  I have been using VLC in this configuration for some time and have been quite pleased with the result.   If you are interested, I am happy to send along the code for that as well.</div><div><br></div><div><br></div><div>Best regards,</div><div><br></div><div>Stephen Rhodes</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 4, 2019 at 9:52 AM Jean-Baptiste Kempf <<a href="mailto:jb@videolan.org">jb@videolan.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u><div><div>Hello,<br></div><div><br></div><div>On Sun, 3 Mar 2019, at 13:41, Stephen Rhodes wrote:<br></div><blockquote type="cite" id="gmail-m_5233297819756906159fastmail-quoted"><div dir="ltr"><div dir="ltr"><div>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. <br></div></div></div></blockquote><div><br></div><div>Before going to a review, thanks a lot, this is very useful and requested by users!<br></div><div><br></div><blockquote type="cite" id="gmail-m_5233297819756906159fastmail-quoted"><div dir="ltr"><div dir="ltr"><div> modification to the Makefile.am is required as well.  It has dependency on libxml2 and nettle.<br></div></div></div></blockquote><div><br></div><div>You should use vlc_xml.h header, instead of libxml.<br></div><div><br></div><div>What do you use nettle for?<br></div><div><br></div><div>Best,<br></div><div><br></div><blockquote type="cite" id="gmail-m_5233297819756906159fastmail-quoted"><div dir="ltr"><div dir="ltr"><div><br></div><div><div>diff --git a/modules/services_discovery/Makefile.am b/modules/services_discovery/Makefile.am<br></div><div>index efd9cf6..0d6f928 100644<br></div><div>--- a/modules/services_discovery/Makefile.am<br></div><div>+++ b/modules/services_discovery/Makefile.am<br></div><div>@@ -13,6 +13,14 @@ libsap_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_sap)<br></div><div> libsap_plugin_la_LIBADD = $(LIBS_sap) $(SOCKET_LIBS)<br></div><div> sd_LTLIBRARIES += <a href="http://libsap_plugin.la" target="_blank">libsap_plugin.la</a><br></div><div> <br></div><div>+libonvifdisc_plugin_la_SOURCES = services_discovery/onvifdisc.c services_discovery/onvif.c services_discovery/onvif.h<br></div><div>+libonvifdisc_plugin_la_CFLAGS = $(LIBXML2_CFLAGS) $(NETTLE_CFLAGS)<br></div><div>+libonvifdisc_plugin_la_LIBADD = $(LIBXML2_LIBS) $(NETTLE_LIBS)<br></div><div>+sd_LTLIBRARIES += <a href="http://libonvifdisc_plugin.la" target="_blank">libonvifdisc_plugin.la</a><br></div><div>+if HAVE_WIN32<br></div><div>+libonvifdisc_plugin_la_LIBADD += -liphlpapi<br></div><div>+endif<br></div><div>+<br></div><div> libavahi_plugin_la_SOURCES = services_discovery/avahi.c<br></div><div> libavahi_plugin_la_CFLAGS = $(AM_CFLAGS) $(AVAHI_CFLAGS)<br></div><div> libavahi_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(sddir)'<br></div></div><div><br></div><div>I'm hoping this module can be added to the official VLC distribution.  It has been well tested against a variety of cameras including<br></div><div><br></div><div>HIKVISION, DAHUA, AXIS, SUNBA, AMCREST, SPECO, TRENDNET, REOLINK, FOSCAM, UTALENT, VIVOTEK, HIKAM<br></div><div><br></div><div>Thank you for your consideration,<br></div><div><br></div><div>Stephen Rhodes<br></div></div><div>_______________________________________________<br></div></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div><a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div><div><br></div><div><b>Attachments:</b><br></div><ul><li>onvifdisc.c<br></li><li>onvif.c<br></li><li>onvif.h<br></li></ul></blockquote><div><br></div><div id="gmail-m_5233297819756906159sig60240713"><div class="gmail-m_5233297819756906159signature">--<br></div><div class="gmail-m_5233297819756906159signature">Jean-Baptiste Kempf -  President<br></div><div class="gmail-m_5233297819756906159signature">+33 672 704 734<br></div><div class="gmail-m_5233297819756906159signature"> <br></div><div class="gmail-m_5233297819756906159signature"><br></div></div><div><br></div></div>_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div>