void GetStreamUri(INvtSession session, onvif.services.Profile prof) { var srtSetup = new StreamSetup() { stream = StreamType.rtpUnicast, transport = new Transport() { protocol = TransportProtocol.udp } }; //Get stream uri for selected profile disposables.Add(session.GetStreamUri(srtSetup, prof.token) .ObserveOnCurrentDispatcher() .Subscribe( muri => { Size videosize = new Size(prof.videoEncoderConfiguration.resolution.width, prof.videoEncoderConfiguration.resolution.height); InitPlayer(muri.uri.ToString(), account, videosize); }, err => { errBox.Text = err.Message; })); }
private void Init(Model model) { this.DataContext = model; this.model = model; if (model.topicSet != null && model.topicSet.Any != null) { ExploreNamespaces(model.topicSet.Any); } InitializeComponent(); //TODO: possible incorrect behaviour when multiple instances of odm are running if (AppDefaults.visualSettings.EventsCollect_IsEnabled) { var fi = AppDefaults.MetadataFileInfo; if (fi.Exists) { fi.Delete(); } } ExpressionArguments args = new ExpressionArguments( model.messageContentFilterDialects, model.messageContentFilters, model.topicExpressionDialects, model.topicExpressionFilters, model.topicSet, namespaces); expressionFilters.Init(args); //commands OnCompleted += () => { disposables.Dispose(); subscription.Dispose(); }; ApplyCmd = new DelegateCommand( () => { FillModel(); Success(new Result.Apply(model)); },() => true ); //Start meta stream profile = activityContext.container.Resolve<Profile>(); dispatch = Dispatcher.CurrentDispatcher; MetaData = new ObservableCollection<MetadataUnit>(); VideoInfo = activityContext.container.Resolve<IVideoInfo>(); VideoInfo.Resolution = new Size(800, 600); Reload(activityContext.container.Resolve<INvtSession>()); includeAnalitycs.CreateBinding(CheckBox.IsCheckedProperty, model, x => x.includeAnalitycs, (m, v) => { m.includeAnalitycs = v; }); includePtzPosition.CreateBinding(CheckBox.IsCheckedProperty, model, x => x.includePtzPosition, (m, v) => { m.includePtzPosition = v; }); includePtzStatus.CreateBinding(CheckBox.IsCheckedProperty, model, x => x.includePtzStatus, (m, v) => { m.includePtzStatus = v; }); expressionFilters.CreateBinding(ExpressionFilterControl.IsIncludeEventsProperty, model, x => { return x.includeEvents; }, (m, v) => { m.includeEvents = v; }); //includeEvents.CreateBinding(CheckBox.IsCheckedProperty, model, x => x.includeEvents, (m, v) => { m.includeEvents = v; }); includePtzPosition.CreateBinding(CheckBox.VisibilityProperty, model, x => x.isPtzPositionSupported ? Visibility.Visible : Visibility.Collapsed); includePtzStatus.CreateBinding(CheckBox.VisibilityProperty, model, x => x.isPtzStatusSupported ? Visibility.Visible : Visibility.Collapsed); }
public UITestButton(IEventAggregator eventAggregator, INvtSession session, String channelToken, Profile profile, Account currentAccount, IVideoInfo videoInfo) : base(eventAggregator, session, currentAccount, channelToken, profile, videoInfo) { this.profile = profile; Init(); }
public VideoStreamingButton(IEventAggregator eventAggregator, INvtSession session, String channelToken, Profile profile, Account currentAccount, IVideoInfo videoInfo) : base(eventAggregator, session, currentAccount, channelToken, profile, videoInfo) { Init(); }
public ChannelButtonBase(IEventAggregator eventAggregator, INvtSession session, Account currentAccount, String channelToken, Profile profile, IVideoInfo videoInfo) : base(eventAggregator, session, currentAccount) { this.channelToken = channelToken; this.profile = profile; this.videoInfo = videoInfo; }
public void ResetONVIF() { _ptzProfile = null; _ptzSettings = null; }
public VideoPlayerActivityModel(StreamSetup streamSetup, Profile profile, bool showStreamUrl) { this.profile = profile; this.profileToken = profile.token; this.streamSetup = streamSetup; this.showStreamUrl = showStreamUrl; this.metadataReceiver = null; }