Skip to content

Commit

Permalink
fix deploy on azure processing tag to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Jan 5, 2025
1 parent cc1ae8f commit eab3ff2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Build and deploy Container App
uses: azure/container-apps-deploy-action@v1
with:
imageToDeploy: ${{ steps.meta.outputs.tags }}
imageToDeploy: ${{ fromJSON(steps.meta.outputs.tags)[0] }}
containerAppName: webrtcstreamer
resourceGroup: deploy
targetPort: 8000
47 changes: 23 additions & 24 deletions src/PeerConnectionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -939,38 +939,37 @@ const Json::Value PeerConnectionManager::hangUp(const std::string &peerid)
RTC_LOG(LS_ERROR) << "Remove PeerConnection peerid:" << peerid;
m_peer_connectionobs_map.erase(it);
}
}
if (pcObserver)
{
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peerConnection = pcObserver->getPeerConnection();

if (pcObserver)
std::vector<rtc::scoped_refptr<webrtc::RtpSenderInterface>> localstreams = peerConnection->GetSenders();
for (auto stream : localstreams)
{
rtc::scoped_refptr<webrtc::PeerConnectionInterface> peerConnection = pcObserver->getPeerConnection();

std::vector<rtc::scoped_refptr<webrtc::RtpSenderInterface>> localstreams = peerConnection->GetSenders();
for (auto stream : localstreams)
{
std::vector<std::string> streamVector = stream->stream_ids();
if (streamVector.size() > 0) {
std::string streamLabel = streamVector[0];
bool stillUsed = this->streamStillUsed(streamLabel);
if (!stillUsed)
std::vector<std::string> streamVector = stream->stream_ids();
if (streamVector.size() > 0) {
std::string streamLabel = streamVector[0];
bool stillUsed = this->streamStillUsed(streamLabel);
if (!stillUsed)
{
RTC_LOG(LS_ERROR) << "hangUp stream is no more used " << streamLabel;
std::lock_guard<std::mutex> mlock(m_streamMapMutex);
std::map<std::string, std::pair<rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>, rtc::scoped_refptr<webrtc::AudioSourceInterface>>>::iterator it = m_stream_map.find(streamLabel);
if (it != m_stream_map.end())
{
RTC_LOG(LS_ERROR) << "hangUp stream is no more used " << streamLabel;
std::lock_guard<std::mutex> mlock(m_streamMapMutex);
std::map<std::string, std::pair<rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>, rtc::scoped_refptr<webrtc::AudioSourceInterface>>>::iterator it = m_stream_map.find(streamLabel);
if (it != m_stream_map.end())
{
m_stream_map.erase(it);
}

RTC_LOG(LS_ERROR) << "hangUp stream closed " << streamLabel;
m_stream_map.erase(it);
}

peerConnection->RemoveTrackOrError(stream);
RTC_LOG(LS_ERROR) << "hangUp stream closed " << streamLabel;
}
}

delete pcObserver;
result = true;
peerConnection->RemoveTrackOrError(stream);
}
}

delete pcObserver;
result = true;
}
Json::Value answer;
if (result)
Expand Down

0 comments on commit eab3ff2

Please sign in to comment.