Beispiel #1
0
 void LoadFromToken(string profToken)
 {
     subscriptions.Add(
         session.GetProfiles()
         .ObserveOnCurrentDispatcher()
         .Subscribe(profiles => {
         Profile prof = profiles
                        .Where(x => {
             return(x.token == profToken);
         })
                        .FirstOrDefault();
         Load(prof);
     }, err => {
         dbg.Error(err);
         Load(null);
     })
         );
 }
Beispiel #2
0
 private void GetProfiles(INvtSession session)
 {
     disposables.Add(
         session
         .GetProfiles()
         .ObserveOnCurrentDispatcher()
         .Subscribe(
             profs => {
         var profile = profs.FirstOrDefault();
         if (profile != null)
         {
             GetStreamUri(session, profile);
         }
     },
             err => {
     }
             )
         );
 }
Beispiel #3
0
 void GetProfiles(INvtSession session)
 {
     //Every video source can have it's own profiles
     disposables.Add(session.GetProfiles()
                     .ObserveOnCurrentDispatcher()
                     .Subscribe(
                         profs => {
         var selectedProfile = profs.FirstOrDefault();
         if (selectedProfile == null)
         {
             //Device vave not any profiles
             errBox.Text = "Profile is empty";
         }
         else
         {
             GetStreamUri(session, selectedProfile);
         }
     }, err => {
         errBox.Text = err.Message;
     }));
 }
        private void GetProfiles(INvtSession session)
        {
            disposables.Add(
                session
                .GetProfiles()
                .ObserveOnCurrentDispatcher()
                .Subscribe(
                    profs => {
                profile = profs.FirstOrDefault();
                if (profile != null)
                {
                    profileToken = profile.token;
                    nodeToken    = profile.ptzConfiguration.nodeToken;

                    GetPtzConfiguration(session, profile);
                    GetStreamUri(session, profile);
                }
            },
                    err => {
            }
                    )
                );
        }