public async Task <NvrCompressionSettings> LoadPreviewPictureSettings() { return(await Task <NvrCompressionSettings> .Factory.StartNew(() => { try { NvrSettings nvrSettings = new NvrSettings(UserSessionService.GetInstance().NvrUserSession, true); return nvrSettings.LoadStreamCompressionSettings(); } catch (NvrSdkException ex) { logNvrSdkExceprtion(ex); throw new SystemException("NvrController: LoadStreamCompressionSettings failed", ex); } catch (Exception ex) { logException(ex); throw new SystemException("Exception: LoadStreamCompressionSettings failed", ex); } }, TaskCreationOptions.AttachedToParent)); }
public async Task UpdatePreviewPictureSettings(NvrCompressionSettings compressionSettings) { await Task.Factory.StartNew(() => { try { NvrSettings nvrSettings = new NvrSettings(UserSessionService.GetInstance().NvrUserSession, true); nvrSettings.UpdateStreamCompressionSettings(compressionSettings); } catch (NvrSdkException ex) { logNvrSdkExceprtion(ex); throw new SystemException("NvrController: UpdateStreamCompressionSettings failed", ex); } catch (Exception ex) { logException(ex); throw new SystemException("Exception: UpdateStreamCompressionSettings failed", ex); } }, TaskCreationOptions.AttachedToParent); }
public void StartLiveView(IntPtr playWndHandle) { try { nvrLivePlayer_ = new NvrLivePlayer(UserSessionService.GetInstance().NvrUserSession, true); nvrLivePlayer_.DrawOnPictureHandle += drawSomething; nvrLivePlayer_.OnPreviewError += onPreviewError; nvrLivePlayer_.StartPreview(playWndHandle, NvrPreviewSettings); } catch (NvrSdkException ex) { logNvrSdkExceprtion(ex); throw new SystemException("NvrController: StartPreview failed", ex); } catch (Exception ex) { logException(ex); throw new SystemException("NvrController: StartPreview failed", ex); } }
public PlaybackService() { nvrPlayback_ = new NvrPlayback(UserSessionService.GetInstance().NvrUserSession, true); }
public BookmarkService() { nvrRecordLabels_ = new NvrRecordLabels(UserSessionService.GetInstance().NvrUserSession, true); }