Commit 892d7033 authored by Vivien Didelot's avatar Vivien Didelot Committed by Tristan Matthews

daemon: (VideoManager) remove inputClient_

This counter became unnecessary with the VideoInputSelector class.

Change-Id: If5ada2cddb4500629f4db8777ed4aee7385c09b5
Refs: #40807
parent 7971ffba
......@@ -45,7 +45,6 @@ VideoManager::VideoManager(DBus::Connection& connection) :
DBus::ObjectAdaptor(connection, SERVER_PATH)
, videoInputSelector_()
, videoPreference_()
, inputClients_(0)
{
// initialize libav libraries
libav_utils::sfl_avcodec_init();
......@@ -165,7 +164,6 @@ VideoManager::getSettings() {
void
VideoManager::startCamera()
{
inputClients_++;
if (hasCameraStarted()) {
WARN("Video preview was already started!");
return;
......@@ -178,14 +176,12 @@ VideoManager::startCamera()
void
VideoManager::stopCamera()
{
if (hasCameraStarted()) {
DEBUG("Stopping video preview");
inputClients_--;
if (inputClients_ <= 0)
videoInputSelector_.reset();
} else {
if (not hasCameraStarted()) {
WARN("Video preview was already stopped");
return;
}
videoInputSelector_.reset();
}
bool
......
......@@ -70,8 +70,6 @@ class VideoManager
private:
std::shared_ptr<sfl_video::VideoInputSelector> videoInputSelector_;
VideoPreference videoPreference_;
// Only modified from main thread
int inputClients_; // XXX necessary with the videoInputSelector_?
public:
#if HAVE_DBUS
......
Markdown is supported
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