Giter VIP home page Giter VIP logo

Comments (3)

ngraziano avatar ngraziano commented on August 21, 2024

Hi,
I have try to make SdpFile.ReadLoose accept more error in the sdp file.

Can you send me the SDP that generate the error so I can test ?

I prefer not to add the static method for parsing now, maybe I will refactor with some injection process for all the subpart parsing. I will think about something.

from sharprtsp.

pedrosbanioles avatar pedrosbanioles commented on August 21, 2024

Sure, here is the sample i have for testing based on a Hik DVR we are using:

    public static class HikvisionSDPSample
    {
        private const string _version = "v=0";
        private const string _origin = "o=- 1109162014219182 0 IN IP4 0.0.0.0";
        private const string _session = "s=HIK Media Server V3.0.2";
        private const string _sessionInformation = "i=HIK Media Server Session Description : standard";
        private const string _email = "e=NONE";
        private const string _connection = "c=IN c=IN IP4 0.0.0.0";
        private const string _timing = "t=0 0";
        private const string _attribute1 = "a=control:*";
        private const string _attribute2 = "a=range:npt=now-";
        private const string _mediaAttr1 = "m=video 0 RTP/AVP 96";
        private const string _attribute3 = "a=rtpmap:96 H264/90000";
        private const string _attribute4 = "a=fmtp:96 profile-level-id=4D0014;packetization-mode=0;sprop-parameter-sets=Z2QAFK2EAQwgCGEAQwgCGEAQwgCEK3Cw/QgAAOpgAAr8hCA=,aO48sA==";
        private const string _attribute5 = "a=control:trackID=video";
        private const string _attribute6 = "a=Media_header:MEDIAINFO=494D4B48010100000400000100000000000000000000000000000000000000000000000000000000;";
        private const string _attribute7 = "a=appversion:1.0";
            
        public static string Default = $"{_version}\r\n{_origin}\r\n{_session}\r\n{_sessionInformation}\r\n{_email}\r\n{_connection}\r\n{_timing}\r\n{_attribute1}\r\n{_attribute2}\r\n{_mediaAttr1}\r\n{_attribute3}\r\n{_attribute4}\r\n{_attribute5}\r\n{_attribute6}\r\n{_attribute7}\r\n";
        
        
    }

Or here is format for your test#.sdp files

v=0
o=- 1109162014219182 0 IN IP4 0.0.0.0
s=HIK Media Server V3.0.2
i=HIK Media Server Session Description : standard
e=NONE
c=IN c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=range:npt=now-
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=4D0014;packetization-mode=0;sprop-parameter-sets=Z2QAFK2EAQwgCGEAQwgCGEAQwgCEK3Cw/QgAAOpgAAr8hCA=,aO48sA==
a=control:trackID=video
a=Media_header:MEDIAINFO=494D4B48010100000400000100000000000000000000000000000000000000000000000000000000;
a=appversion:1.0

from sharprtsp.

pedrosbanioles avatar pedrosbanioles commented on August 21, 2024

#123 Submitted for replacing the method for validating with using regex, it should at least match 1 type and return the first instance or then throw a format exception if no good connection exists

from sharprtsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.