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;
}
bool QVideoInputDevice::stopped()
bool QVideoInputDevice::stopped() const
{
return _timer == NULL ;
}
@ -204,7 +204,10 @@ bool QVideoInputDevice::getNextEncodedPacket(RsVOIPDataChunk& chunk)
uint32_t QVideoInputDevice::currentBandwidth() const
{
return _video_processor->currentBandwidthOut() ;
if(stopped())
return 0;
else
return _video_processor->currentBandwidthOut() ;
}
QVideoOutputDevice::QVideoOutputDevice(QWidget *parent)

View File

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