mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: Remove unused functions
This commit is contained in:
parent
3b2352a0ee
commit
b562b31413
|
@ -100,7 +100,6 @@ CameraSource::CameraSource()
|
|||
#endif
|
||||
, videoStreamIndex{-1}
|
||||
, _isNone{true}
|
||||
, streamBlocker{false}
|
||||
, subscriptions{0}
|
||||
{
|
||||
subscriptions = 0;
|
||||
|
@ -134,11 +133,7 @@ void CameraSource::destroyInstance()
|
|||
*/
|
||||
void CameraSource::setupDefault()
|
||||
{
|
||||
setupDevice(CameraDevice::getDefaultDeviceName());
|
||||
}
|
||||
|
||||
void CameraSource::setupDevice(const QString& deviceName)
|
||||
{
|
||||
QString deviceName = CameraDevice::getDefaultDeviceName();
|
||||
bool isScreen = CameraDevice::isScreen(deviceName);
|
||||
VideoMode mode = VideoMode(Settings::getInstance().getScreenRegion());
|
||||
if (!isScreen) {
|
||||
|
@ -172,11 +167,6 @@ void CameraSource::setupDevice(const QString& DeviceName, const VideoMode& Mode)
|
|||
openDevice();
|
||||
}
|
||||
|
||||
void CameraSource::close()
|
||||
{
|
||||
setupDevice("none");
|
||||
}
|
||||
|
||||
bool CameraSource::isNone() const
|
||||
{
|
||||
return _isNone;
|
||||
|
|
|
@ -40,9 +40,7 @@ public:
|
|||
static CameraSource& getInstance();
|
||||
static void destroyInstance();
|
||||
void setupDefault();
|
||||
void setupDevice(const QString& deviceName);
|
||||
void setupDevice(const QString& deviceName, const VideoMode& mode);
|
||||
void close();
|
||||
bool isNone() const;
|
||||
|
||||
// VideoSource interface
|
||||
|
@ -71,7 +69,6 @@ private:
|
|||
QReadWriteLock streamMutex;
|
||||
|
||||
std::atomic_bool _isNone;
|
||||
std::atomic_bool streamBlocker;
|
||||
std::atomic_int subscriptions;
|
||||
|
||||
static CameraSource* instance;
|
||||
|
|
Loading…
Reference in New Issue
Block a user