Skip to content

Commit

Permalink
Merge pull request #150 from nsgundy/master
Browse files Browse the repository at this point in the history
Support unicast sinks
  • Loading branch information
bondagit authored Jan 21, 2024
2 parents 58d97c9 + 5511fe9 commit 58496b5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions daemon/session_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,15 @@ std::error_code SessionManager::add_sink(const StreamSink& sink) {
BOOST_LOG_TRIVIAL(info) << "session_manager:: playout delay "
<< info.stream.m_ui32PlayOutDelay;

auto mcast_mac_addr = get_mcast_mac_addr(info.stream.m_ui32DestIP);
std::copy(std::begin(mcast_mac_addr), std::end(mcast_mac_addr),
info.stream.m_ui8DestMAC);
if (IN_MULTICAST(info.stream.m_ui32DestIP)) {
auto mcast_mac_addr = get_mcast_mac_addr(info.stream.m_ui32DestIP);
std::copy(std::begin(mcast_mac_addr), std::end(mcast_mac_addr),
info.stream.m_ui8DestMAC);
} else {
auto mac_addr = config_->get_mac_addr();
std::copy(std::begin(mac_addr), std::end(mac_addr),
info.stream.m_ui8DestMAC);
}

std::unique_lock sinks_lock(sinks_mutex_);
auto const it = sinks_.find(sink.id);
Expand Down

0 comments on commit 58496b5

Please sign in to comment.