mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 07:55:44 -04:00
fixed up bandwidth display when no video is selected
This commit is contained in:
parent
b78f7f11de
commit
90bc88089c
2 changed files with 6 additions and 3 deletions
|
@ -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() ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue