6 Commits

Author SHA1 Message Date
Andrea Bondavalli
0b27a6ee9e Minor changes 2020-06-04 10:26:42 -07:00
Andrea Bondavalli
0367dc33a0 MDNS client changed to avoid that multiple Avahi resolvers try to resolve the same name and domain simultaneously 2020-06-04 09:09:57 -07:00
Andrea Bondavalli
e05253d444 Additional set of changes to complete support for mDNS sources update via RTSP ANNOUNCE method as described by Ravenna.
The following changes enable support for RTCP client persistent connections used to receive RTSP server ANNOUNCE messages. These in turn update the remote sources in the Browser.
- added new process static method to RtspClient class to receive and update source SDP files via DESCRIBE and ANNOUNCE methods. This method can handle persistent connections with the RTSP server and triggers an observer callback when a source SDP file is received or updated. A map is used to track all active RTSP clients.
- added new stop and stop_all static methods to RtspClient class respectively to stop a specific RTCP client and to stop all clients.
- modified MDNSClient class to call RtspClient::process method when a new Ravenna service is added and the RtspClient::stop method when a service is removed. The RtspClient::stop_all method is called when the daemon terminates.
- modified Browser class to receive and handle remote RTSP sources SDP file add and change notifications. This class receives the updates via the RtspClient observer callback
- updated documentation
2020-06-02 10:56:44 -07:00
Andrea Bondavalli
0dbfe78a10 - Added support for mDNS/RTSP sources advertisement compatible with Ravenna standard.
- mDNS advertisement for all local Sources is implemented by mdns_server.[cpp,hpp] and based on Linux Avahi.
  - RTSP server implementation supports DESCRIBE method to return SDP of local Sources and supports persistent connection but doesn't provide service updates via UPDATE method.
- Modified RTSP client to browse for _ravenna_session subtype of _rtsp._tcp services only.
- Modified SAP and mDNS discovery to avoid returning local Sources advertised by the daemon.
- Added "rtsp_port" and "node_id" config parameters.
  - rtsp_port is a read/write parameter that contains the port of the RTSP server.
  - node_id is a read only parameter that contains the unique daemon identifier used in mDNS and SAP sources announcements.
- Modified session manager to check that every Source and Sink created by the user has a unique name.
- Modified WebUI to visualize node_id and to visualize and edit rtsp_port parameters in Config tab.
- Extended regression test to verify proper behaviour of mDNS/RTSP sources advertisement and discovery.
- Modified REST API to browse remote sources to allow browsing of SAP, mDNS and all sources via HTTP GET /api/browse/sources/[all|mdns|sap].
- Amended daemon documentation.
2020-04-23 11:45:58 -07:00
Andrea Bondavalli
0f8b9e714e Revised Avahi client integration in mDNS client:
- aligned state handling with avahi-browse tool: browser is started in client callback
- browsing is limited to IPv4 services discovered on the specific daemon network interface only
Additional minor changes.
2020-04-03 09:55:01 -07:00
Andrea Bondavalli
5deb6c1927 Added to the daemon the support for Multicast DNS (using Linux Avahi) to allow discovery of remote audio sources and of RTSP for SDP transfer.
Added to the WebUI the possibility to directly select a remote source SDP file for a Sink.

New files:
daemon/mdns_client.hpp,cpp -> mDNS client implementation using Avahi client library
daemon/rtsp_client.hpp,cpp -> RTSP client implementation used to transfer SDP file
daemon/utils.cpp -> used for common utility functions
.clang-format -> added clang-format configuration file

Modified files:
daemon/CMakeList.txt -> added support for Avahi and option WITH_AVAHI=[yes/no] to compile the daemon with or without Avahi mDNS support
daemon/config.hpp,cpp -> added configuration option mdns_enabled to enable or disable mDNS discovery at runtime
daemon/json.cpp -> extended JSON config with mdns_enabled option
daemon/browser.hpp,cpp -> added support for mDNS client to the browser
daemon/session_manager.cpp -> added support for RTSP protocol to Source URL field and fixed issue with SDP file parsing
webui/RemoteSources.js -> added visualization of mDNS remote sources
webui/SinkEdit.js -> added the possibility to directly select a remote source SDP file for a Sink
webui/SourceInfo.js -> added visualization of protocol source (SAP, mDNS or local) for a source
ubuntu-packages.sh -> added libavahi-client-dev to the list of required packages
build.sh -> added WITH_AVAHI=yes option when invoking CMake
README.md -> added notes about mDNS support via Avahi
daemon/README.md -> added notes about mDNS support via Avahi, support for RTSP protocol in source and new mdns_enabled config param

Additional minor changes to remaining files.
2020-03-29 19:41:56 +02:00