Commit efcd6fa4 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

avmodel: add API to set/get the current viewed video capture device

- distinguish default device and current viewed device

Change-Id: I174fd517a5deddd684e85f37f47c3ef938b3aeba
parent fb8639eb
......@@ -285,6 +285,23 @@ public:
*/
void useAVFrame(bool useAVFrame);
/**
* set current using device
* @ param device name
*/
void setCurrentVideoCaptureDevice(std::string &currentVideoCaptureDevice);
/**
* set current using device
* @ return current using device name
*/
std::string getCurrentVideoCaptureDevice() const;
/**
* clear current using device
*/
void clearCurrentVideoCaptureDevice();
Q_SIGNALS:
/**
* Emitted when a renderer is started
......
......@@ -65,6 +65,7 @@ public:
// store if a renderers is for a finished call
std::map<std::string, bool> finishedRenderers_;
bool useAVFrame_ = false;
std::string currentVideoCaptureDevice_ {};
#ifndef ENABLE_LIBWRAP
// TODO: Init Video Renderers from daemon (see: https://git.ring.cx/savoirfairelinux/ring-daemon/issues/59)
......@@ -611,6 +612,24 @@ AVModel::getCurrentRenderedDevice(const std::string& call_id) const
return result;
}
void
AVModel::setCurrentVideoCaptureDevice(std::string &currentVideoCaptureDevice)
{
pimpl_->currentVideoCaptureDevice_ = currentVideoCaptureDevice;
}
std::string
AVModel::getCurrentVideoCaptureDevice() const
{
return pimpl_->currentVideoCaptureDevice_;
}
void
AVModel::clearCurrentVideoCaptureDevice()
{
pimpl_->currentVideoCaptureDevice_.clear();
}
AVModelPimpl::AVModelPimpl(AVModel& linked, const CallbacksHandler& callbacksHandler)
: linked_(linked)
, callbacksHandler(callbacksHandler)
......
Supports Markdown
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