Ejemplo n.º 1
0
        public static PlaylistIOFactory GetInstance()
        {
            lock (_lockable)
            {
                if (null == theFactory)
                {
                    theFactory = new PlaylistIOFactory();
                    theFactory.formatListByExt = new Dictionary <string, IList <Format> >();

                    PlaylistFormat tempFmt = new PlaylistFormat(PL_M3U, "M3U");
                    tempFmt.AddExtension(".m3u");
                    tempFmt.AddExtension(".m3u8");
                    theFactory.addFormat(tempFmt);

                    tempFmt = new PlaylistFormat(PL_PLS, "PLS");
                    tempFmt.AddExtension(".pls");
                    theFactory.addFormat(tempFmt);

                    tempFmt = new PlaylistFormat(PL_FPL, "FPL (experimental)");
                    tempFmt.LocationFormat = PlaylistFormat.LocationFormatting.MS_URI;
                    tempFmt.AddExtension(".fpl");
                    theFactory.addFormat(tempFmt);

                    tempFmt = new PlaylistFormat(PL_XSPF, "XSPF (spiff)");
                    tempFmt.AddExtension(".xspf");
                    theFactory.addFormat(tempFmt);

                    tempFmt = new PlaylistFormat(PL_SMIL, "SMIL");
                    tempFmt.LocationFormat = PlaylistFormat.LocationFormatting.RFC_URI;
                    tempFmt.AddExtension(".smil");
                    tempFmt.AddExtension(".smi");
                    tempFmt.AddExtension(".zpl");
                    tempFmt.AddExtension(".wpl");
                    theFactory.addFormat(tempFmt);

                    tempFmt = new PlaylistFormat(PL_ASX, "ASX");
                    tempFmt.LocationFormat = PlaylistFormat.LocationFormatting.FilePath;
                    tempFmt.AddExtension(".asx");
                    tempFmt.AddExtension(".wax");
                    tempFmt.AddExtension(".wvx");
                    theFactory.addFormat(tempFmt);

                    tempFmt                = new PlaylistFormat(PL_B4S, "B4S");
                    tempFmt.Encoding       = PlaylistFormat.FileEncoding.UTF8_NO_BOM;
                    tempFmt.LocationFormat = PlaylistFormat.LocationFormatting.RFC_URI;
                    tempFmt.AddExtension(".b4s");
                    theFactory.addFormat(tempFmt);
                }
            }

            return(theFactory);
        }
Ejemplo n.º 2
0
        public static PlaylistIOFactory GetInstance()
        {
            if (null == theFactory)
            {
                theFactory = new PlaylistIOFactory();
                theFactory.formatListByExt = new Dictionary <string, IList <Format> >();

                Format tempFmt = new Format("M3U");
                tempFmt.ID = PL_M3U;
                tempFmt.AddExtension(".m3u");
                tempFmt.AddExtension(".m3u8");
                theFactory.addFormat(tempFmt);

                tempFmt    = new Format("PLS");
                tempFmt.ID = PL_PLS;
                tempFmt.AddExtension(".pls");
                theFactory.addFormat(tempFmt);

                tempFmt    = new Format("FPL (experimental)");
                tempFmt.ID = PL_FPL;
                tempFmt.AddExtension(".fpl");
                theFactory.addFormat(tempFmt);

                tempFmt    = new Format("XSPF (spiff)");
                tempFmt.ID = PL_XSPF;
                tempFmt.AddExtension(".xspf");
                theFactory.addFormat(tempFmt);

                tempFmt    = new Format("SMIL");
                tempFmt.ID = PL_SMIL;
                tempFmt.AddExtension(".smil");
                tempFmt.AddExtension(".smi");
                tempFmt.AddExtension(".zpl");
                tempFmt.AddExtension(".wpl");
                theFactory.addFormat(tempFmt);

                tempFmt    = new Format("ASX");
                tempFmt.ID = PL_ASX;
                tempFmt.AddExtension(".asx");
                tempFmt.AddExtension(".wax");
                tempFmt.AddExtension(".wvx");
                theFactory.addFormat(tempFmt);

                tempFmt    = new Format("B4S");
                tempFmt.ID = PL_B4S;
                tempFmt.AddExtension(".b4s");
                theFactory.addFormat(tempFmt);
            }

            return(theFactory);
        }