* limitations under the License.
*/
+#include <sstream>
#include "MediaTransporterBase.h"
#include "MediaTransporterException.h"
#include "MediaTransporterSenderRist.h"
LOG_DEBUG("dtor: %p", this);
}
+std::string MediaTransporterSenderRist::_getCombinedAddress()
+{
+ if (_connectionParam.bondingAddress.empty())
+ return _receiverAddress;
+
+ std::string combineAddr = _receiverAddress + ",";
+ std::stringstream addr(_connectionParam.bondingAddress);
+ std::string token;
+ while (getline(addr, token, ',')) {
+ if (token != _receiverAddress)
+ combineAddr = combineAddr + token + ",";
+ }
+
+ if (combineAddr.back() == ',')
+ combineAddr.pop_back();
+
+ return combineAddr;
+}
+
void MediaTransporterSenderRist::buildPipeline()
{
GstElement* mux = NULL;
g_object_set(G_OBJECT(mux), "alignment", 7, NULL);
sink = gst::_createElement(gst::DEFAULT_ELEMENT_RISTSINK);
- g_object_set(G_OBJECT(sink), "bonding-addresses", _receiverAddress.c_str(), NULL);
+ std::string setAddr = _getCombinedAddress();
+ SECURE_LOG_INFO("set bonding addresses = %s", setAddr.c_str());
+ g_object_set(G_OBJECT(sink), "bonding-addresses", setAddr.c_str(), NULL);
if (_connectionParam.maxRtcpBandwidth != DEFAULT_MAX_RTCP_BANDWIDTH)
g_object_set(G_OBJECT(sink), "max-rtcp-bandwidth", _connectionParam.maxRtcpBandwidth, NULL);