Exemple #1
0
        internal static string ToTextualConvention(Rtcp.GoodbyeReport bye)
        {
            string blockString = string.Empty;

            if (bye == null || bye.IsDisposed) return blockString;

            //if HasReasonForLeaving add
            if (bye.HasReasonForLeaving)//reason=
                blockString += string.Format(QuotedFormat, "reason", System.Text.Encoding.ASCII.GetString(bye.ReasonForLeaving.ToArray()));

            //Write each entry in bye.GetSourceList
            using (var sourceList = bye.GetSourceList())
            {
                if (sourceList == null) blockString += "#Incomplete Source List Not Included" + (char)Common.ASCII.LineFeed;
                else foreach (uint partyId in sourceList)//ssrc=
                        blockString += string.Format(HexFormat, "ssrc", HexSpecifier + partyId.ToString("X"), (char)Common.ASCII.LineFeed);
            }

            return blockString;
        }