public bool Axis_StopVideoRecoerd()
        {
            if (viewer != null)
            {
                viewer.Stop();
                StopRenderThread();
                long position = 0;
                fileParser.Seek(ref position);
                viewer.OnMediaPosition -=
                    new IAxisMediaViewerEvents_OnMediaPositionEventHandler(OnMediaPosition);
                Marshal.FinalReleaseComObject(viewer);
                viewer = null;
                fileParser.Close();
                fileParser = null;
            }
            CurrentPlaybackState = Enum_VideoPlaybackState.Stopped;

            return(true);
        }
 private bool Axis_PlayVideoRecord()
 {
     if (CurrentPlaybackState == Enum_VideoPlaybackState.Playing)
     {
         return(false);
     }
     if (fileParser == null)
     {
         fileParser = new VideoBackPlay_AmpFileParser(CurrentVideoRecordInfo.RecordPath);
         CreateView(picPlaybackMain.Handle);
         int Temp_intValue = (fileParser.IsVideo ? 1 : 0) + (fileParser.IsAudio ? 2 : 0);
         CurrentVideoRecordInfo.VideoRecordFileType = (Enum_VideoRecordFileType)Temp_intValue;
         viewer.SetVideoPosition(0, 0, picPlaybackMain.Width, picPlaybackMain.Height);
     }
     viewer.Start();
     StartRenderThread();
     if (viewer.PlaybackRate != (double)playbackRate)
     {
         Seek(lastCurrentPosition, (double)playbackRate, true);
     }
     CurrentPlaybackState = Enum_VideoPlaybackState.Playing;
     //SetState(State.Playing);
     return(true);
 }