fixed up bandwidth display when no video is selected

This commit is contained in:
csoler 2021-05-27 21:45:56 +02:00
parent b78f7f11de
commit 90bc88089c
2 changed files with 6 additions and 3 deletions

View file

@ -49,7 +49,7 @@ QVideoInputDevice::~QVideoInputDevice()
delete _timer; delete _timer;
} }
bool QVideoInputDevice::stopped() bool QVideoInputDevice::stopped() const
{ {
return _timer == NULL ; return _timer == NULL ;
} }
@ -204,6 +204,9 @@ bool QVideoInputDevice::getNextEncodedPacket(RsVOIPDataChunk& chunk)
uint32_t QVideoInputDevice::currentBandwidth() const uint32_t QVideoInputDevice::currentBandwidth() const
{ {
if(stopped())
return 0;
else
return _video_processor->currentBandwidthOut() ; return _video_processor->currentBandwidthOut() ;
} }

View file

@ -74,7 +74,7 @@ class QVideoInputDevice: public QObject
void start(const QString &description = QString()) ; void start(const QString &description = QString()) ;
void stop() ; void stop() ;
bool stopped(); bool stopped() const;
enum CameraStatus { enum CameraStatus {
CAMERA_IS_READY = 0x00, CAMERA_IS_READY = 0x00,