public StreamGroup(String cname, String name, String payload)
 {
     streams      = new ArrayList();
     this.cname   = cname;
     this.payload = payload;
     role         = PresenterRoleType.Other;
     wireFormat   = PresenterWireFormatType.Other;
 }
 /// <summary>
 /// Return true if this stream matches the existing format/role in the group.
 /// </summary>
 /// <param name="s"></param>
 /// <param name="wireFormat"></param>
 /// <param name="role"></param>
 /// <returns></returns>
 public bool IsInPresGroup(Stream s, PresenterWireFormatType wireFormat, PresenterRoleType role)
 {
     if ((s.Payload == this.payload) && ((this.payload == "dynamicPresentation") || (this.payload == "RTDocument")))
     {
         if ((wireFormat == this.wireFormat) &&
             (role == this.role))
         {
             return(true);
         }
     }
     return(false);
 }
        private String mkDetails(int streamCount, long duration, long startTime, PresenterRoleType role)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(" (");
            if (PresenterRoleType.Instructor == role)
            {
                sb.Append("Instructor; ");
            }
            if (streamCount > 1)
            {
                sb.Append(streamCount.ToString() + " streams; ");
            }
            if ((startTime != 0) && (startTime != long.MaxValue))
            {
                DateTime dt = new DateTime(startTime);
                sb.Append("start time=" + dt.ToString() + "; ");
            }
            sb.Append("duration=" + TimeSpan.FromSeconds(duration).ToString());
            sb.Append(")");
            return(sb.ToString());
        }
 public void AddStream(Stream stream, PresenterWireFormatType wireFormat, PresenterRoleType role)
 {
     this.wireFormat = wireFormat;
     this.role       = role;
     this.AddStream(stream);
 }