Esempio n. 1
0
        private void BurnDisc(string videoTsFolder)
        {
            LogEvent("Burn started.");

            m_Burner.SelectDevice(m_settings.DeviceIndex, true);

            BurnSettings bs = new BurnSettings();

            bs.SourceFolder = videoTsFolder;
            bs.VolumeLabel  = m_settings.VolumeName;

            bs.ImageType    = ImageType.UdfIso;
            bs.VideoDVD     = true;
            bs.WriteMethod  = WriteMethod.DvdIncremental;
            bs.WriteSpeedKB = m_Burner.MaxWriteSpeedKB;

            bs.Simulate  = false;
            bs.CloseDisc = true;
            bs.Eject     = true;

            m_Burner.Burn(bs);

            m_Burner.ReleaseDevice();

            LogEvent("Burn completed.");
        }
Esempio n. 2
0
 public long CalculateImageSize(BurnSettings settings)
 {
     using (var dataDisc = new DataDisc())
     {
         dataDisc.ImageType = settings.ImageType;
         SetVolumeProperties(dataDisc, settings.VolumeLabel);
         SetImageLayoutFromFolder(dataDisc, settings.VideoDVD, settings.SourceFolder);
         return(dataDisc.ImageSizeInBytes);
     }
 }
Esempio n. 3
0
        public void Burn(BurnSettings settings)
        {
            if (null == m_device)
            {
                throw new BurnerException(NO_DEVICE, NO_DEVICE_TEXT);
            }

            using (var dataDisc = new DataDisc())
            {
                // Add event handlers
                dataDisc.OnStatus       += new EventHandler <DataDiscStatusEventArgs>(DataDisc_OnStatus);
                dataDisc.OnFileStatus   += new EventHandler <DataDiscFileStatusEventArgs>(DataDisc_OnFileStatus);
                dataDisc.OnProgress     += new EventHandler <DataDiscProgressEventArgs>(DataDisc_OnProgress);
                dataDisc.OnContinueBurn += new EventHandler <DataDiscContinueEventArgs>(DataDisc_OnContinueBurn);

                FormatMedia(m_device);

                m_device.WriteSpeedKB = settings.WriteSpeedKB;

                dataDisc.Device       = m_device;
                dataDisc.SimulateBurn = settings.Simulate;
                dataDisc.WriteMethod  = settings.WriteMethod;
                dataDisc.CloseDisc    = settings.CloseDisc;

                // Set the session start address. This must be done before intializing the file system.
                dataDisc.SessionStartAddress = m_device.NewSessionStartAddress;

                // Set burning parameters
                dataDisc.ImageType = settings.ImageType;
                SetVolumeProperties(dataDisc, settings.VolumeLabel);
                // Set image layout
                SetImageLayoutFromFolder(dataDisc, settings.VideoDVD, settings.SourceFolder);

                if (!dataDisc.WriteToDisc(true))
                {
                    throw new BurnerException(dataDisc.Error);
                }

                if (settings.Eject)
                {
                    m_device.Eject(true);
                }
            }
        }