Exemplo n.º 1
0
	void Usage(const char *executable) {
		SID_INFO("usage:");
		SID_INFO("	%s [options]", executable);
		SID_INFO("	options:");
		SID_INFO("		-h - print help");
		SID_INFO("		-s prefix - path prefix for ipc key. default /tmp/");
	}
 void Usage(const char *executable) {
     SID_INFO("usage:");
     SID_INFO("	%s [options]", executable);
     SID_INFO("	options:");
     SID_INFO("		-h           - print help");
     SID_INFO("		-s prefix    - path prefix for ipc key. default %s", IPC_PREFIX_DEFAULT);
     SID_INFO("		-f frequency - force sampling frequency");
     SID_INFO("		-ci channels - force number of input channels");
     SID_INFO("		-co channels - force number of output channels");
     SID_INFO("		-d delay     - delay of the loopback signal, possible values: 0 - 2000 ms, default: 200 ms");
 }
Exemplo n.º 3
0
	void Usage(const char *executable) {
		SID_INFO("usage:");
		SID_INFO("	%s [options]", executable);
		SID_INFO("	options:");
		SID_INFO("		-h         - print help");
		SID_INFO("		-s prefix  - path prefix for ipc key. default /tmp/");
		SID_INFO("		-l         - loop the input file");
		SID_INFO("		-i infile  - input file name");
		SID_INFO("		-o outfile - output file name");
	}
void SidVideoHostConnection::StartIpcThread(const char *ipcprefix) {
	Sid::Mutex::ScopedLock l(m_Mutex);
	SID_INFO("StartVideohostThread");

	m_pRtpIf = SkypeVideoRTPInterfaceGet(&m_RtpIfClient);
	m_RtpIfServer.set_if(m_pRtpIf);

	snprintf(m_FromSkypekitKey, sizeof(m_FromSkypekitKey), "%svidrtp_from_skypekit_key", ipcprefix);
	snprintf(m_ToSkypekitKey, sizeof(m_ToSkypekitKey), "%svidrtp_to_skypekit_key", ipcprefix);
	Start();
	m_Started = true;
}
void SidVideoHostConnection::Run() {
	SID_INFO("StartVideohostThread enter");
	if (m_RtpIfServer.Connect(m_FromSkypekitKey, 0)) {
		m_RtpIfClient.Connect(m_ToSkypekitKey, 2500);
		if (!m_RtpIfClient.IsConnected()) {
			m_RtpIfServer.Disconnect();
			SID_ERROR("StartVideohostThread m_RtpIfClient connection failed");
			return;
		}
	} else {
		SID_ERROR("StartVideohostThread m_RtpIfServer connection failed");
		return;
	}
	SID_INFO("StartVideohostThread connected");
	Sid::Protocol::Status status;
	do {
		status = m_RtpIfServer.ProcessCommands();
	} while (status == Sid::Protocol::OK);
	Disconnect();
	SID_INFO("StartVideohostThread exit");
}
void SidVideoHostConnection::WaitDisconnect() {
	Sid::Mutex::ScopedLock l(m_Mutex);
	SID_INFO("WaitDisconnect enter");

	if (m_Started) {
		Stop();
		SkypeVideoRTPInterfaceRelease(m_pRtpIf);
		m_pRtpIf = NULL;
		m_RtpIfServer.Disconnect();
		m_RtpIfClient.Disconnect();
		m_Started = false;
	} else {
		SID_ERROR("WaitDisconnect - thread not started");
		return;
	}
}