70 std::ignore = parameters;
79 std::ignore = receiver;
80 std::ignore = configuration;
91 std::ignore = stream_info;
102 std::ignore = receiver_id;
103 std::ignore = stream_index;
127 [[nodiscard]] const boost::uuids::uuid&
get_uuid() const;
170 [[nodiscard]] std::optional<
sdp::SessionDescription>
get_sdp() const;
194 [[nodiscard]] tl::expected<
void, std::
string>
restore_from_json(const boost::json::value& json);
211 rtp::AudioReceiver& rtp_audio_receiver_;
212 nmos::Node* nmos_node_ {
nullptr};
214 Configuration configuration_;
219 std::array<rtp::AudioReceiver::StreamState, rtp::AudioReceiver::k_max_num_redundant_sessions> streams_states_ {};
220 Throttle<void> stats_throttle_ {std::chrono::seconds(1)};
222 void handle_announced_sdp(
const sdp::SessionDescription& sdp);
223 tl::expected<void, std::string> update_nmos();
224 tl::expected<void, std::string> update_rtsp();
225 tl::expected<void, nmos::ApiError> handle_patch_request(
const boost::json::value& patch_request);
A class which represents a unique identifier.
Baseclass for other classes which want to receive changes to the stream.
virtual void ravenna_receiver_stream_state_updated(const rtp::AudioReceiver::StreamInfo &stream_info, const rtp::AudioReceiver::StreamState state)
Called when the state of a stream has changed.
virtual void ravenna_receiver_parameters_updated(const rtp::AudioReceiver::ReaderParameters ¶meters)
Called when the stream has changed.
virtual void ravenna_receiver_stream_stats_updated(Id receiver_id, size_t stream_index, const rtp::PacketStats::Counters &stats)
Called when the stats of a stream have been updated.
virtual void ravenna_receiver_configuration_updated(const RavennaReceiver &receiver, const Configuration &configuration)
Called when the configuration of the stream has changed.
virtual ~Subscriber()=default
bool unsubscribe(const Subscriber *subscriber)
Removes a subscriber from the receiver.
std::optional< std::string > get_sdp_text() const
RavennaReceiver(const RavennaReceiver &)=delete
std::optional< sdp::SessionDescription > get_sdp() const
void set_network_interface_config(NetworkInterfaceConfig network_interface_config)
Sets the network interface config for the receiver.
void on_announced(const RavennaRtspClient::AnnouncedEvent &event) override
Called when a session is announced.
RavennaReceiver(RavennaReceiver &&) noexcept=delete
bool subscribe(Subscriber *subscriber)
Adds a subscriber to the receiver.
void do_maintenance()
Call regularly from the maintenance thread.
tl::expected< void, std::string > set_configuration(Configuration config)
Updates the configuration of the receiver.
const nmos::ReceiverAudio & get_nmos_receiver() const
tl::expected< void, std::string > restore_from_json(const boost::json::value &json)
Restores the receiver from a JSON representation.
boost::json::object to_boost_json() const
void set_nmos_node(nmos::Node *nmos_node)
Sets the NMOS node for the receiver.
static constexpr auto k_supported_encodings
List of supported audio encodings for the sender.
void set_nmos_device_id(const boost::uuids::uuid &device_id)
Sets the NMOS device ID for the receiver.
const boost::uuids::uuid & get_uuid() const
RavennaReceiver(RavennaRtspClient &rtsp_client, rtp::AudioReceiver &rtp_audio_receiver, Id id, NetworkInterfaceConfig network_interface_config)
~RavennaReceiver() override
RavennaReceiver & operator=(const RavennaReceiver &)=delete
const Configuration & get_configuration() const
Maintains connections to one or more RAVENNA RTSP servers, upon request.
Super basic list of subscribers.
void tag_invoke(const boost::json::value_from_tag &, boost::json::value &jv, const RavennaReceiver::Configuration &config)
tl::expected< rtp::AudioReceiver::ReaderParameters, std::string > create_rtp_receiver_parameters(const sdp::SessionDescription &sdp)
Creates rtp receiver parameters from the given SDP.
Defines the configuration for the receiver.
sdp::SessionDescription sdp
static Configuration default_config()
Describes an audio Receiver.
StreamState
The state of a reader.
A struct that represents an SDP session description as defined in RFC 8866.