Exemple #1
0
        private void chapters_FileSelected(FileBar sender, FileBarEventArgs args)
        {
            if (!File.Exists(chapters.Filename))
            {
                fileUpdated();
                return;
            }

            ChapterInfo oChapter = new ChapterInfo();

            if (!oChapter.LoadFile(chapters.Filename))
            {
                MessageBox.Show("The selected file is not a valid chapter file", "Invalid Chapter File", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            fileUpdated();
        }
Exemple #2
0
        public override List <ChapterInfo> GetStreams(string location)
        {
            ChapterInfo oChapterInfo = new ChapterInfo();

            if (!oChapterInfo.LoadFile(location))
            {
                OnExtractionComplete();
                return(new List <ChapterInfo>());
            }

            List <ChapterInfo> pgcs = new List <ChapterInfo>();

            pgcs.Add(oChapterInfo);

            OnStreamDetected(pgcs[0]);
            OnChaptersLoaded(pgcs[0]);
            OnExtractionComplete();
            return(pgcs);
        }
Exemple #3
0
 /// <summary>
 /// gets the additionally configured stream configuration from this window
 /// this method is used when the muxwindow is created from the AutoEncodeWindow in order to configure audio languages
 /// add subtitles and chapters
 /// </summary>
 /// <param name="aStreams">the configured audio streams(language assignments)</param>
 /// <param name="sStreams">the newly added subtitle streams</param>
 /// <param name="chapterInfo">the ChapterInfo</param>
 public void getAdditionalStreams(out MuxStream[] aStreams, out MuxStream[] sStreams, out ChapterInfo chapterInfo)
 {
     aStreams    = getStreams(audioTracks);
     sStreams    = getStreams(subtitleTracks);
     chapterInfo = new ChapterInfo();
     if (chapters.Filename.StartsWith("<"))
     {
         MediaInfoFile oInfo = new MediaInfoFile(vInput.Filename);
         chapterInfo = oInfo.ChapterInfo;
     }
     else if (File.Exists(chapters.Filename))
     {
         chapterInfo.LoadFile(chapters.Filename);
         if (chapterInfo.FramesPerSecond == 0)
         {
             MediaInfoFile oInfo = new MediaInfoFile(vInput.Filename);
             chapterInfo.FramesPerSecond = oInfo.VideoInfo.FPS;
         }
     }
 }