Class to announce the stream details using the SAP protocol.
More...
#include <sap_announcer.h>
|
static SapAnnouncer & | GetInstance () |
| A Singleton get method.
|
|
|
std::vector<::mediax::rtp::StreamInformation > | streams_ |
| A list of active SAP streams.
|
|
std::thread | thread_ |
| The SAP/SDP transmission thread.
|
|
uint32_t | source_ipaddress_ |
| The IPV4 source address.
|
|
int | sockfd_ |
| The open socket file descriptor.
|
|
struct sockaddr_in | multicast_addr_ |
| The multicast address.
|
|
bool | running_ = false |
| The flag indicating the SAP thread is active.
|
|
Class to announce the stream details using the SAP protocol.
◆ Active()
bool mediax::sap::SapAnnouncer::Active |
( |
| ) |
const |
Returns tru if running, Start() has beed called.
- Returns
- true
-
false
◆ AddSapAnnouncement()
Add Sap stream announcement information.
- Parameters
-
stream_information | The stream details |
◆ DeleteSapAnnouncement()
void mediax::sap::SapAnnouncer::DeleteSapAnnouncement |
( |
std::string_view |
session_name, |
|
|
std::string_view |
multicast_address = "" |
|
) |
| |
Delete a specific session announcement.
- Parameters
-
session_name | The session name |
multicast_address | The (optional) multicast address, used to differentiate between streams |
◆ GetActiveStreamCount()
uint32_t mediax::sap::SapAnnouncer::GetActiveStreamCount |
( |
| ) |
const |
Get the number of active streams.
- Returns
- uint32_t
◆ GetInterfaces()
std::map< uint32_t, std::string > mediax::sap::SapAnnouncer::GetInterfaces |
( |
| ) |
const |
Get the Interfaces as a map of strings.
- Returns
- std::map<uit32_t, std::string>
◆ GetIpv4Address()
uint32_t mediax::sap::SapAnnouncer::GetIpv4Address |
( |
std::string_view |
interface_name | ) |
const |
|
private |
Get the Ipv4 Address as a number.
- Parameters
-
interface_name | the interface name |
- Returns
- uint32_t
◆ GetIpv4AddressString()
std::string mediax::sap::SapAnnouncer::GetIpv4AddressString |
( |
std::string_view |
interface_name | ) |
const |
|
private |
Get the Ipv 4 Address as a string.
- Parameters
-
interface_name | the interface name |
- Returns
- std::string
◆ GetSapAnnouncment()
mediax::rtp::StreamInformation & mediax::sap::SapAnnouncer::GetSapAnnouncment |
( |
std::string_view |
session_name, |
|
|
std::string_view |
multicast_address = "" |
|
) |
| |
Get the Sap Announcment object.
- Parameters
-
session_name | The session name (will get first if no multicast is defined) |
multicast_address | The (optional) multicast address, used to differentiate between streams |
- Returns
- mediax::rtp::StreamInformation&
◆ GetStreams()
Get the Streams object.
- Returns
- std::vector<SAPMessage>&
◆ SapAnnouncementThread()
void mediax::sap::SapAnnouncer::SapAnnouncementThread |
( |
SapAnnouncer * |
stream_information | ) |
|
|
staticprivate |
Function to broadcast SAP announcements for a list of streams.
Only needs to be called once to start the broadcast thread
- Parameters
-
◆ SendSapAnnouncement()
Function to send a SAP announcement.
- Parameters
-
stream_information | The stream details |
◆ SendSapDeletion()
Function to send a SAP deletion.
- Parameters
-
stream_information | The stream details, needed to form the deletion packet |
◆ SendSapPacket()
Send a SAP packet.
- Parameters
-
stream_information | the SAP packet details |
deletion | flag indicating SAP deletion |
- Returns
- int returns 0 if no errors
◆ SetSourceInterface()
void mediax::sap::SapAnnouncer::SetSourceInterface |
( |
uint32_t |
select = 0 | ) |
|
Set the Source Interface object.
- Parameters
-
select | The interface to select as the source |
◆ UndeleteSapAnnouncement()
void mediax::sap::SapAnnouncer::UndeleteSapAnnouncement |
( |
std::string_view |
session_name | ) |
|
Undelete a specific session announcement.
- Parameters
-
The documentation for this class was generated from the following files: