Ejemplo n.º 1
0
    void User::CheckSpeakingState()
    {
        bool was_speaking = speaking_;

        if (speaking_ && last_audio_frame_time_.elapsed() > SPEAKING_TIMEOUT_MS)
        {
            speaking_ = false;
            if (was_speaking && !speaking_)
                emit StopReceivingAudio();
        }
    }
Ejemplo n.º 2
0
 Participant::Participant(QString name, MumbleLib::User* user) :
     muted_(false),
     speaking_(false),
     position_known_(false),
     position_(0.0, 0.0, 0.0),
     user_(user),
     name_(name),
     voice_activity_(0)
 {
     connect(user_, SIGNAL(StartReceivingAudio()), SLOT(OnStartSpeaking()) );
     connect(user_, SIGNAL(StopReceivingAudio()), SLOT(OnStopSpeaking()) );
     connect(user_, SIGNAL(PositionUpdated()), SLOT(OnPositionUpdated()) );
     connect(user_, SIGNAL(Left()), SLOT(OnUserLeft()) );
     connect(user_, SIGNAL(destroyed()), SLOT(UserObjectDestroyed()));
 }
Ejemplo n.º 3
0
bool MediaBridgeSession::End()
{
	//Check if we are running
	if (!inited)
		return false;

	Log(">MediaBridgeSession end\n");

	//Stop everithing
	StopReceivingAudio();
	StopReceivingVideo();
	StopReceivingText();
	StopSendingAudio();
	StopSendingVideo();
	StopSendingText();

	//Remove meta
	if (meta)
		//delete objet
		delete(meta);
	//No meta
	meta = NULL;

	//Close smoother
	smoother.End();

	//End rtp
	rtpAudio.End();
	rtpVideo.End();
	rtpText.End();

	//Stop
	inited=0;

	Log("<MediaBridgeSession end\n");

	return true;
}
Ejemplo n.º 4
0
int  MediaBridgeSession::StartReceivingAudio(RTPMap& rtpMap)
{
	//Si estabamos reciviendo tenemos que parar
	if (receivingAudio)
		StopReceivingAudio();

	//Iniciamos las sesiones rtp de recepcion
	int recAudioPort= rtpAudio.GetLocalPort();

	//Set receving map
	rtpAudio.SetReceivingRTPMap(rtpMap);

	//Estamos recibiendo
	receivingAudio=1;

	//Arrancamos los procesos
	createPriorityThread(&recAudioThread,startReceivingAudio,this,0);

	//Logeamos
	Log("-StartReceivingAudio [%d]\n",recAudioPort);

	return recAudioPort;
}