Settings needed for BDInfo library
コード例 #1
0
 public TSPlaylistFile(
     BDROM bdrom,
     FileInfo fileInfo)
 {
     _settings = ServiceRegistration.Get <ISettingsManager>().Load <BDInfoSettings>() ?? new BDInfoSettings();
     BDROM     = bdrom;
     FileInfo  = fileInfo;
     Name      = fileInfo.Name.ToUpper();
 }
コード例 #2
0
        public TSStreamClip(
            TSStreamFile streamFile,
            TSStreamClipFile streamClipFile)
        {
            if (streamFile != null)
            {
                _settings = ServiceRegistration.Get <ISettingsManager>().Load <BDInfoSettings>() ?? new BDInfoSettings();

                Name       = streamFile.Name;
                StreamFile = streamFile;
                FileSize   = (ulong)StreamFile.FileInfo.Length;
                if (StreamFile.InterleavedFile != null)
                {
                    InterleavedFileSize = (ulong)StreamFile.InterleavedFile.FileInfo.Length;
                }
            }
            StreamClipFile = streamClipFile;
        }
コード例 #3
0
ファイル: FormSettings.cs プロジェクト: Jaex/TDMaker
        private void buttonOK_Click(object sender, EventArgs e)
        {
            BDInfoSettings.AutosaveReport            = checkBoxAutosaveReport.Checked;
            BDInfoSettings.GenerateStreamDiagnostics = checkBoxGenerateStreamDiagnostics.Checked;
            BDInfoSettings.GenerateTextSummary       = checkBoxGenerateTextSummary.Checked;
            BDInfoSettings.KeepStreamOrder           = checkBoxKeepStreamOrder.Checked;
            BDInfoSettings.UseImagePrefix            = checkBoxUseImagePrefix.Checked;
            BDInfoSettings.UseImagePrefixValue       = textBoxUseImagePrefixValue.Text;
            BDInfoSettings.FilterLoopingPlaylists    = checkBoxFilterLoopingPlaylists.Checked;
            BDInfoSettings.FilterShortPlaylists      = checkBoxFilterShortPlaylists.Checked;
            BDInfoSettings.EnableSSIF = checkBoxEnableSSIF.Checked;
            int filterShortPlaylistsValue;

            if (int.TryParse(textBoxFilterShortPlaylistsValue.Text, out filterShortPlaylistsValue))
            {
                BDInfoSettings.FilterShortPlaylistsValue = filterShortPlaylistsValue;
            }
            BDInfoSettings.SaveSettings();
            Close();
        }
コード例 #4
0
        public TSPlaylistFile(
            BDROM bdrom,
            string name,
            List <TSStreamClip> clips)
        {
            _settings = ServiceRegistration.Get <ISettingsManager>().Load <BDInfoSettings>() ?? new BDInfoSettings();
            BDROM     = bdrom;
            Name      = name;
            IsCustom  = true;
            foreach (TSStreamClip clip in clips)
            {
                TSStreamClip newClip = new TSStreamClip(
                    clip.StreamFile, clip.StreamClipFile);

                newClip.Name            = clip.Name;
                newClip.TimeIn          = clip.TimeIn;
                newClip.TimeOut         = clip.TimeOut;
                newClip.Length          = newClip.TimeOut - newClip.TimeIn;
                newClip.RelativeTimeIn  = TotalLength;
                newClip.RelativeTimeOut = newClip.RelativeTimeIn + newClip.Length;
                newClip.AngleIndex      = clip.AngleIndex;
                newClip.Chapters.Add(clip.TimeIn);
                StreamClips.Add(newClip);

                if (newClip.AngleIndex > AngleCount)
                {
                    AngleCount = newClip.AngleIndex;
                }
                if (newClip.AngleIndex == 0)
                {
                    Chapters.Add(newClip.RelativeTimeIn);
                }
            }
            LoadStreamClips();
            IsInitialized = true;
        }