We may not want to mirror a frame for certain input.

Refs: #40806
---
 daemon/src/video/video_input.cpp | 4 +++-
 daemon/src/video/video_input.h   | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/daemon/src/video/video_input.cpp b/daemon/src/video/video_input.cpp
index a2d7cd2..1089534 100644
--- a/daemon/src/video/video_input.cpp
+++ b/daemon/src/video/video_input.cpp
@@ -48,6 +48,7 @@ VideoInput::VideoInput(const std::string& device) :
     , id_(SINK_ID)
     , decoder_(0)
     , sink_()
+    , mirror_(true)
 
     , input_()
     , format_()
@@ -140,7 +141,8 @@ bool VideoInput::captureFrame()
         return false;
     }
 
-    frame.mirror();
+    if (mirror_)
+        frame.mirror();
     publishFrame();
     return true;
 }
diff --git a/daemon/src/video/video_input.h b/daemon/src/video/video_input.h
index 5f309c6..3d8b048 100644
--- a/daemon/src/video/video_input.h
+++ b/daemon/src/video/video_input.h
@@ -65,6 +65,7 @@ private:
     std::string id_;
     VideoDecoder *decoder_;
     SHMSink sink_;
+    bool mirror_;
 
     std::string input_;
     std::string format_;
-- 
1.8.5.4

_______________________________________________
SFLphone mailing list
[email protected]
http://lists.savoirfairelinux.net/mailman/listinfo/sflphone

Reply via email to