|
RAVENNAKIT
|
#include <ravenna_sender.hpp>
Classes | |
| struct | Destination |
| The destination of where a stream of packets should go. More... | |
| struct | Configuration |
| class | Subscriber |
Public Member Functions | |
| 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) | |
| ~RavennaSender () override | |
| RavennaSender (const RavennaSender &other)=delete | |
| RavennaSender & | operator= (const RavennaSender &other)=delete |
| RavennaSender (RavennaSender &&other) noexcept=delete | |
| RavennaSender & | operator= (RavennaSender &&other) noexcept=delete |
| Id | get_id () const |
| const boost::uuids::uuid & | get_uuid () const |
| uint32_t | get_session_id () const |
| tl::expected< void, std::string > | set_configuration (Configuration config) |
| Updates the configuration of the sender. | |
| const Configuration & | get_configuration () const |
| bool | subscribe (Subscriber *subscriber) |
| Subscribes to the sender. | |
| bool | unsubscribe (const Subscriber *subscriber) |
| Unsubscribes from the sender. | |
| void | set_nmos_node (nmos::Node *nmos_node) |
| Sets the NMOS node for the receiver. | |
| void | set_nmos_device_id (const boost::uuids::uuid &device_id) |
| Sets the NMOS device ID for the receiver. | |
| float | get_signaled_ptime () const |
| uint32_t | get_framecount () const |
| void | set_network_interface_config (NetworkInterfaceConfig network_interface_config) |
| Sets the network interface config for the receiver. | |
| void | set_advertiser (dnssd::Advertiser *advertiser) |
| Sets given advertiser, updating the advertisement where necessary. | |
| tl::expected< sdp::SessionDescription, std::string > | generate_sdp () const |
| Generates and returns the SDP as string. | |
| boost::json::object | to_boost_json () const |
| tl::expected< void, std::string > | restore_from_json (const boost::json::value &json) |
| Restores the sender from a JSON representation. | |
| const nmos::SourceAudio & | get_nmos_source () const |
| const nmos::FlowAudioRaw & | get_nmos_flow () const |
| const nmos::Sender & | get_nmos_sender () const |
| void | on_request (rtsp::Connection::RequestEvent event) const override |
| Called when a request is received. | |
| void | ptp_parent_changed (const ptp::ParentDs &parent) override |
| Called when the parent of the PTP instance changes. | |
| Public Member Functions inherited from rav::rtsp::Server::PathHandler | |
| virtual | ~PathHandler ()=default |
| virtual void | on_response (Connection::ResponseEvent event) |
| Called when a response is received. | |
| Public Member Functions inherited from rav::ptp::Instance::Subscriber | |
| virtual | ~Subscriber ()=default |
| virtual void | ptp_port_changed_state (const Port &port) |
| Called when the state of a port changes. | |
| virtual void | ptp_port_removed (const uint16_t port_number) |
| Called when a port was removed. | |
| virtual void | ptp_configuration_updated (const Configuration &config) |
| Called when the configuration was updated. | |
| virtual void | ptp_stats_updated (const Stats &ptp_stats) |
| Called at a regular interval when the PTP stats are updated. | |
| const LocalClock & | get_local_clock () |
Static Public Attributes | |
| static constexpr uint32_t | k_buffer_num_packets = 30 |
| The number of packet buffers available for sending. | |
| static constexpr uint32_t | k_max_num_frames = 4096 |
| The max number of frames to feed into the sender (using send_audio_data_realtime). | |
| static constexpr auto | k_supported_encodings = {AudioEncoding::pcm_s16, AudioEncoding::pcm_s24} |
| List of supported audio encodings for the sender. | |
Definition at line 42 of file ravenna_sender.hpp.
| rav::RavennaSender::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 ) |
|
override |
|
delete |
|
deletenoexcept |
|
nodiscard |
Generates and returns the SDP as string.
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
overridevirtual |
Called when a request is received.
| event | The event containing the request. |
Reimplemented from rav::rtsp::Server::PathHandler.
|
delete |
|
deletenoexcept |
|
overridevirtual |
Called when the parent of the PTP instance changes.
| parent | The new parent data set. |
Reimplemented from rav::ptp::Instance::Subscriber.
|
nodiscard |
Restores the sender from a JSON representation.
| json | The JSON representation of the sender. |
| void rav::RavennaSender::set_advertiser | ( | dnssd::Advertiser * | advertiser | ) |
Sets given advertiser, updating the advertisement where necessary.
| advertiser | The new advertiser. Can be nullptr to stop the advirtisement. |
|
nodiscard |
Updates the configuration of the sender.
| config | The configuration to update. |
| void rav::RavennaSender::set_network_interface_config | ( | NetworkInterfaceConfig | network_interface_config | ) |
Sets the network interface config for the receiver.
| network_interface_config | The configuration of the network interface to use. |
| void rav::RavennaSender::set_nmos_device_id | ( | const boost::uuids::uuid & | device_id | ) |
Sets the NMOS device ID for the receiver.
| device_id | The device ID to set. |
| void rav::RavennaSender::set_nmos_node | ( | nmos::Node * | nmos_node | ) |
Sets the NMOS node for the receiver.
| nmos_node | The NMOS node to set. May be nullptr if NMOS is not used. |
|
nodiscard |
Subscribes to the sender.
| subscriber | The subscriber to subscribe. |
| boost::json::object rav::RavennaSender::to_boost_json | ( | ) | const |
|
nodiscard |
Unsubscribes from the sender.
| subscriber | The subscriber to unsubscribe. |
|
staticconstexpr |
The number of packet buffers available for sending.
This value means that n packets worth of data can be queued for sending.
Definition at line 46 of file ravenna_sender.hpp.
|
staticconstexpr |
The max number of frames to feed into the sender (using send_audio_data_realtime).
This will usually correspond to an audio device buffer size.
Definition at line 50 of file ravenna_sender.hpp.
|
staticconstexpr |
List of supported audio encodings for the sender.
Definition at line 53 of file ravenna_sender.hpp.