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
|
#endif
|
||||||
, videoStreamIndex{-1}
|
, videoStreamIndex{-1}
|
||||||
, _isNone{true}
|
, _isNone{true}
|
||||||
, streamBlocker{false}
|
|
||||||
, subscriptions{0}
|
, subscriptions{0}
|
||||||
{
|
{
|
||||||
subscriptions = 0;
|
subscriptions = 0;
|
||||||
|
@ -134,11 +133,7 @@ void CameraSource::destroyInstance()
|
||||||
*/
|
*/
|
||||||
void CameraSource::setupDefault()
|
void CameraSource::setupDefault()
|
||||||
{
|
{
|
||||||
setupDevice(CameraDevice::getDefaultDeviceName());
|
QString deviceName = CameraDevice::getDefaultDeviceName();
|
||||||
}
|
|
||||||
|
|
||||||
void CameraSource::setupDevice(const QString& deviceName)
|
|
||||||
{
|
|
||||||
bool isScreen = CameraDevice::isScreen(deviceName);
|
bool isScreen = CameraDevice::isScreen(deviceName);
|
||||||
VideoMode mode = VideoMode(Settings::getInstance().getScreenRegion());
|
VideoMode mode = VideoMode(Settings::getInstance().getScreenRegion());
|
||||||
if (!isScreen) {
|
if (!isScreen) {
|
||||||
|
@ -172,11 +167,6 @@ void CameraSource::setupDevice(const QString& DeviceName, const VideoMode& Mode)
|
||||||
openDevice();
|
openDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CameraSource::close()
|
|
||||||
{
|
|
||||||
setupDevice("none");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CameraSource::isNone() const
|
bool CameraSource::isNone() const
|
||||||
{
|
{
|
||||||
return _isNone;
|
return _isNone;
|
||||||
|
|
|
@ -40,9 +40,7 @@ public:
|
||||||
static CameraSource& getInstance();
|
static CameraSource& getInstance();
|
||||||
static void destroyInstance();
|
static void destroyInstance();
|
||||||
void setupDefault();
|
void setupDefault();
|
||||||
void setupDevice(const QString& deviceName);
|
|
||||||
void setupDevice(const QString& deviceName, const VideoMode& mode);
|
void setupDevice(const QString& deviceName, const VideoMode& mode);
|
||||||
void close();
|
|
||||||
bool isNone() const;
|
bool isNone() const;
|
||||||
|
|
||||||
// VideoSource interface
|
// VideoSource interface
|
||||||
|
@ -71,7 +69,6 @@ private:
|
||||||
QReadWriteLock streamMutex;
|
QReadWriteLock streamMutex;
|
||||||
|
|
||||||
std::atomic_bool _isNone;
|
std::atomic_bool _isNone;
|
||||||
std::atomic_bool streamBlocker;
|
|
||||||
std::atomic_int subscriptions;
|
std::atomic_int subscriptions;
|
||||||
|
|
||||||
static CameraSource* instance;
|
static CameraSource* instance;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user