public void refreshVideoInfo() { int dwDeviceIndex = m_oNetDemo.getDeviceIndex(); if (dwDeviceIndex < 0) { return; } if (NETDEMO.NETDEMO_DEVICE_TYPE_E.NETDEMO_DEVICE_VMS == m_deviceInfoList[dwDeviceIndex].m_eDeviceType) { /* not support */ } else { /* Get video stream info */ Int32 dwBytesReturned = 0; for (Int32 i = 0; i < 3; i++) { NETDEV_VIDEO_STREAM_INFO_S stStreamInfo = new NETDEV_VIDEO_STREAM_INFO_S(); stStreamInfo.enStreamType = (NETDEV_LIVE_STREAM_INDEX_E)i; int iRet = NETDEVSDK.NETDEV_GetDevConfig(m_deviceInfoList[dwDeviceIndex].m_lpDevHandle, m_oNetDemo.getChannelID(), (int)NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG, ref stStreamInfo, Marshal.SizeOf(stStreamInfo), ref dwBytesReturned); if (NETDEVSDK.TRUE != iRet) { m_oNetDemo.showFailLogInfo(m_deviceInfoList[dwDeviceIndex].m_ip + " chl:" + (m_oNetDemo.getChannelID()), "Get stream info, stream type : " + stStreamInfo.enStreamType, NETDEVSDK.NETDEV_GetLastError()); } else { m_oNetDemo.showSuccessLogInfo(m_deviceInfoList[dwDeviceIndex].m_ip + " chl:" + (m_oNetDemo.getChannelID()), "Get stream info, stream type : " + stStreamInfo.enStreamType); } m_deviceInfoList[dwDeviceIndex].m_channelInfoList[m_oNetDemo.getChannelIndex()].m_videoStreamInfo.videoStreamInfoList[i] = stStreamInfo; } m_oNetDemo.showVideoInfo(m_deviceInfoList[dwDeviceIndex].m_channelInfoList[m_oNetDemo.getChannelIndex()].m_videoStreamInfo.videoStreamInfoList[0]);/*默认显示主流*/ m_deviceInfoList[dwDeviceIndex].m_channelInfoList[m_oNetDemo.getChannelIndex()].m_videoStreamInfo.existFlag = true; } }
public void refreshVideoInfo() { /* Get video stream info */ Int32 dwBytesReturned = 0; for (Int32 i = 0; i < 3; i++) { NETDEV_VIDEO_STREAM_INFO_S stStreamInfo = new NETDEV_VIDEO_STREAM_INFO_S(); stStreamInfo.enStreamType = (NETDEV_LIVE_STREAM_INDEX_E)i; int iRet = NETDEVSDK.NETDEV_GetDevConfig(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_lpDevHandle, m_oNetDemo.m_curSelectedTreeChannelIndex + 1, (int)NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG, ref stStreamInfo, Marshal.SizeOf(stStreamInfo), ref dwBytesReturned); if (NETDEVSDK.TRUE != iRet) { m_oNetDemo.showFailLogInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_ip + " chl:" + (m_oNetDemo.m_curSelectedTreeChannelIndex + 1), "Get stream info, stream type : " + stStreamInfo.enStreamType, NETDEVSDK.NETDEV_GetLastError()); } m_oNetDemo.showSuccessLogInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_ip + " chl:" + (m_oNetDemo.m_curSelectedTreeChannelIndex + 1), "Get stream info, stream type : " + stStreamInfo.enStreamType); m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_videoStreamInfo.videoStreamInfoList[i] = stStreamInfo; } m_oNetDemo.showVideoInfo(m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_videoStreamInfo.videoStreamInfoList[0]);/*默认显示主流*/ m_deviceInfoList[m_oNetDemo.m_curSelectedTreeDeviceIndex].m_channelInfoList[m_oNetDemo.m_curSelectedTreeChannelIndex].m_videoStreamInfo.existFlag = true; }