18 Commits

Author SHA1 Message Date
Andrea Bondavalli
21690a8589 Replace ip::address_v4::to_ulong() with ip::address_v4::to_uint() to support boost 1.87, see #197 2025-02-27 20:54:39 +01:00
Andrea Bondavalli
efcf95522b Replace ip::address::to_string() with ip::make_address() to support Boost 1.87, see #197 2025-02-27 20:06:17 +01:00
Andrea Bondavalli
1fc529b035 Removed addtional code smells 2023-02-26 10:06:04 +01:00
Andrea Bondavalli
7bf73823c6 Fixed a few minor bugs and removed some code smells 2023-02-25 22:33:55 +01:00
Andrea Bondavalli
429948bc6d Fix to #106 daemon browser doesn't receive mDNS/RTSP updates of a remote source 2023-01-14 12:00:38 +01:00
Andrea Bondavalli
acb1e55d08 Added RTSP client connection timeout of 5 secs. See issue #91 2022-08-20 11:12:05 +02:00
Andrea Bondavalli
7d6a8289d5 Fix to RtspClient::process() method to avoid ending up into an infinite loop in certain cases when the client gets stopped via RtspClient::stop() or RtspClient::stop_all() methods.
The bug was also preventing the daemon from terminating. It was possible to reproduce the problem using the add_remove_check_mdns_browser_update_all regression test.
2020-07-29 21:21:58 +02:00
Andrea Bondavalli
098cebd056 Applied Clang source code formatting to daemon sources 2020-06-16 21:14:44 +02:00
Andrea Bondavalli
e7cfaa1d99 Minor changes to code indentation 2020-06-14 05:30:58 -07:00
Andrea Bondavalli
7f2bd7f4f0 Fix to generation of Node ID based on get_node_id() utils function: if gethostid() uses the loopback address interface IPv4 we create a new ID based on the current interface IPv4
This fixes a problem on old Ubuntu distro causing the Node ID to be the same for multiple hosts.
Additional minor changes:
 - removed compilation warnings
 - some fixes to code indentation
2020-06-14 14:05:21 +02:00
Andrea Bondavalli
0b27a6ee9e Minor changes 2020-06-04 10:26:42 -07:00
Andrea Bondavalli
3a60c0492f Change to RTSP client to accept also an empty Content-Type.
In this case application/sdp is assumed.
2020-06-04 09:12:39 -07:00
Andrea Bondavalli
e348400246 Improved robustness of RTSP client removal handling 2020-06-02 14:10:36 -07:00
Andrea Bondavalli
267b97cbe7 Fix: added removal of RTSP client session if RTSP client connection closes 2020-06-02 12:31:40 -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
e9dd44fdb4 Minor changes 2020-04-10 13:01:36 -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