Пример #1
0
        //Event handler for the OnRecorderError recorder event
        public void RecorderErrorTextEventListener( snagRecorderError errorNum )
        {
            var strErrorNum = errorNum == 0 ? "None" : errorNum.ToString();
             var strErrMsg = strErrorNum;

             //There are two categories of errors: 1)From the recorder  2)From the encoder
             if ( errorNum == snagRecorderError.srErrEncoderThrownCode || errorNum == snagRecorderError.srErrRecorderThrownCode )
             {
            var bRecorderCode = errorNum == snagRecorderError.srErrRecorderThrownCode; //Determine if originating from the recorder
            var uCode = bRecorderCode ? snagVideo.RecorderErrorCode : snagVideo.EncoderErrorCode;
            strErrMsg = ( bRecorderCode ? "Recorder" : "Encoder" ) + " error code:" + uCode;
             }

             txtBoxErrors.Invoke( new UpdateRecorderErrorTextCallback( UpdateRecorderErrorText ), new object[]
                                                                          {
                                                                             strErrMsg
                                                                          } );
        }