13 Commits

Author SHA1 Message Date
Andrea Bondavalli
7bf73823c6 Fixed a few minor bugs and removed some code smells 2023-02-25 22:33:55 +01:00
Andrea Bondavalli
046babca3d Added custom node id parameter to daemon and WebUI to allow for a user defined node id. See #73 2022-05-26 08:33:20 +02:00
Andrea Bondavalli
dbb593120a Enhancement of daemon reconfiguration and PTP status update notification via shell script. See #82
The daemon can apply a configuration change to the following parameters without a restart:
    sap_interval, syslog_proto, syslog_server, log_severity, sample_rate

The daemon can apply a configuration change to the following parameters without a light restart:
    http_port, rtsp_port, http_base_dir, rtp_mcast_base, sap_mcast_addr, rtp_port, rtp_port, status_file, interface_name, mdns_enabled

A light restart means that the configuration can be applied without interrupting the playback/capture applications

A change to one of following paramters causes a full daemon restart:
    interface_name, tic_frame_size_at_1fs, max_tic_frame_size

On PTP status change the daemon can run in background an external shell script whose path name is specified by the new ptp_status_script Config parameter.
If this parameter is empty, no script is invoked. The PTP clock status is passed as first parameter to the script and it can be unlocked, locking or locked.
A sample script is provided in daemon/scripts/ptp_status.sh
2022-05-19 19:04:26 +02:00
Andrea Bondavalli
098cebd056 Applied Clang source code formatting to daemon sources 2020-06-16 21:14:44 +02:00
Andrea Bondavalli
3a386696e9 Removed execute permission from source files 2020-06-14 23:54:36 +02: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
371090e7b9 Changes to SessionManager class to handle notifications for source updates triggered when the PTP GMID clock changes or the driver sample rate changes.
SessionManager allows the registration of source update observers and delivers via callbacks the above notifications.
RTSP server modified to register to source update notifications and to send updates to clients via ANNOUNCE method.
2020-06-04 09:14:17 -07:00
Andrea Bondavalli
85727ea02f RTSP server ignores responses to ANNOUNCE 2020-06-01 12:00:34 -07:00
Andrea Bondavalli
d41b67d006 Set of changes to add support for mDNS sources SDP update via RTSP ANNOUNCE method as described by Ravenna.
- modified SessionManager class to register and trigger observer callbacks when a new session is added or removed
- moved MDNSServer out of the SessionManager and added instantiation in the daemon main
- MDNSServer instance registers to SessionManager to receive source add & remove events and invokes appropiate Avahi client operation
- RTSPServer instance registers to SessionManager to receive source update events. In case of update It sends RTSP ANNOUNCE (with the new SDP) to the connected RTSP clients that previously requested (via DESCRIBE method) the SDP file for the specific source
- removed disconnetion timeout handling in RTSPServer. RTSPServer connections are now persistent
2020-05-28 20:47:38 +02:00
Andrea Bondavalli
37fa1de81b Minor changes 2020-05-02 11:39:51 +02:00
Andrea Bondavalli
9d714eb747 Minor changes 2020-04-24 10:59:19 -07:00
Andrea Bondavalli
0757318732 Fixed bug in SessionMange::get_source_id() method 2020-04-24 09:09:40 -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