From 35ccafaccdafd104bcdd2421e28ef7ff630b9682 Mon Sep 17 00:00:00 2001
From: Pierre Nicolas <pierre.nicolas@savoirfairelinux.com>
Date: Mon, 10 Feb 2025 16:43:24 -0500
Subject: [PATCH] video: remove legacy code

Removed legacy code that was causing options to be cleared unnecessarily.

Change-Id: I02b32221acc6abfef634ba843549c6391c2058c8
---
 src/media/video/video_input.cpp |  7 -------
 src/media/video/video_input.h   | 11 -----------
 src/media/video/video_mixer.cpp |  5 -----
 3 files changed, 23 deletions(-)

diff --git a/src/media/video/video_input.cpp b/src/media/video/video_input.cpp
index dfccb4a44..90404cbe2 100644
--- a/src/media/video/video_input.cpp
+++ b/src/media/video/video_input.cpp
@@ -387,13 +387,6 @@ VideoInput::deleteDecoder()
     decoder_.reset();
 }
 
-void
-VideoInput::stopInput()
-{
-    clearOptions();
-    loop_.stop();
-}
-
 void
 VideoInput::clearOptions()
 {
diff --git a/src/media/video/video_input.h b/src/media/video/video_input.h
index ade7302a1..945631adc 100644
--- a/src/media/video/video_input.h
+++ b/src/media/video/video_input.h
@@ -83,17 +83,6 @@ public:
 
     void setRecorderCallback(const std::function<void(const MediaStream& ms)>& cb);
 
-#if VIDEO_CLIENT_INPUT
-    /*
-     * these functions are used to pass buffer from/to the daemon
-     * on the Android and UWP builds
-     */
-    void* obtainFrame(int length);
-    void releaseFrame(void* frame);
-#else
-    void stopInput();
-#endif
-
     void setSuccessfulSetupCb(const std::function<void(MediaType, bool)>& cb)
     {
         onSuccessfulSetup_ = cb;
diff --git a/src/media/video/video_mixer.cpp b/src/media/video/video_mixer.cpp
index cd12fe5e9..8ef2dbf8d 100644
--- a/src/media/video/video_mixer.cpp
+++ b/src/media/video/video_mixer.cpp
@@ -142,11 +142,6 @@ VideoMixer::stopInput(const std::shared_ptr<VideoFrameActiveWriter>& input)
 {
     // Detach videoInputs from mixer
     input->detach(this);
-#if !VIDEO_CLIENT_INPUT
-    // Stop old VideoInput
-    if (auto oldInput = std::dynamic_pointer_cast<VideoInput>(input))
-        oldInput->stopInput();
-#endif
 }
 
 void
-- 
GitLab