22 #include <libconfig.h++>
24 #include "cpprest/http_client.h"
38 unsigned long long tsi,
39 std::string iface, boost::asio::io_service &io_service,
CacheManagement &cache,
40 bool seamless_switching,
73 const libconfig::Config &
_cfg;
84 unsigned long long _tsi = 0;
97 std::tuple<std::shared_ptr<MBMS_RT::Service>,
bool>
100 void _handleAppService(tinyxml2::XMLElement *app_service,
const std::shared_ptr<Service> &service);
106 const std::shared_ptr<MBMS_RT::Service> &service,
107 tinyxml2::XMLElement *usd);
111 const std::shared_ptr<MBMS_RT::Service> &service,
112 tinyxml2::XMLElement *usd);
116 const std::shared_ptr<MBMS_RT::Service> &service,
117 tinyxml2::XMLElement *usd);
virtual ~ServiceAnnouncement()
void _handleMbmsEnvelope(const Item &item)
Parses the MBMS envelope.
void _addServiceAnnouncementItems(const std::string &str)
Iterates through the service announcement file and adds the different sections/items to the the list ...
void _handleMbmbsUserServiceDescriptionBundle(const Item &item, const std::string &bootstrap_format)
Parses the MBMS USD.
get_service_callback_t _get_service
const std::string & content() const
std::thread _flute_thread
std::vector< Item > _items
void _handleAppService(tinyxml2::XMLElement *app_service, const std::shared_ptr< Service > &service)
Parse the appService element Spec: Presence of the r12:appService child element of userServiceDescrip...
std::unique_ptr< LibFlute::Receiver > _flute_receiver
void _setupBy5GMagConfig(tinyxml2::XMLElement *app_service, const std::shared_ptr< MBMS_RT::Service > &service, tinyxml2::XMLElement *usd)
void _setupBy5GMagLegacyFormat(tinyxml2::XMLElement *app_service, const std::shared_ptr< MBMS_RT::Service > &service, tinyxml2::XMLElement *usd)
Setup according to the format that was used for the first 5G-MAG sample recordings.
std::function< std::shared_ptr< Service >const std::string &service_id)> get_service_callback_t
void start_flute_receiver(const std::string &mcast_address)
Starts the FLUTE receiver at the specified multicast address.
bool _setupBroadcastDelivery(tinyxml2::XMLElement *usd, std::string base, std::shared_ptr< ContentStream > cs)
std::tuple< std::shared_ptr< MBMS_RT::Service >, bool > _registerService(tinyxml2::XMLElement *usd, const std::string &service_id)
Creates a new service or finds an existing service for the specified service id.
boost::asio::io_service & _io_service
set_service_callback_t _set_service
std::function< void(const std::string &service_id, std::shared_ptr< Service >)> set_service_callback_t
const libconfig::Config & _cfg
const std::vector< Item > & items() const
void parse_bootstrap(const std::string &str)
Parse the service announcement/bootstrap file.
void _setupByAlternativeContentElement(tinyxml2::XMLElement *app_service, const std::shared_ptr< MBMS_RT::Service > &service, tinyxml2::XMLElement *usd)
Setup according to original SA format with an alternativeContentElement required to indicate that the...
ServiceAnnouncement(const libconfig::Config &cfg, std::string tmgi, const std::string &mcast, unsigned long long tsi, std::string iface, boost::asio::io_service &io_service, CacheManagement &cache, bool seamless_switching, get_service_callback_t get_service, set_service_callback_t set_service)
static Config cfg
Global configuration object.