Merge pull request #368 from pljones/feature/295-receive-and-display-recorder-state
#295 Part 3: Client side changes for recorder state - the end
This commit is contained in:
commit
ac9f054ee3
9 changed files with 50 additions and 3 deletions
32
src/audiomixerboard.cpp
Normal file → Executable file
32
src/audiomixerboard.cpp
Normal file → Executable file
|
@ -619,7 +619,8 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
||||||
bIsPanSupported ( false ),
|
bIsPanSupported ( false ),
|
||||||
bNoFaderVisible ( true ),
|
bNoFaderVisible ( true ),
|
||||||
iMyChannelID ( INVALID_INDEX ),
|
iMyChannelID ( INVALID_INDEX ),
|
||||||
strServerName ( "" )
|
strServerName ( "" ),
|
||||||
|
eRecorderState ( RS_UNDEFINED )
|
||||||
{
|
{
|
||||||
// add group box and hboxlayout
|
// add group box and hboxlayout
|
||||||
QHBoxLayout* pGroupBoxLayout = new QHBoxLayout ( this );
|
QHBoxLayout* pGroupBoxLayout = new QHBoxLayout ( this );
|
||||||
|
@ -627,6 +628,14 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
|
||||||
pScrollArea = new CMixerBoardScrollArea ( this );
|
pScrollArea = new CMixerBoardScrollArea ( this );
|
||||||
pMainLayout = new QHBoxLayout ( pMixerWidget );
|
pMainLayout = new QHBoxLayout ( pMixerWidget );
|
||||||
|
|
||||||
|
|
||||||
|
setAccessibleName ( "Personal Mix at the Server groupbox" );
|
||||||
|
setWhatsThis ( "<b>" + tr( "Personal Mix at the Server" ) + "</b>: " +
|
||||||
|
tr ( "When connected to a server, the controls here allow you to set " ) +
|
||||||
|
tr ( "your local mix without affecting what others hear from you.") + "<br/>" +
|
||||||
|
tr ( "The title shows the server name and, when known, "
|
||||||
|
"whether it is actively recording." ) );
|
||||||
|
|
||||||
// set title text (default: no server given)
|
// set title text (default: no server given)
|
||||||
SetServerName ( "" );
|
SetServerName ( "" );
|
||||||
|
|
||||||
|
@ -807,13 +816,32 @@ void CAudioMixerBoard::ChangeFaderOrder ( const bool bDoSort,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CAudioMixerBoard::GetTitle()
|
||||||
|
{
|
||||||
|
QString myTitle = "";
|
||||||
|
if ( eRecorderState == RS_RECORDING )
|
||||||
|
{
|
||||||
|
myTitle = "[" + tr ( "RECORDING ACTIVE" ) + "] ";
|
||||||
|
}
|
||||||
|
return myTitle + tr ( "Personal Mix at: " ) + strServerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAudioMixerBoard::SetRecorderState ( const ERecorderState newRecorderState )
|
||||||
|
{
|
||||||
|
eRecorderState = newRecorderState;
|
||||||
|
if ( !strServerName.isEmpty() && !bNoFaderVisible )
|
||||||
|
{
|
||||||
|
setTitle ( GetTitle() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CAudioMixerBoard::ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInfo )
|
void CAudioMixerBoard::ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInfo )
|
||||||
{
|
{
|
||||||
// we want to set the server name only if the very first faders appear
|
// we want to set the server name only if the very first faders appear
|
||||||
// in the audio mixer board to show a "try to connect" before
|
// in the audio mixer board to show a "try to connect" before
|
||||||
if ( bNoFaderVisible )
|
if ( bNoFaderVisible )
|
||||||
{
|
{
|
||||||
setTitle ( tr ( "Personal Mix at the Server: " ) + strServerName );
|
setTitle ( GetTitle() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// get number of connected clients
|
// get number of connected clients
|
||||||
|
|
5
src/audiomixerboard.h
Normal file → Executable file
5
src/audiomixerboard.h
Normal file → Executable file
|
@ -164,6 +164,8 @@ public:
|
||||||
|
|
||||||
void SetChannelLevels ( const CVector<uint16_t>& vecChannelLevel );
|
void SetChannelLevels ( const CVector<uint16_t>& vecChannelLevel );
|
||||||
|
|
||||||
|
void SetRecorderState ( const ERecorderState newRecorderState );
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
CVector<QString> vecStoredFaderTags;
|
CVector<QString> vecStoredFaderTags;
|
||||||
CVector<int> vecStoredFaderLevels;
|
CVector<int> vecStoredFaderLevels;
|
||||||
|
@ -188,6 +190,8 @@ protected:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QString GetTitle();
|
||||||
|
|
||||||
bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
bool GetStoredFaderSettings ( const CChannelInfo& ChanInfo,
|
||||||
int& iStoredFaderLevel,
|
int& iStoredFaderLevel,
|
||||||
int& iStoredPanValue,
|
int& iStoredPanValue,
|
||||||
|
@ -209,6 +213,7 @@ protected:
|
||||||
bool bNoFaderVisible;
|
bool bNoFaderVisible;
|
||||||
int iMyChannelID;
|
int iMyChannelID;
|
||||||
QString strServerName;
|
QString strServerName;
|
||||||
|
ERecorderState eRecorderState;
|
||||||
|
|
||||||
virtual void UpdateGainValue ( const int iChannelIdx,
|
virtual void UpdateGainValue ( const int iChannelIdx,
|
||||||
const double dValue,
|
const double dValue,
|
||||||
|
|
|
@ -108,6 +108,9 @@ qRegisterMetaType<CHostAddress> ( "CHostAddress" );
|
||||||
QObject::connect ( &Protocol, &CProtocol::VersionAndOSReceived,
|
QObject::connect ( &Protocol, &CProtocol::VersionAndOSReceived,
|
||||||
this, &CChannel::VersionAndOSReceived );
|
this, &CChannel::VersionAndOSReceived );
|
||||||
|
|
||||||
|
QObject::connect ( &Protocol, &CProtocol::RecorderStateReceived,
|
||||||
|
this, &CChannel::RecorderStateReceived );
|
||||||
|
|
||||||
QObject::connect ( &Protocol, &CProtocol::ReqChannelLevelList,
|
QObject::connect ( &Protocol, &CProtocol::ReqChannelLevelList,
|
||||||
this, &CChannel::OnReqChannelLevelList );
|
this, &CChannel::OnReqChannelLevelList );
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,6 +290,7 @@ signals:
|
||||||
void ReqNetTranspProps();
|
void ReqNetTranspProps();
|
||||||
void LicenceRequired ( ELicenceType eLicenceType );
|
void LicenceRequired ( ELicenceType eLicenceType );
|
||||||
void VersionAndOSReceived ( COSUtil::EOpSystemType eOSType, QString strVersion );
|
void VersionAndOSReceived ( COSUtil::EOpSystemType eOSType, QString strVersion );
|
||||||
|
void RecorderStateReceived ( ERecorderState eRecorderState );
|
||||||
void Disconnected();
|
void Disconnected();
|
||||||
|
|
||||||
void DetectedCLMessage ( CVector<uint8_t> vecbyMesBodyData,
|
void DetectedCLMessage ( CVector<uint8_t> vecbyMesBodyData,
|
||||||
|
|
|
@ -165,6 +165,9 @@ CClient::CClient ( const quint16 iPortNumber,
|
||||||
QObject::connect ( &Channel, &CChannel::VersionAndOSReceived,
|
QObject::connect ( &Channel, &CChannel::VersionAndOSReceived,
|
||||||
this, &CClient::VersionAndOSReceived );
|
this, &CClient::VersionAndOSReceived );
|
||||||
|
|
||||||
|
QObject::connect ( &Channel, &CChannel::RecorderStateReceived,
|
||||||
|
this, &CClient::RecorderStateReceived );
|
||||||
|
|
||||||
QObject::connect ( &ConnLessProtocol, &CProtocol::CLMessReadyForSending,
|
QObject::connect ( &ConnLessProtocol, &CProtocol::CLMessReadyForSending,
|
||||||
this, &CClient::OnSendCLProtMessage );
|
this, &CClient::OnSendCLProtMessage );
|
||||||
|
|
||||||
|
|
|
@ -424,6 +424,7 @@ signals:
|
||||||
void LicenceRequired ( ELicenceType eLicenceType );
|
void LicenceRequired ( ELicenceType eLicenceType );
|
||||||
void VersionAndOSReceived ( COSUtil::EOpSystemType eOSType, QString strVersion );
|
void VersionAndOSReceived ( COSUtil::EOpSystemType eOSType, QString strVersion );
|
||||||
void PingTimeReceived ( int iPingTime );
|
void PingTimeReceived ( int iPingTime );
|
||||||
|
void RecorderStateReceived ( ERecorderState eRecorderState );
|
||||||
|
|
||||||
void CLServerListReceived ( CHostAddress InetAddr,
|
void CLServerListReceived ( CHostAddress InetAddr,
|
||||||
CVector<CServerInfo> vecServerInfo );
|
CVector<CServerInfo> vecServerInfo );
|
||||||
|
|
|
@ -472,6 +472,9 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
|
||||||
QObject::connect ( pClient, &CClient::MuteStateHasChangedReceived,
|
QObject::connect ( pClient, &CClient::MuteStateHasChangedReceived,
|
||||||
this, &CClientDlg::OnMuteStateHasChangedReceived );
|
this, &CClientDlg::OnMuteStateHasChangedReceived );
|
||||||
|
|
||||||
|
QObject::connect ( pClient, &CClient::RecorderStateReceived,
|
||||||
|
this, &CClientDlg::OnRecorderStateReceived );
|
||||||
|
|
||||||
// This connection is a special case. On receiving a licence required message via the
|
// This connection is a special case. On receiving a licence required message via the
|
||||||
// protocol, a modal licence dialog is opened. Since this blocks the thread, we need
|
// protocol, a modal licence dialog is opened. Since this blocks the thread, we need
|
||||||
// a queued connection to make sure the core protocol mechanism is not blocked, too.
|
// a queued connection to make sure the core protocol mechanism is not blocked, too.
|
||||||
|
|
|
@ -221,6 +221,9 @@ public slots:
|
||||||
void OnDisplayChannelLevelsChanged()
|
void OnDisplayChannelLevelsChanged()
|
||||||
{ MainMixerBoard->SetDisplayChannelLevels ( pClient->GetDisplayChannelLevels() ); }
|
{ MainMixerBoard->SetDisplayChannelLevels ( pClient->GetDisplayChannelLevels() ); }
|
||||||
|
|
||||||
|
void OnRecorderStateReceived ( ERecorderState eRecorderState )
|
||||||
|
{ MainMixerBoard->SetRecorderState ( eRecorderState ); }
|
||||||
|
|
||||||
void OnAudioChannelsChanged() { UpdateRevSelection(); }
|
void OnAudioChannelsChanged() { UpdateRevSelection(); }
|
||||||
void OnNumClientsChanged ( int iNewNumClients );
|
void OnNumClientsChanged ( int iNewNumClients );
|
||||||
void OnNewClientLevelChanged() { MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; }
|
void OnNewClientLevelChanged() { MainMixerBoard->iNewClientFaderLevel = pClient->iNewClientFaderLevel; }
|
||||||
|
|
Loading…
Reference in a new issue