From cf040787bd9880d1cc25064211e718c53537764c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Thu, 28 Oct 2021 16:55:59 -0400
Subject: [PATCH] newvideo: add useDirectRenderer (for client)

cf https://git.jami.net/savoirfairelinux/jami-libclient/-/issues/492

Change-Id: Ieb922ad29136b5f607c2fc0086fa4cfd120a9bfb
---
 src/api/newvideo.h |  2 ++
 src/newvideo.cpp   | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/src/api/newvideo.h b/src/api/newvideo.h
index 1fedad1e..91ff2681 100644
--- a/src/api/newvideo.h
+++ b/src/api/newvideo.h
@@ -144,6 +144,8 @@ public:
      */
     void useAVFrame(bool useAVFrame);
 
+    bool useDirectRenderer() const;
+
 Q_SIGNALS:
     /**
      * Emitted when a new frame is ready
diff --git a/src/newvideo.cpp b/src/newvideo.cpp
index bd0beacc..9c9e115c 100644
--- a/src/newvideo.cpp
+++ b/src/newvideo.cpp
@@ -132,6 +132,16 @@ Renderer::useAVFrame(bool useAVFrame)
 #endif
 }
 
+bool
+Renderer::useDirectRenderer() const
+{
+#ifdef ENABLE_LIBWRAP
+    return true;
+#else
+    return false;
+#endif
+}
+
 QString
 Renderer::getId() const
 {
-- 
GitLab