protected RtspMessage(RtspVersion version)
        {
            _headers = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);

            Body    = new byte[0];
            Version = version;
        }
        internal RtspRequest(string[] lineParts) : base(RtspVersion.Parse(lineParts[2]))
        {
            RtspMethod method;

            if (!Enum.TryParse <RtspMethod>(lineParts[0].Trim(), true, out method))
            {
                method = RtspMethod.UNKNOWN;
            }
            Method = method;

            URI = new Uri(lineParts[1]);
        }
Exemple #3
0
        public static RtspVersion Parse(string text)
        {
            if (string.IsNullOrEmpty(text))
            {
                throw new ArgumentNullException("Cannot parse null or empty RTSP version text");
            }

            text = text.Trim();

            RtspVersion version = FromWellKnown(text);

            if (version == null)
            {
                version = new RtspVersion(text);
            }

            return(version);
        }
Exemple #4
0
 internal RtspResponse(string[] lineParts) : base(RtspVersion.Parse(lineParts[0]))
 {
     ResponseStatus = Status.ValueOf(int.Parse(lineParts[1].Trim()));
 }