Ejemplo n.º 1
0
        protected RtspMessage(RtspVersion version)
        {
            _headers = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);

            Body    = new byte[0];
            Version = version;
        }
Ejemplo n.º 2
0
        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]);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 internal RtspResponse(string[] lineParts) : base(RtspVersion.Parse(lineParts[0]))
 {
     ResponseStatus = Status.ValueOf(int.Parse(lineParts[1].Trim()));
 }