Ejemplo n.º 1
0
 void LoadConfigs(string path)
 {
     try
     {
         XmlSerializer serial = new XmlSerializer(typeof(UpnpConfig));
         Profile = (UpnpConfig)serial.Deserialize(File.OpenRead(path));
     }
     catch (Exception)
     {
         LoadDefaultConfig();
     }
 }
Ejemplo n.º 2
0
 void LoadConfigs(string path)
 {
     try
     {
         XmlSerializer serial = new XmlSerializer(typeof(UpnpConfig));
         Profile = (UpnpConfig)serial.Deserialize(File.OpenRead(path));
     }
     catch (Exception)
     {
         LoadDefaultConfig();
     }
 }
Ejemplo n.º 3
0
        private void LoadDefaultConfig()
        {
            UpnpConfig config = new UpnpConfig
                {
                    Name = "Default",
                    Version = "1",
                    VoD = new VoDItem
                    {
                        Resolution = "640x480",
                        Info = new List<MediaFileInfo>
                            {
                                new MediaFileInfo
                                    {
                                        DlnaType =
                                            "DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;",
                                        Feature =
                                            "DLNA.ORG_OP=10;DLNA.ORG_FLAGS=8D100000000000000000000000000000",
                                        FileExt = ".ts",
                                        TranscodingProfile = ""
                                    }
                            }
                    },
                    Live = new LiveItem
                    {

                        Resolution = "640x480",
                        SendContentLength = false,
                        SendHead = false,
                        Info = new List<MediaFileInfo>
                            {
                                new MediaFileInfo
                                    {
                                        DlnaType =
                                            "DLNA.ORG_PN=MPEG_PS_PAL;",
                                        Feature =
                                            "DLNA.ORG_OP=00;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000",
                                        FileExt = "m2ts",
                                        TranscodingProfile = ""
                                    }
                            }
                    }
                };
            Profile = config;
        }
Ejemplo n.º 4
0
        private void LoadDefaultConfig()
        {
            UpnpConfig config = new UpnpConfig
            {
                Name    = "Default",
                Version = "1",
                VoD     = new VoDItem
                {
                    Resolution = "640x480",
                    Info       = new List <MediaFileInfo>
                    {
                        new MediaFileInfo
                        {
                            DlnaType =
                                "DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;",
                            Feature =
                                "DLNA.ORG_OP=10;DLNA.ORG_FLAGS=8D100000000000000000000000000000",
                            FileExt            = ".ts",
                            TranscodingProfile = ""
                        }
                    }
                },
                Live = new LiveItem
                {
                    Resolution        = "640x480",
                    SendContentLength = false,
                    SendHead          = false,
                    Info = new List <MediaFileInfo>
                    {
                        new MediaFileInfo
                        {
                            DlnaType =
                                "DLNA.ORG_PN=MPEG_PS_PAL;",
                            Feature =
                                "DLNA.ORG_OP=00;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01500000000000000000000000000000",
                            FileExt            = "m2ts",
                            TranscodingProfile = ""
                        }
                    }
                }
            };

            Profile = config;
        }