Пример #1
0
        public string ToTextualConvention(FileFormat?format = null)
        {
            try
            {
                StringBuilder sb = new StringBuilder();

                var ts = Timebase.TimeOfDay.Add(TimeSpan.FromMilliseconds(Offset));

                if (IsRtcp)
                {
                    sb.Append(RtpSend.ToTextualConvention(format ?? Format, Media.Rtcp.RtcpPacket.GetPackets(Blob, Pointer + sizeOf_RD_packet_T, BlobLength - sizeOf_RD_packet_T), ts, Source));
                }
                else
                {
                    using (var rtp = new Rtp.RtpPacket(Blob, Pointer + sizeOf_RD_packet_T)) sb.Append(RtpSend.ToTextualConvention(format ?? Format, rtp, ts, Source));
                }

                return(sb.ToString());
            }
            catch { throw; }
        }