public static LibMWCapture.MWCAP_VIDEO_SIGNAL_STATUS?GetSignalStatus(int channelIndex, out LibMWCapture.MWCAP_AUDIO_VOLUME? audioStatus)
        {
            audioStatus = null;
            ushort[] wpath  = new ushort[512];
            IntPtr   pwpath = GCHandle.Alloc(wpath, GCHandleType.Pinned).AddrOfPinnedObject();

            LibMWCapture.MWGetDevicePath(channelIndex, pwpath);

            var videoChannel = LibMWCapture.MWOpenChannelByPath(pwpath);

            if (videoChannel == IntPtr.Zero)
            {
                return(null);
            }
            try
            {
                audioStatus = PInvokeTools.ReadStruct <LibMWCapture.MWCAP_AUDIO_VOLUME>(ptr =>
                                                                                        LibMWCapture.MWGetAudioVolume(videoChannel, LibMWCapture.MWCAP_AUDIO_NODE.MWCAP_AUDIO_EMBEDDED_CAPTURE, ptr));

                return(PInvokeTools.ReadStruct <LibMWCapture.MWCAP_VIDEO_SIGNAL_STATUS>(
                           ptr =>
                           LibMWCapture.MWGetVideoSignalStatus(videoChannel, ptr)));
            }
            finally
            {
                LibMWCapture.MWCloseChannel(videoChannel);
            }
        }
        public void Destory()
        {
            if (Video != IntPtr.Zero)
            {
                LibMWCapture.MWDestoryVideoCapture(Video);
                Video = IntPtr.Zero;
            }

            if (Audio != IntPtr.Zero)
            {
                LibMWCapture.MWDestoryAudioCapture(Audio);
                Audio = IntPtr.Zero;
            }

            if (VideoChannel != IntPtr.Zero)
            {
                LibMWCapture.MWCloseChannel(VideoChannel);
                VideoChannel = IntPtr.Zero;
            }

            if (D3DRenderer != IntPtr.Zero)
            {
                LibMWMedia.MWDestroyD3DRenderer(D3DRenderer);
                D3DRenderer = IntPtr.Zero;
            }

            if (AudioRender != IntPtr.Zero)
            {
                LibMWMedia.MWDestroyDSoundRenderer(AudioRender);
                AudioRender = IntPtr.Zero;
            }
        }