コード例 #1
0
 private void initCmd()
 {
     _downCmd = new VideoDownloadCmd(DownloadInfo);
     _downCmd.BytesLengthEvent      += onBytes;
     _downCmd.ErrorEvent            += onErrorStatus;
     _downCmd.VideoTimePeriodsEvent += onVideoTimePeriodsReceived;
     _downCmd.VideoBaseEvent        += onVideoBasePacketReceived;
     _downCmd.VideoStreamEvent      += onVideoStream;
 }
コード例 #2
0
 private void readVideoTimePeriodsPacket(ISourceInfo source, ITimePeriod tp, IVideoInfo vi)
 {
     try
     {
         VideoDownloadCmd cmd = new VideoDownloadCmd(new DownloadInfoParam(source, tp, vi, null));
         cmd.VideoTimePeriodsEvent += onVideoTimePeriodsEvent;
         cmd.GetTimePeriods();
     }
     catch (Exception ex)
     {
         Console.WriteLine("Read Video Time Periods Packet Error! {0}({1}) - {2} : {3}", vi.VideoName, vi.VideoId, vi.StreamId, ex.ToString());
     }
 }
コード例 #3
0
 private void disposeCmd()
 {
     if (_downCmd != null)
     {
         _downCmd.BytesLengthEvent      -= onBytes;
         _downCmd.ErrorEvent            -= onErrorStatus;
         _downCmd.VideoTimePeriodsEvent -= onVideoTimePeriodsReceived;
         _downCmd.VideoBaseEvent        -= onVideoBasePacketReceived;
         _downCmd.VideoStreamEvent      -= onVideoStream;
         _downCmd.Dispose();
     }
     _downCmd = null;
 }
コード例 #4
0
 private void onVideoTimePeriodsEvent(VideoDownloadCmd vd, VideoTimePeriodsPacket packet)
 {
     send(ParamCode.TimePeriods, VideoTimePeriodsPacket.Encode(packet));
     vd.Dispose();
 }
コード例 #5
0
 private void onVideoTimePeriodsReceived(VideoDownloadCmd vd, VideoTimePeriodsPacket packet)
 {
     _baseRec.UpdateTimePeriods(packet);
     loadRecorder();
 }