Sat>Ip Transmitter Support ?

Post your great ideas and suggestions here
User avatar
Kay Diefenthal
Posts: 226
Joined: Fri Nov 16, 2012 10:40 am
Location: Wachtberg, NRW, Germany
Contact:

Sat>Ip Transmitter Support ?

Post by Kay Diefenthal » Sun Feb 16, 2014 10:53 am

I know some of you want Sat>Ip Support but how many want it really and how many can help to realize this ?
I would help if certain information is available

DAU
Posts: 1
Joined: Sun Feb 16, 2014 3:21 pm

Re: Sat>Ip Transmitter Support ?

Post by DAU » Sun Feb 16, 2014 4:20 pm

I would Argus TV use when Sat>IP can be used.

The Sat>IP-Sample from Kay works for me just fine (Screenshot). So it must principle possible.
Attachments
screenshop rtsp sample.png
Screenshot RTSP-Sample
screenshop rtsp sample.png (359.46 KiB) Viewed 8040 times

Benoire
Posts: 207
Joined: Tue Jul 17, 2012 8:51 am
Location: Auckland, New Zealand

Re: Sat>Ip Transmitter Support ?

Post by Benoire » Thu Feb 20, 2014 9:01 pm

I would be interested. I have far too many cables coming out of my wall to my server and having a single Ethernet cable to replace that would be ace.

Sent from my GT-I8190N using Tapatalk

User avatar
Kay Diefenthal
Posts: 226
Joined: Fri Nov 16, 2012 10:40 am
Location: Wachtberg, NRW, Germany
Contact:

Re: Sat>Ip Transmitter Support ?

Post by Kay Diefenthal » Thu Feb 20, 2014 9:09 pm

i have Review my rtsp code and think so is it now better

https://sourceforge.net/p/satip/code/14/

let me now what you think

for testing see the attachment
Attachments
Rebuild of Rtsp Sample.zip
(239.08 KiB) Downloaded 150 times

User avatar
Kay Diefenthal
Posts: 226
Joined: Fri Nov 16, 2012 10:40 am
Location: Wachtberg, NRW, Germany
Contact:

Re: Sat>Ip Transmitter Support ?

Post by Kay Diefenthal » Sat Feb 22, 2014 5:51 pm

Looks like Dot-I isnt interessted

no Response to pm or email

so can i not Show how we can add Sat>Ip Support

edit
ok know have dot-i reply my question

he mean the only way is to create a Recorder tuner

that isnt that what i would to create

my target was this viewtopic.php?f=74&t=4517&start=30#p31206

the only Chance is now mp tve 3.5


some alpha code parts are created for exsample

Code: Select all

 public class Discover
    {
        public Discover()
        {
            GetTransmitters();
        }

        private Transmitter[] GetTransmitters()
        {
            List<Transmitter> transmitters = new List<Transmitter>();
            using (Socket ssdpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp) { ReceiveTimeout = 5000 })
            {
                // Allow this socket to broadcast.
                ssdpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);

                // Send the actual UPnP Discovery packet.
                ssdpSocket.SendTo(Encoding.ASCII.GetBytes("M-SEARCH * HTTP/1.1\r\n" + "HOST: 239.255.255.250:1900\r\n" + "ST: urn:ses-com:device:SatIPServer:1\r\n" + "MAN:\"ssdp:discover\"\r\n" + "MX:3\r\n\r\n"), new IPEndPoint(IPAddress.Broadcast, 1900));

                // Space to store the incoming data.
                byte[] receiveBuffer = new byte[0x1024];

                // The number of bytes we read into the buffer.
                int bytesRead = 0;
                
                do
                {
                    try
                    {
                        // Read some bytes from the socket into the buffer (remembering how many we read).
                        bytesRead = ssdpSocket.Receive(receiveBuffer);
                    }
                    catch (SocketException)
                    {
                        // Errors aren't important at this stage but they are catastrophic for this method.
                        //return null;
                    }

                    // Convert the bytes of the response into characters.
                    
                    string response = Encoding.UTF8.GetString(receiveBuffer, 0, bytesRead);
                    // Was the response from a rootdevice or are we awaiting more data?
                    Console.WriteLine(response);
                    if(response.StartsWith("HTTP/1.1 200 OK"))
                    {
                        
                        Match location = Regex.Match(response, "location:(?: )?(?<Host>http://.*?)(?<DescriptionURL>/[a-zA-Z0-9-./:]*)", RegexOptions.IgnoreCase);                        
                        if ((location.Success)&&(!transmitters.Contain()))
                        {
                            transmitters.Add(Transmitter.Parse(location.Groups["Host"].Value + location.Groups["DescriptionURL"].Value));
                        }
                    }                   

                } 
                while (bytesRead > 0);
            }

            return transmitters.ToArray();
        }
       
    }

    public class Icon
    {
        #region Fields
        private string _mimeType;
        private int _width;
        private int _height;
        private int _depth;
        private string _url; 
        #endregion

        #region Constructor
        public Icon() { }

        public Icon(string mimeType, int width, int height, int depth, string url)
        {
            _mimeType = mimeType;
            _width = width;
            _height = height;
            _depth = depth;
            _url = url;
        } 
        #endregion

        #region Properties
        public string MimeType
        {
            get { return _mimeType; }
            set { _mimeType = value; }
        }

        public int Width
        {
            get { return _width; }
            set { _width = value; }
        }

        public int Height
        {
            get { return _height; }
            set { _height = value; }
        }

        public int Depth
        {
            get { return _depth; }
            set { _depth = value; }
        }

        public string Url
        {
            get { return _url; }
            set { _url = value; }
        } 
        #endregion
    }

    public class Transmitter
    {
        #region Fields
        private string _host;
        private string _deviceType;
        private string _friendlyName;
        private string _manufacturer;
        private string _manufacturerURL;
        private string _modelDescription;
        private string _modelName;
        private string _modelNumber;
        private string _modelURL;
        private string _serialNumber;
        private string _uDN;
        private Icon[] _icons;
        private string _presentationURL;
        private Frontend[] _frontends; 
        #endregion

        #region Constructor
        public Transmitter()
        {
        } 
        #endregion

        #region Properties
        public string Host
        {
            get { return _host; }
            set { _host = value; }
        }

        public string DeviceType
        {
            get { return _deviceType; }
            set { _deviceType = value; }
        }

        public string FriendlyName
        {
            get { return _friendlyName; }
            set { _friendlyName = value; }
        }

        public string Manufacturer
        {
            get { return _manufacturer; }
            set { _manufacturer = value; }
        }

        public string ManufacturerURL
        {
            get { return _manufacturerURL; }
            set { _manufacturerURL = value; }
        }

        public string ModelDescription
        {
            get { return _modelDescription; }
            set { _modelDescription = value; }
        }

        public string ModelName
        {
            get { return _modelName; }
            set { _modelName = value; }
        }

        public string ModelNumber
        {
            get { return _modelNumber; }
            set { _modelNumber = value; }
        }

        public string ModelURL
        {
            get { return _modelURL; }
            set { _modelURL = value; }
        }

        public string SerialNumber
        {
            get { return _serialNumber; }
            set { _serialNumber = value; }
        }

        public string UDN
        {
            get { return _uDN; }
            set { _uDN = value; }
        }

        public Icon[] Icons
        {
            get { return _icons; }
            set { _icons = value; }
        }

        public string PresentationURL
        {
            get { return _presentationURL; }
            set { _presentationURL = value; }
        }

        public Frontend[] Frontends
        {
            get { return _frontends; }
            set { _frontends = value; }
        } 
        #endregion
       
        public static Transmitter Parse(string location )
        {           
            XDocument document = XDocument.Load(location);
            XmlNamespaceManager xnm = new XmlNamespaceManager(new NameTable());
            XNamespace n1 = "urn:ses-com:satip";
            XNamespace ns = "urn:schemas-upnp-org:device-1-0";
            xnm.AddNamespace("root", ns.NamespaceName);
            xnm.AddNamespace("satip", n1.NamespaceName);
            XElement deviceElement = document.Root.Element(ns + "device");
            Transmitter transmitter = new Transmitter();
            transmitter.Host = location;
            transmitter.DeviceType = deviceElement.Element(ns + "deviceType").Value;
            transmitter.FriendlyName = deviceElement.Element(ns + "friendlyName").Value;
            transmitter.Manufacturer = deviceElement.Element(ns + "manufacturer").Value;
            transmitter.ManufacturerURL = deviceElement.Element(ns + "manufacturerURL").Value;
            transmitter.ModelDescription = deviceElement.Element(ns + "modelDescription").Value;
            transmitter.ModelName = deviceElement.Element(ns + "modelName").Value;
            transmitter.ModelNumber = deviceElement.Element(ns + "modelNumber").Value;
            transmitter.ModelURL = deviceElement.Element(ns + "modelURL").Value;
            transmitter.SerialNumber = deviceElement.Element(ns + "serialNumber").Value;
            transmitter.UDN = deviceElement.Element(ns + "UDN").Value;
            List<Icon> iconlist = new List<Icon>();
            var IconList = deviceElement.Element(ns + "iconList");
            var icons = from query in IconList.Descendants(ns + "icon")
                        select new Icon
                        {
                            MimeType = (string)query.Element(ns + "mimetype"),
                            Url = (string)query.Element(ns + "url"),
                            Height = (int)query.Element(ns + "height"),
                            Width = (int)query.Element(ns + "width"),
                            Depth = (int)query.Element(ns + "depth"),
                        };
            foreach (Icon icon in icons)
            {
                iconlist.Add(new Icon(icon.MimeType, icon.Width, icon.Height, icon.Depth, icon.Url));
            }
            transmitter.Icons = iconlist.ToArray();
            transmitter.PresentationURL = deviceElement.Element(ns + "presentationURL").Value;
            List<Frontend> frontendlist = new List<Frontend>();
            var satelliteFrontEndCount = 0;
            var terrestrialFrontEndCount = 0;
            var frontendInfoHeader = deviceElement.Element(n1 + "X_SATIPCAP").Value;
            string[] frontendinfos = frontendInfoHeader.Split(',');
            foreach(string frontendinfo in frontendinfos)
            {
                Match m = Regex.Match(frontendinfo, @"^([^-]+)-(\d+)$", RegexOptions.IgnoreCase);
                if (m.Success)
                {
                    string msys = m.Groups[1].Captures[0].Value;
                    if (msys.Equals("DVBS2"))
                    {
                        satelliteFrontEndCount += int.Parse(m.Groups[2].Captures[0].Value);
                    }
                    else if (msys.Equals("DVBT") || msys.Equals("DVBT2"))
                    {
                        terrestrialFrontEndCount += int.Parse(m.Groups[2].Captures[0].Value);
                    }                    
                }
            }

            for (int i = 1; i <= satelliteFrontEndCount; i++)
            {
                Frontend frontend = new Frontend();
                frontend.FrontendType = "DVBS";
                frontend.TransmitterUniqueId = transmitter.UDN;
                frontend.FrontendUniqueId = i;
                frontendlist.Add(frontend);
            }
            transmitter.Frontends = frontendlist.ToArray();
            return transmitter;
        }
    }

    public class Frontend
    {
        private string _transmitterUniqueId;
        private int _frontendUniqueId;
        private string _frontendType;
        private bool _signalLocked;
        private int _signalLevel;
        private int _signalQuality;

        public Frontend()
        {
        }

        public string TransmitterUniqueId
        {
            get { return _transmitterUniqueId; }
            set { _transmitterUniqueId = value; }
        }

        public int FrontendUniqueId
        {
            get { return _frontendUniqueId; }
            set { _frontendUniqueId = value; }
        }

        public string FrontendType
        {
            get { return _frontendType; }
            set { _frontendType = value; }
        }

        public bool SignalLocked
        {
            get { return _signalLocked; }
            set { _signalLocked = value; }
        }

        public int SignalLevel
        {
            get { return _signalLevel; }
            set { _signalLevel = value; }
        }

        public int SignalQuality
        {
            get { return _signalQuality; }
            set { _signalQuality = value; }
        }

        public override string ToString()
        {
            return base.ToString();
        }
    }
}

User avatar
dot-i
Site Admin
Posts: 5848
Joined: Mon Oct 01, 2012 3:40 pm

Re: Sat>Ip Transmitter Support ?

Post by dot-i » Sun Feb 23, 2014 11:38 am

Hi Kay, I actually replied to your mail yesterday, been a bit busy.

Looks great that your testcode is working out well! Next step would be to create an ARGUS Recorder out of this.

JMS made a skeleton recorder available a while ago, I'm sure you still have the link.

I am actually reworking the internals of ARGUS to remove the use of WCF and replace the Recorder api with a version built on REST, but the same calls will basically still be there. So at a certain point in time it probably makes sense for me to send you a test version of that.
I have the heart of a child. I keep it in a jar on my shelf. -- Robert Bloch
Image

User avatar
Kay Diefenthal
Posts: 226
Joined: Fri Nov 16, 2012 10:40 am
Location: Wachtberg, NRW, Germany
Contact:

Re: Sat>Ip Transmitter Support ?

Post by Kay Diefenthal » Sun Feb 23, 2014 1:26 pm

dot-i wrote:Hi Kay, I actually replied to your mail yesterday, been a bit busy.

Looks great that your testcode is working out well! Next step would be to create an ARGUS Recorder out of this.

JMS made a skeleton recorder available a while ago, I'm sure you still have the link.

I am actually reworking the internals of ARGUS to remove the use of WCF and replace the Recorder api with a version built on REST, but the same calls will basically still be there. So at a certain point in time it probably makes sense for me to send you a test version of that.
yes jms has create an Skelton thats right but you must know he has a complete backend
for channelscan guide grabbing



but no Support for sat>ip
so im forced to build methods function for channel scan guide grab
i would emulate a BDA Card so can Argustv make the rest work

https://github.com/MediaPortal/MediaPor ... Show/SatIp

https://github.com/MediaPortal/MediaPor ... tions/Rtsp

the rtsp part is reviewed from me and works

User avatar
JMS
Posts: 49
Joined: Fri May 30, 2008 12:23 am
Location: Königswinter, NRW, Germany
Contact:

Re: Sat>Ip Transmitter Support ?

Post by JMS » Sun Feb 23, 2014 7:03 pm

I just took a very quick look over the source. As far as I understand MP has abstracted hardware access and uses different implementations to either access via BDA or any other algoritms - in fact looks quite qood. But in my understanding this is a pure TV internal abstraction and I don't see how this could fit into Argus - beside: maybe there is some similiar abstraction in ArgusTV itself but then the code has to go somewhere deep inside the core of the product.

Out for now - sorry but the "work for money" issue is quite strong these days...

Jochen

User avatar
Kay Diefenthal
Posts: 226
Joined: Fri Nov 16, 2012 10:40 am
Location: Wachtberg, NRW, Germany
Contact:

Re: Sat>Ip Transmitter Support ?

Post by Kay Diefenthal » Sun Feb 23, 2014 7:51 pm

JMS wrote:I just took a very quick look over the source. As far as I understand MP has abstracted hardware access and uses different implementations to either access via BDA or any other algoritms - in fact looks quite qood. But in my understanding this is a pure TV internal abstraction and I don't see how this could fit into Argus - beside: maybe there is some similiar abstraction in ArgusTV itself but then the code has to go somewhere deep inside the core of the product.

Out for now - sorry but the "work for money" issue is quite strong these days...

Jochen

that you are busy isnt new and understand that that you must see your
refrigerator must be filled my too
but i earn no Money with Code writing! it is an Hobby and not more!

i have no Problem with that i would Dot-I help to build in
but solong i not know how he interact intern can i not say what the best way is

User avatar
dot-i
Site Admin
Posts: 5848
Joined: Mon Oct 01, 2012 3:40 pm

Re: Sat>Ip Transmitter Support ?

Post by dot-i » Thu Feb 27, 2014 4:05 pm

JMS wrote:I just took a very quick look over the source. As far as I understand MP has abstracted hardware access and uses different implementations to either access via BDA or any other algoritms - in fact looks quite qood. But in my understanding this is a pure TV internal abstraction and I don't see how this could fit into Argus - beside: maybe there is some similiar abstraction in ArgusTV itself but then the code has to go somewhere deep inside the core of the product.

Out for now - sorry but the "work for money" issue is quite strong these days...

Jochen
The ARGUS recorder does indeed do something very similar. There's a common base Card class, on which the different DVB and ATSC "flavors" are built.
I have the heart of a child. I keep it in a jar on my shelf. -- Robert Bloch
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests