From 63d3439e3a625c81ec39e38547fe10aa862606a8 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Fri, 18 Apr 2014 15:55:12 -0400
Subject: [PATCH] video: don't add video information to getCallDetails

It's no longer used and can lead to a deadlock.

Refs #45610
---
 daemon/src/sip/sipcall.cpp                | 10 ----------
 daemon/src/sip/sipcall.h                  |  3 ---
 daemon/src/video/video_receive_thread.cpp | 13 -------------
 daemon/src/video/video_receive_thread.h   |  1 -
 daemon/src/video/video_rtp_session.cpp    |  7 -------
 daemon/src/video/video_rtp_session.h      |  1 -
 6 files changed, 35 deletions(-)

diff --git a/daemon/src/sip/sipcall.cpp b/daemon/src/sip/sipcall.cpp
index 4350d21c68..3af942e9b8 100644
--- a/daemon/src/sip/sipcall.cpp
+++ b/daemon/src/sip/sipcall.cpp
@@ -94,16 +94,6 @@ void SIPCall::answer()
     setState(ACTIVE);
 }
 
-std::map<std::string, std::string>
-SIPCall::getDetails()
-{
-    std::map<std::string, std::string> details(Call::getDetails());
-#ifdef SFL_VIDEO
-    videortp_.addReceivingDetails(details);
-#endif
-    return details;
-}
-
 std::map<std::string, std::string>
 SIPCall::createHistoryEntry() const
 {
diff --git a/daemon/src/sip/sipcall.h b/daemon/src/sip/sipcall.h
index 3ce4223c17..bf3106bca8 100644
--- a/daemon/src/sip/sipcall.h
+++ b/daemon/src/sip/sipcall.h
@@ -113,9 +113,6 @@ class SIPCall : public Call {
         void setContactHeader(pj_str_t *contact);
 
     private:
-        // override of Call::getDetails
-        std::map<std::string, std::string>
-        getDetails();
 
         // override of Call::createHistoryEntry
         std::map<std::string, std::string>
diff --git a/daemon/src/video/video_receive_thread.cpp b/daemon/src/video/video_receive_thread.cpp
index a31fb83859..e6f71f9fd5 100644
--- a/daemon/src/video/video_receive_thread.cpp
+++ b/daemon/src/video/video_receive_thread.cpp
@@ -207,19 +207,6 @@ bool VideoReceiveThread::decodeFrame()
     return false;
 }
 
-void VideoReceiveThread::addReceivingDetails(
-    std::map<std::string, std::string> &details)
-{
-    if (isRunning() and dstWidth_ > 0 and dstHeight_ > 0) {
-        details["VIDEO_SHM_PATH"] = sink_.openedName();
-        std::ostringstream os;
-        os << dstWidth_;
-        details["VIDEO_WIDTH"] = os.str();
-        os.str("");
-        os << dstHeight_;
-        details["VIDEO_HEIGHT"] = os.str();
-    }
-}
 
 void VideoReceiveThread::enterConference()
 {
diff --git a/daemon/src/video/video_receive_thread.h b/daemon/src/video/video_receive_thread.h
index 851d9329ab..37b01b6a89 100644
--- a/daemon/src/video/video_receive_thread.h
+++ b/daemon/src/video/video_receive_thread.h
@@ -54,7 +54,6 @@ public:
 
     void addIOContext(SocketPair &socketPair);
     void setRequestKeyFrameCallback(void (*)(const std::string &));
-    void addReceivingDetails(std::map<std::string, std::string> &details);
     void enterConference();
     void exitConference();
 
diff --git a/daemon/src/video/video_rtp_session.cpp b/daemon/src/video/video_rtp_session.cpp
index 4cef369c22..e72a67ef3e 100644
--- a/daemon/src/video/video_rtp_session.cpp
+++ b/daemon/src/video/video_rtp_session.cpp
@@ -225,13 +225,6 @@ void VideoRtpSession::forceKeyFrame()
         sender_->forceKeyFrame();
 }
 
-void VideoRtpSession::addReceivingDetails(std::map<std::string, std::string> &details)
-{
-    std::lock_guard<std::mutex> lock(mutex_);
-    if (receiveThread_)
-        receiveThread_->addReceivingDetails(details);
-}
-
 void VideoRtpSession::setupConferenceVideoPipeline()
 {
     std::lock_guard<std::mutex> lock(mutex_);
diff --git a/daemon/src/video/video_rtp_session.h b/daemon/src/video/video_rtp_session.h
index 7ece5309f8..b5cfb9fe67 100644
--- a/daemon/src/video/video_rtp_session.h
+++ b/daemon/src/video/video_rtp_session.h
@@ -62,7 +62,6 @@ public:
                            unsigned int port);
     void updateSDP(const Sdp &sdp);
     void forceKeyFrame();
-    void addReceivingDetails(std::map<std::string, std::string> &details);
     void bindMixer(VideoMixer* mixer);
     void unbindMixer();
     void setupConferenceVideoPipeline();
-- 
GitLab