Skip to content

Commit

Permalink
📙 Adding at least logging, and some wrong code to HangUpMedia
Browse files Browse the repository at this point in the history
  • Loading branch information
clone1018 authored Nov 18, 2020
1 parent 9ad11fd commit 8b16e9e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion JanusFtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,21 @@ void JanusFtl::DataReady(janus_plugin_session* handle)
void JanusFtl::HangUpMedia(janus_plugin_session* handle)
{
// TODO
JANUS_LOG(LOG_INFO, "FTL: HangUpMedia\n");

std::shared_ptr<JanusSession> session;
{
std::lock_guard<std::mutex> lock(sessionsMutex);
if (sessions.count(handle) <= 0)
{
JANUS_LOG(LOG_ERR, "FTL: No session associated with this handle...\n");
return;
}
session = sessions[handle];
}

session->SetIsStarted(false);
session->ResetRtpSwitchingContext();
}

void JanusFtl::DestroySession(janus_plugin_session* handle, int* error)
Expand Down Expand Up @@ -518,4 +533,4 @@ std::string JanusFtl::generateSdpOffer(
}
return offerStream.str();
}
#pragma endregion
#pragma endregion

0 comments on commit 8b16e9e

Please sign in to comment.