상속: ChapterExtractor
예제 #1
0
        public override List <ChapterInfo> GetStreams(string location)
        {
            List <ChapterInfo> pgcs = new List <ChapterInfo>();
            string             path = Path.Combine(Path.Combine(location, "BDMV"), "PLAYLIST");

            if (!Directory.Exists(path))
            {
                throw new FileNotFoundException("Could not find PLAYLIST folder on BluRay disc.");
            }

            ChapterExtractor ex = new BDInfoExtractor();

            ex.StreamDetected += (sender, args) => OnStreamDetected(args.ProgramChain);
            ex.ChaptersLoaded += (sender, args) => OnChaptersLoaded(args.ProgramChain);

            string vol = Pathing.VolumeInfo.GetVolumeLabel(new DirectoryInfo(location));

            foreach (string file in Directory.GetFiles(path, "*.mpls"))
            {
                var pgc = ex.GetStreams(file)[0];
                if (!string.IsNullOrEmpty(vol))
                {
                    pgc.VolumeName = vol;
                }
                pgcs.Add(pgc);
            }

            pgcs = pgcs.OrderByDescending(p => p.Duration).ToList();

            OnExtractionComplete();
            return(pgcs);
        }
예제 #2
0
        public override List<ChapterInfo> GetStreams(string location)
        {
            List<ChapterInfo> pgcs = new List<ChapterInfo>();
            string path = Path.Combine(Path.Combine(location, "BDMV"), "PLAYLIST");
            if (!Directory.Exists(path))
                throw new FileNotFoundException("Could not find PLAYLIST folder on BluRay disc.");

            ChapterExtractor ex = new BDInfoExtractor();
            ex.StreamDetected += (sender, args) => OnStreamDetected(args.ProgramChain);
            ex.ChaptersLoaded += (sender, args) => OnChaptersLoaded(args.ProgramChain);

            string vol = Pathing.VolumeInfo.GetVolumeLabel(new DirectoryInfo(location));
            foreach (string file in Directory.GetFiles(path, "*.mpls"))
            {
                var pgc = ex.GetStreams(file)[0];
                if (!string.IsNullOrEmpty(vol)) pgc.VolumeName = vol;
                pgcs.Add(pgc);
            }

            pgcs = pgcs.OrderByDescending(p => p.Duration).ToList();

            OnExtractionComplete();
            return pgcs;
        }
 public void BDInfoTest()
 {
     BDInfoExtractor ex = new BDInfoExtractor();
       ex.GetStreams(@"F:\ISOs\HELLBOY2_D1\BDMV\PLAYLIST\00000.mpls");
 }