int RTPEndpoint::End()
{
        //Chec
        if (!inited)
                //Exit
                return 0;
        
        //Not inited anymore
        inited = false;
	
        //Detach if joined
	Dettach();

        //Stop
        RTPSession::End();

	//If receiving
	if (receiving)
		//Stop it
		StopReceiving();
}
Example #2
0
int main(int argc,char* argv[])
{
	if (argc==2 && stricmp(argv[1],"-unstall")==0)
	{
		Dettach();
	}

	//为了保险,提个权先
	AddPrivilege();

	int pid = IExcute();

	if (pid==0)
	{
		return 0;
	}

	DllInject(pid,DLLNAME);

	CleanJob();

	return 0;
}