void QtConfrenceVideoWindow::updateRecordTextLabel(const QString &str)
{
  _recMsg = str;
  if (!_showRtcp) {
    updateTextLabel(_displayName + _recMsg);
  }
}
void QtConfrenceVideoWindow::setDisplayName( const QString displayName )
{
	this->_displayName = displayName;
  if (!_showRtcp) {
    updateTextLabel(_displayName);
  }  
}
예제 #3
0
void RGraphicsViewQt::emitUpdateTextLabel(const RTextLabel& textLabel) {
    if (receivers(SIGNAL(updateTextLabel(QPainter*, const RTextLabel&))) > 0) {
        QPainter gbPainter(&graphicsBufferWithPreview);
        emit(updateTextLabel(&gbPainter, textLabel));
        gbPainter.end();
    }
}
void QtConfrenceVideoWindow::updateRtcpEventHandler( const RtpStatItem &rtpstat )
{
  QString msg_format;
  if (_isLabelTransparent) {
    // 背景透明时分行显示
    msg_format = "Bandwidth:%1kb/s\nDelay:%2ms\nLost:%3%";
  } else {
    msg_format = "Bandwidth:%1kb/s  Delay:%2ms  Lost:%3%";
  }

  _rtcpMsg = msg_format.arg(rtpstat.recv_bandwidth, 0 , 'f', 2)
    .arg(rtpstat.delay)
    .arg(rtpstat.lost);

  if (_showRtcp) {
    updateTextLabel(_rtcpMsg);
  }
}
void QtConfrenceVideoWindow::hideRtcpMessage()
{
  _showRtcp = false;
  updateTextLabel(_displayName);
}
void QtConfrenceVideoWindow::showRtcpMessage()
{
  _showRtcp = true;
  updateTextLabel(_rtcpMsg);
}