summary refs log tree commit diff
path: root/src/WebRTCSession.cpp
diff options
context:
space:
mode:
authortrilene <trilene@runbox.com>2020-09-25 10:26:36 -0400
committertrilene <trilene@runbox.com>2020-09-25 10:26:36 -0400
commit3f73853e4b71b67ab6c8ced2dd4eb1e7f473025e (patch)
tree634c964effe292a5f1e093e5179a341e5f10df09 /src/WebRTCSession.cpp
parentclang-format (diff)
downloadnheko-3f73853e4b71b67ab6c8ced2dd4eb1e7f473025e.tar.xz
Move ActiveCallBar Qml to separate file
Diffstat (limited to 'src/WebRTCSession.cpp')
-rw-r--r--src/WebRTCSession.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp
index b4eaadab..14f17030 100644
--- a/src/WebRTCSession.cpp
+++ b/src/WebRTCSession.cpp
@@ -636,7 +636,20 @@ WebRTCSession::createPipeline(int opusPayloadType)
 }
 
 bool
-WebRTCSession::toggleMuteAudioSource()
+WebRTCSession::isMicMuted() const
+{
+        if (state_ < State::INITIATED)
+                return false;
+
+        GstElement *srclevel = gst_bin_get_by_name(GST_BIN(pipe_), "srclevel");
+        gboolean muted;
+        g_object_get(srclevel, "mute", &muted, nullptr);
+        gst_object_unref(srclevel);
+        return muted;
+}
+
+bool
+WebRTCSession::toggleMicMute()
 {
         if (state_ < State::INITIATED)
                 return false;