bool RollActivityPart(ref OMSDIO ini, ref int MessID, ref int LogStep, int ToStep) { if (LogStep > ToStep) { return(false); } if (MessID <= ini.GetMessageCount()) { string s = ini.GetMessage(MessID); if (!string.IsNullOrEmpty(s)) { EventConsumer.FireLogStepEvent(s); } MessID++; int MC = ini.GetMessageOfs(LogStep + 1); if ((MC > 0) && (MessID >= MC)) { if ((ini.GetFailBits() & (1 << LogStep)) == 0) //if ((ini.GetPassBits() & (1 << LogStep)) != 0) { EventConsumer.FireStepPassed(); InStep = false; } else { string ErrorLine; GetErrorDescription(out ErrorLine); throw new VideoException(ErrorLine); } do { // bypassing steps LogStep++; MC = ini.GetMessageOfs(LogStep); System.Threading.Thread.Sleep(1); }while ((MC > 0) && (MessID >= MC)); LogStep--; if (LogStep <= ToStep) { EventConsumer.FireBeginStep(StepNames[LogStep]); InStep = true; } } return(true); } else { System.Threading.Thread.Sleep(100); return(false); } }
private bool GetErrorDescription(out string Error) { Error = "Internal error"; OMSDIO ini = new OMSDIO(FileName); int FailStep = ini.GetCurrentStep(); if (FailStep != 0) { int FailBits = ini.GetFailBits(); for (FailStep = 0; ((FailBits & (1 << FailStep)) == 0) && (FailStep < 12); FailStep++) { } ; if (FailStep >= 12) { return(false); } } switch (FailStep) { case 0: Error = "RTSP filter not found, please check your installation"; break; case 1: Error = "RTSP filter internal error, initialization failed"; break; case 2: Error = "OPTIONS command error, please check your connection"; break; case 3: Error = "OPTIONS validation error"; //, OPTIONS = [" + ini.GetMessage(ini.GetMessageOfs(4) - 2) + "]"; break; case 4: Error = "DESCRIBE command error, please check your connection"; break; case 5: Error = "No known media sources found"; break; case 6: Error = "SETUP command error"; break; case 7: Error = "PLAY command error"; break; case 8: Error = "No media frames within timeout, please check your connection"; break; case 9: Error = "RTSP filter internal error - race conditions"; break; case 10: Error = "TEARDOWN command error"; break; case 11: Error = "RTSP filter internal error - finalization failed"; break; //default : //Error = "ddd"; //break; } return(true); }
private bool GetErrorDescription(out string Error) { Error = "Internal error"; OMSDIO ini = new OMSDIO(FileName); int FailStep = ini.GetCurrentStep(); if (FailStep != 0) { int FailBits = ini.GetFailBits(); for (FailStep = 0; ((FailBits & (1 << FailStep)) == 0) && (FailStep < step_End); FailStep++) { } ; if (FailStep >= step_End) { return(false); } } switch (FailStep) { case step_Constructed: Error = "RTSP filter not found, please check your installation"; break; case step_InitEnvironment: Error = "RTSP filter internal error, initialization failed"; break; case step_OPTIONS: Error = "OPTIONS command error, please check your connection"; break; case step_CheckOptions: Error = "OPTIONS validation error"; //, OPTIONS = [" + ini.GetMessage(ini.GetMessageOfs(4) - 2) + "]"; break; case step_DESCRIBE: Error = "DESCRIBE command error, please check your connection"; break; case step_OpenStream: Error = "No known media sources found"; break; case step_SETUP: Error = "SETUP command error"; break; case step_PLAY: Error = "PLAY command error"; break; case step_WaitStream: Error = "No media frames within timeout, please check your connection"; break; case step_PAUSE: Error = "PAUSE command error"; break; case step_StopThread: Error = "RTSP filter internal error - race conditions"; break; case step_TEARDOWN: Error = "TEARDOWN command error"; break; case step_HaltEnvironment: Error = "RTSP filter internal error - finalization failed"; break; //default : //Error = "ddd"; //break; } return(true); }