Settings needed for BDInfo library
 public TSPlaylistFile(
     BDROM bdrom,
     FileInfo fileInfo)
 {
     _settings = ServiceRegistration.Get <ISettingsManager>().Load <BDInfoSettings>() ?? new BDInfoSettings();
     BDROM     = bdrom;
     FileInfo  = fileInfo;
     Name      = fileInfo.Name.ToUpper();
 }
        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;
        }
Example #3
0
        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();
        }
        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;
        }