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 LibMWCapture.MWCAP_VIDEO_SIGNAL_STATUS GetVideoSignalStatus() { return(PInvokeTools.ReadStruct <LibMWCapture.MWCAP_VIDEO_SIGNAL_STATUS>(ptr => LibMWCapture.MWGetVideoSignalStatus(VideoChannel, ptr))); }
public LibMWCapture.MWCAP_AUDIO_VOLUME GetMWAudioVolume() { return(PInvokeTools.ReadStruct <LibMWCapture.MWCAP_AUDIO_VOLUME>(ptr => LibMWCapture.MWGetAudioVolume(VideoChannel, LibMWCapture.MWCAP_AUDIO_NODE.MWCAP_AUDIO_EMBEDDED_CAPTURE, ptr))); }
public static void GetChannelInfobyIndex(int nChannelIndex, ref LibMWCapture.MWCAP_CHANNEL_INFO channelInfo) { channelInfo = PInvokeTools.ReadStruct <LibMWCapture.MWCAP_CHANNEL_INFO>(ptr => LibMWCapture.MWGetChannelInfoByIndex(nChannelIndex, ptr)); }