public void GetRemoteVideoRecordFileNameTest() { string strResult = "VHS_ch09_61-57354AA60831-3136_1526886082.h264"; RemoteVideoRecordInfo V = new RemoteVideoRecordInfo { VideoGUID = "61-57354AA60831-3136", StartTime = DateTime.Parse("2018-05-21 15:01:22"), Channel = 8, }; string Temp_str = SDK_SKVideoSDK.GetRemoteVideoRecordFileName(V); Assert.AreEqual(Temp_str, strResult); }
public void DownLoadRemoteRecordTest() { string Temp_strDownPath = @"C:\SHIKE_Video\0138\DownloadTest"; string strData = "[a:192.168.2.166][g:xhcs1][c:08][s(1526886082) e(1526886150)][s(1526886179) e(1526887395)][s(1526887503) e(1526889215)][s(1526889314) e(1526892684)][s(1526892685) e(1526895368)][s(1526895368) e(1526898051)][s(1526898051) e(1526900729)][s(1526900730) e(1526903405)][s(1526903405) e(1526906087)][s(1526906087) e(1526908768)][s(1526908768) e(1526911452)][s(1526911452) e(1526912030)][s(1526945754) e(1526948443)][s(1526948444) e(1526951130)][s(1526951130) e(1526953814)][s(1526953814) e(1526956492)][s(1526956492) e(1526959175)][s(1526959175) e(1526961854)][s(1526961854) e(1526964531)][s(1526964531) e(1526967215)][s(1526967215) e(4294966)]"; List <RemoteVideoRecordInfo> l = SDK_SKVideoSDK.SKRemoteVideoRecordDataPrasing("61-57354AA60831-3136", strData); string strFileName = ""; RemoteVideoRecordInfo v = l[0]; strFileName = Temp_strDownPath + "/" + v.RemoteVidoRecordName; while (SDK_SKVideoSDK.p_sdkc_get_online() == 0) { Common.Delay_Second(1); } SDK_SKVideoSDK.DownLoadRemoteRecord(v, strFileName); Assert.IsTrue(File.Exists(strFileName)); }