mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
perf(camerasource): Passed parameter by reference
This commit is contained in:
parent
25cec623fa
commit
910c41f4fa
|
@ -65,12 +65,12 @@ void CameraSource::open()
|
|||
open(CameraDevice::getDefaultDeviceName());
|
||||
}
|
||||
|
||||
void CameraSource::open(const QString deviceName)
|
||||
void CameraSource::open(const QString& deviceName)
|
||||
{
|
||||
open(deviceName, VideoMode{0,0,0,0});
|
||||
}
|
||||
|
||||
void CameraSource::open(const QString DeviceName, VideoMode Mode)
|
||||
void CameraSource::open(const QString& DeviceName, VideoMode Mode)
|
||||
{
|
||||
streamBlocker = true;
|
||||
QMutexLocker l{&biglock};
|
||||
|
|
|
@ -52,8 +52,8 @@ public:
|
|||
/// Opens the source for the camera device in argument, in the settings, or the system default
|
||||
/// If a device is already open, the source will seamlessly switch to the new device
|
||||
void open();
|
||||
void open(const QString deviceName);
|
||||
void open(const QString deviceName, VideoMode mode);
|
||||
void open(const QString& deviceName);
|
||||
void open(const QString& deviceName, VideoMode mode);
|
||||
void close(); ///< Equivalent to opening the source with the video device "none". Stops streaming.
|
||||
bool isOpen();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user