38#include <boost/uuid/uuid.hpp>
91 std::ignore = sender_id;
92 std::ignore = configuration;
117 [[nodiscard]]
const boost::uuids::uuid&
get_uuid()
const;
188 [[nodiscard]] tl::expected<sdp::SessionDescription, std::string>
generate_sdp()
const;
200 [[nodiscard]] tl::expected<void, std::string>
restore_from_json(
const boost::json::value& json);
231 uint32_t session_id_ {};
233 std::string rtsp_path_by_name_;
234 std::string rtsp_path_by_id_;
235 Id advertisement_id_;
236 int32_t clock_domain_ {};
237 ptp::ClockIdentity grandmaster_identity_;
238 NetworkInterfaceConfig network_interface_config_;
240 nmos::SourceAudio nmos_source_;
241 nmos::FlowAudioRaw nmos_flow_;
242 nmos::Sender nmos_sender_;
244 SubscriberList<Subscriber> subscribers_;
245 std::string status_message_;
250 void send_announce()
const;
252 void update_advertisement();
253 void generate_auto_addresses_if_needed(
bool notify_subscribers);
254 bool generate_auto_addresses_if_needed(std::vector<Destination>& destinations)
const;
255 void restart_streaming()
const;
256 tl::expected<void, rav::nmos::ApiError> handle_patch_request(
const boost::json::value& patch_request);
257 void register_dnssd_session_advertisement();
A class which represents a unique identifier.
virtual ~Subscriber()=default
virtual void ravenna_sender_configuration_updated(const Id sender_id, const Configuration &configuration)
bool subscribe(Subscriber *subscriber)
Subscribes to the sender.
RavennaSender & operator=(const RavennaSender &other)=delete
static constexpr uint32_t k_max_num_frames
The max number of frames to feed into the sender (using send_audio_data_realtime).
void on_request(rtsp::Connection::RequestEvent event) const override
Called when a request is received.
const Configuration & get_configuration() const
const nmos::SourceAudio & get_nmos_source() const
void set_advertiser(dnssd::Advertiser *advertiser)
Sets given advertiser, updating the advertisement where necessary.
tl::expected< void, std::string > set_configuration(Configuration config)
Updates the configuration of the sender.
RavennaSender(const RavennaSender &other)=delete
RavennaSender(rtp::AudioSender &rtp_audio_sender, dnssd::Advertiser *advertiser, rtsp::Server &rtsp_server, ptp::Instance &ptp_instance, Id id, uint32_t session_id, NetworkInterfaceConfig network_interface_config)
const boost::uuids::uuid & get_uuid() const
void set_nmos_device_id(const boost::uuids::uuid &device_id)
Sets the NMOS device ID for the receiver.
uint32_t get_session_id() const
void set_network_interface_config(NetworkInterfaceConfig network_interface_config)
Sets the network interface config for the receiver.
const nmos::FlowAudioRaw & get_nmos_flow() const
static constexpr auto k_supported_encodings
List of supported audio encodings for the sender.
~RavennaSender() override
uint32_t get_framecount() const
tl::expected< sdp::SessionDescription, std::string > generate_sdp() const
Generates and returns the SDP as string.
bool unsubscribe(const Subscriber *subscriber)
Unsubscribes from the sender.
static constexpr uint32_t k_buffer_num_packets
The number of packet buffers available for sending.
RavennaSender(RavennaSender &&other) noexcept=delete
float get_signaled_ptime() const
void ptp_parent_changed(const ptp::ParentDs &parent) override
Called when the parent of the PTP instance changes.
RavennaSender & operator=(RavennaSender &&other) noexcept=delete
void set_nmos_node(nmos::Node *nmos_node)
Sets the NMOS node for the receiver.
tl::expected< void, std::string > restore_from_json(const boost::json::value &json)
Restores the sender from a JSON representation.
boost::json::object to_boost_json() const
const nmos::Sender & get_nmos_sender() const
Represents packet time as specified in AES67-2023 Section 7.2.
Base class for all dnssd advertiser implementations.
Implements the NMOS node as defined in the NMOS specifications.
Represents a PTP instance as defined in IEEE 1588-2019.
Baseclass for other classes which need to handle requests for specific paths.
Server for accepting RTSP connections.
void tag_invoke(const boost::json::value_from_tag &, boost::json::value &jv, const RavennaReceiver::Configuration &config)
aes67::PacketTime packet_time
std::vector< Destination > destinations
The destination of where a stream of packets should go.
friend bool operator==(const Destination &lhs, const Destination &rhs)
boost::asio::ip::udp::endpoint endpoint
uint8_t interface_by_rank
friend bool operator!=(const Destination &lhs, const Destination &rhs)
Describes an audio source.
Represents the parent data set as described in IEEE1588-2019: 8.2.3.