package com.ycl.api.YS.config.video; import com.sun.jna.ptr.IntByReference; import com.ycl.api.YS.NetDemo; import com.ycl.api.YS.lib.NetDEVSDKLib.*; import javax.swing.*; import java.util.InputMismatchException; /** * * @introduction Device stream information * @description Support IPC/NVR */ public class Stream { /** * * @introduction Get stream information * @description Calling the interface of NETDEV_GetDevConfig * */ public static void getStreamInfo() { if(null == NetDemo.lpUserID){ JOptionPane.showMessageDialog(null, "Please Login device first. error code"+NetDemo.netdevsdk.NETDEV_GetLastError()); return; } if(NetDemo.ChannelID == 0){ JOptionPane.showMessageDialog(null, "Please select an online channel after login."); return; } if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_VMS){ JOptionPane.showMessageDialog(null, "Not support vms"); return; } if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ACS|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ECONOMIC_FISHEYE|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_FISHEYE) { NETDEV_VIDEO_STREAM_INFO_LIST_S stStreamInfoList = new NETDEV_VIDEO_STREAM_INFO_LIST_S(); stStreamInfoList.udwNum = 16; if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex())==null) { return; } stStreamInfoList.write(); IntByReference dwBytesReturned = new IntByReference(); boolean bRet = NetDemo.netdevsdk.NETDEV_GetDevConfig(NetDemo.lpUserID, NetDemo.ChannelID, NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG_EX, stStreamInfoList.getPointer(), stStreamInfoList.size(), dwBytesReturned ); if(bRet != true) { System.out.printf("NETDEV_GetDevConfig failed:%d\n", NetDemo.netdevsdk.NETDEV_GetLastError()); return; }else { stStreamInfoList.read(); for(int i=0 ;i < stStreamInfoList.udwNum; i++) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { NetDemo.chckbxBViedeoenable.setSelected(stStreamInfoList.astVideoStreamInfoList[i].bEnabled != 0); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } } } else { NETDEV_VIDEO_STREAM_INFO_LIST_S stStreamInfoList = new NETDEV_VIDEO_STREAM_INFO_LIST_S(); stStreamInfoList.udwNum = 16; if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex())==null) { return; } stStreamInfoList.write(); IntByReference dwBytesReturned = new IntByReference(); boolean bRet = NetDemo.netdevsdk.NETDEV_GetDevConfig(NetDemo.lpUserID, NetDemo.ChannelID, NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG_EX, stStreamInfoList.getPointer(), stStreamInfoList.size(), dwBytesReturned ); if(bRet != true) { System.out.printf("NETDEV_GetDevConfig failed:%d\n", NetDemo.netdevsdk.NETDEV_GetLastError()); return; }else { stStreamInfoList.read(); for(int i=0 ;i < stStreamInfoList.udwNum; i++) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex()==0) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(NetDemo.jComboBoxMainStreamType.getSelectedIndex()==stStreamInfoList.astVideoStreamInfoList[i].udwMainStreamType) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } }else { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } } } } } /** * * @introduction Change stream type combox * @description * */ public static void comboxMainStreamType() { if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ACS|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ECONOMIC_FISHEYE|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_FISHEYE) { return; }else if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_VMS) { return; } else { NETDEV_VIDEO_STREAM_INFO_LIST_S stStreamInfoList = new NETDEV_VIDEO_STREAM_INFO_LIST_S(); stStreamInfoList.udwNum = 16; if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex())==null) { return; } stStreamInfoList.write(); IntByReference dwBytesReturned = new IntByReference(); boolean bRet = NetDemo.netdevsdk.NETDEV_GetDevConfig(NetDemo.lpUserID, NetDemo.ChannelID, NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG_EX, stStreamInfoList.getPointer(), stStreamInfoList.size(), dwBytesReturned ); if(bRet != true) { System.out.printf("NETDEV_GetDevConfig failed:%d\n", NetDemo.netdevsdk.NETDEV_GetLastError()); return; }else { stStreamInfoList.read(); for(int i=0 ;i < stStreamInfoList.udwNum; i++) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex()==0) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(NetDemo.jComboBoxMainStreamType.getSelectedIndex()==stStreamInfoList.astVideoStreamInfoList[i].udwMainStreamType) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } }else { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } } } } } /** * * @introduction Change stream combox * @description Inclding MAIN/AUX/THIRD * */ public static void comboxStream() { if(null == NetDemo.lpUserID){ JOptionPane.showMessageDialog(null, "Please Login device first. error code"+NetDemo.netdevsdk.NETDEV_GetLastError()); } if(NetDemo.ChannelID == 0){ JOptionPane.showMessageDialog(null, "Please select an online channel after login."); return; } if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_VMS) { JOptionPane.showMessageDialog(null, "Not support vms"); return; } if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ACS|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ECONOMIC_FISHEYE|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_FISHEYE) { NETDEV_VIDEO_STREAM_INFO_LIST_S stStreamInfoList = new NETDEV_VIDEO_STREAM_INFO_LIST_S(); stStreamInfoList.udwNum = 16; if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex())==null) { return; } stStreamInfoList.write(); IntByReference dwBytesReturned = new IntByReference(); boolean bRet = NetDemo.netdevsdk.NETDEV_GetDevConfig(NetDemo.lpUserID, NetDemo.ChannelID, NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG_EX, stStreamInfoList.getPointer(), stStreamInfoList.size(), dwBytesReturned ); if(bRet != true) { System.out.printf("NETDEV_GetDevConfig failed:%d\n", NetDemo.netdevsdk.NETDEV_GetLastError()); return; }else { stStreamInfoList.read(); for(int i=0 ;i < stStreamInfoList.udwNum; i++) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } } } else { NETDEV_VIDEO_STREAM_INFO_LIST_S stStreamInfoList = new NETDEV_VIDEO_STREAM_INFO_LIST_S(); stStreamInfoList.udwNum = 16; if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex())==null) { return; } stStreamInfoList.write(); IntByReference dwBytesReturned = new IntByReference(); boolean bRet = NetDemo.netdevsdk.NETDEV_GetDevConfig(NetDemo.lpUserID, NetDemo.ChannelID, NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG_EX, stStreamInfoList.getPointer(), stStreamInfoList.size(), dwBytesReturned ); if(bRet != true) { System.out.printf("NETDEV_GetDevConfig failed:%d\n", NetDemo.netdevsdk.NETDEV_GetLastError()); return; }else { stStreamInfoList.read(); for(int i=0 ;i < stStreamInfoList.udwNum; i++) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex()==0) { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(NetDemo.jComboBoxMainStreamType.getSelectedIndex()==stStreamInfoList.astVideoStreamInfoList[i].udwMainStreamType) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } }else { if(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex() == stStreamInfoList.astVideoStreamInfoList[i].udwStreamID) { if(stStreamInfoList.astVideoStreamInfoList[i].bEnabled==0) { NetDemo.chckbxBViedeoenable.setSelected(false); }else { NetDemo.chckbxBViedeoenable.setSelected(true); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat == NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_MJPEG) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(0); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat ==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H264) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(1); } else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwEncodeFormat==NETDEV_VIDEO_CODE_TYPE_E.NETDEV_VIDEO_CODE_H265) { NetDemo.comboBoxConfigVideoStreamEncodeFormat.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_CBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrateType==NETDEV_BIT_RATE_TYPE_E.NETDEV_BIT_RATE_TYPE_VBR) { NetDemo.comboBoxConfigVideoStreamRate.setSelectedIndex(1); } int udwImageQuality = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwImageQuality; NetDemo.comboBoxConfigVideoStreamQuality.setSelectedIndex(udwImageQuality-1); int udwSmoothLevel = stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmoothLevel; NetDemo.jComboBoxSmoothLevel.setSelectedIndex(udwSmoothLevel-1); if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_OFF) { NetDemo.jComboBoxUcode.setSelectedIndex(0); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_BASIC) { NetDemo.jComboBoxUcode.setSelectedIndex(1); }else if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwSmartEncodeMode==NETDEV_SMART_ENCODE_MODE_E.NETDEV_SMART_ENCODE_MODE_ADVANCED) { NetDemo.jComboBoxUcode.setSelectedIndex(2); } if(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.bEnableSVCMode==0) { NetDemo.jRadioButtonCloseSVC.setSelected(true); NetDemo.jRadioButtonOpenSVC.setSelected(false); }else { NetDemo.jRadioButtonOpenSVC.setSelected(true); NetDemo.jRadioButtonCloseSVC.setSelected(false); } int dwWidth=stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwWidth; NetDemo.textFieldConfigVideoStreamFrameRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwFrameRate)); NetDemo.textFieldConfigVideoStreamResolutionWidth.setText(String.valueOf(dwWidth)); NetDemo.textFieldConfigVideoStreamResolutionHigth.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwHeight)); NetDemo.textFieldConfigVideoStreamBitRate.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwBitrate)); NetDemo.textFieldConfigVideoStreamIFremeInterval.setText(String.valueOf(stStreamInfoList.astVideoStreamInfoList[i].stVideoEncodeInfo.udwIFrameInterval)); } } } } } } /** * * @introduction Set stream information * @description Calling the interface of NETDEV_SetDevConfig * */ public static void setStream() { if(null == NetDemo.lpUserID){ JOptionPane.showMessageDialog(null, "Please Login device first. error code"+NetDemo.netdevsdk.NETDEV_GetLastError()); return; } if(NetDemo.ChannelID == 0){ JOptionPane.showMessageDialog(null, "Please select an online channel after login."); return; } if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_VMS) { JOptionPane.showMessageDialog(null, "Not support vms"); return; } NETDEV_VIDEO_STREAM_INFO_LIST_S stStreamInfoList = new NETDEV_VIDEO_STREAM_INFO_LIST_S(); stStreamInfoList.udwNum = 16; stStreamInfoList.write(); IntByReference dwBytesReturned = new IntByReference(); boolean bRet = NetDemo.netdevsdk.NETDEV_GetDevConfig(NetDemo.lpUserID, NetDemo.ChannelID, NETDEV_CONFIG_COMMAND_E.NETDEV_GET_STREAMCFG_EX, stStreamInfoList.getPointer(), stStreamInfoList.size(), dwBytesReturned ); if(bRet != true) { JOptionPane.showMessageDialog(null, "Get data failed,error code"+NetDemo.netdevsdk.NETDEV_GetLastError()); System.out.printf("NETDEV_GetDevConfig failed:%d\n", NetDemo.netdevsdk.NETDEV_GetLastError()); return; }else { stStreamInfoList.read(); if(NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ACS|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_ECONOMIC_FISHEYE|| NetDemo.pstDeviceInfo.dwDeviceType == NETDEV_DEVICE_TYPE_E.NETDEV_DTYPE_IPC_FISHEYE) { if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex()).equals("MAIN")) { if(NetDemo.chckbxBViedeoenable.isSelected()==false) { JOptionPane.showMessageDialog(null, "IPC can not close MAIN Stream"); return; } } if(NetDemo.comboBoxConfigVideoStreamIndex.getItemAt(NetDemo.comboBoxConfigVideoStreamIndex.getSelectedIndex()).equals("AUX")) { for(int s=0;s