Commit 517c25f3 authored by Julien Grossholtz's avatar Julien Grossholtz Committed by Guillaume Roguez
Browse files

dbus: Add video source in dbus getDetails call

Ring daemon clients need to know what data is streamed to a client
during a call. This patch creates an VIDEO_SOURCE field within getDetails
that contains a string with thei video source used by the daemon.
In case there is no video the string will be empty

Change-Id: I4e5c8a1dcdbd375c327bd20c6674e9b2c2d62bf5
Tuleap: #99
parent bb145c59
......@@ -293,6 +293,7 @@ Call::getNullDetails()
{DRing::Call::Details::CONF_ID, ""},
{DRing::Call::Details::TIMESTAMP_START, ""},
{DRing::Call::Details::ACCOUNTID, ""},
{DRing::Call::Details::VIDEO_SOURCE, "UNKNOWN"},
};
}
......
......@@ -51,6 +51,7 @@ constexpr static char ACCOUNTID [] = "ACCOUNTID" ;
constexpr static char PEER_HOLDING [] = "PEER_HOLDING" ;
constexpr static char AUDIO_MUTED [] = "AUDIO_MUTED" ;
constexpr static char VIDEO_MUTED [] = "VIDEO_MUTED" ;
constexpr static char VIDEO_SOURCE [] = "VIDEO_SOURCE" ;
}
......
......@@ -1008,6 +1008,11 @@ SIPCall::getDetails() const
auto details = Call::getDetails();
details.emplace(DRing::Call::Details::PEER_HOLDING,
peerHolding_ ? TRUE_STR : FALSE_STR);
auto& acc = getSIPAccount();
// If Video is not enabled return an empty string
details.emplace(DRing::Call::Details::VIDEO_SOURCE, acc.isVideoEnabled() ? videoInput_ : "");
if (transport_ and transport_->isSecure()) {
const auto& tlsInfos = transport_->getTlsInfos();
const auto& cipher = pj_ssl_cipher_name(tlsInfos.cipher);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment