public void UpdateStreamingSession(WebStreamingSession newSession)
        {
            mStreamingSession = newSession;
            this.Identifier = newSession.Identifier;
            this.ClientDescription = newSession.ClientDescription;

            if (this.Profile == null || !this.Profile.Equals(newSession.Profile))
            {
                this.Profile = newSession.Profile;
                NotifyPropertyChanged("Profile");
            }

            String file = newSession.DisplayName;
            if (this.File == null || !this.File.Equals(file))
            {
                this.File = file;
                NotifyPropertyChanged("File");
            }

            String progress = newSession.TranscodingInfo != null ? newSession.TranscodingInfo.CurrentTime.ToString() : "";
            if (this.Progress == null || !this.Progress.Equals(progress))
            {
                this.Progress = progress;
                NotifyPropertyChanged("Progress");
            }
        }
예제 #2
0
        public void UpdateStreamingSession(WebStreamingSession newSession)
        {
            mStreamingSession = newSession;
            this.Identifier = newSession.Identifier;
            this.ClientDescription = newSession.ClientDescription;
            this.ClientIP = newSession.ClientIPAddress;

            if (this.Profile == null || !this.Profile.Equals(newSession.Profile))
            {
                this.Profile = newSession.Profile;
                NotifyPropertyChanged("Profile");
            }

            String file = newSession.DisplayName;
            if (this.File == null || !this.File.Equals(file))
            {
                this.File = file;
                NotifyPropertyChanged("File");
            }

            if (newSession.PlayerPosition > 0)
            {
                TimeSpan span = TimeSpan.FromMilliseconds(newSession.PlayerPosition);
                span = span.Subtract(TimeSpan.FromMilliseconds(span.Milliseconds)); // don't show the damn milliseconds
                String progress = span.ToString("g") + " (" + newSession.PercentageProgress + "%)";
                if (this.Progress == null || !this.Progress.Equals(progress))
                {
                    this.Progress = progress;
                    NotifyPropertyChanged("Progress");
                }
            }
        }
예제 #3
0
 public WpfStreamingSession(WebStreamingSession sNew)
 {
     UpdateStreamingSession(sNew);
 }