PrimoBurner for .NET
5.0
CD, DVD and Blu-ray Software Development Kit
|
Recording Device Low Level Application Programming Interface. More...
Inherits IDisposable.
Public Member Functions | |
void | ClearOutputBuffer () |
Clears the buffer that is used for writing. | |
bool | CloseDisc () |
Closes an open BD-R disc. | |
bool | CloseLastSession () |
Closes the last open session on the disc. | |
bool | CloseTrack (Int32 trackNumber) |
Closes a track. | |
TrackType | DetectTrackType (Int32 trackStartLba) |
Returns the type of a CD track. | |
TrackType | DetectTrackType (Int32 trackStartLba, Int32 blocksToScan) |
Returns the type of a CD track. | |
bool | DisableMCN () |
Disables media change notifications. | |
bool | Dismount () |
Tries to dismount the volume in the device. | |
void | Dispose () |
Disposes Device and reclaims the resources used by the object. | |
bool | Eject (bool eject) |
Ejects the media from the device. | |
bool | Eject (bool eject, bool unlockMedium) |
Ejects the media from the device. | |
bool | EnableMCN () |
Enables media change notifications. | |
bool | EndBDSession () |
The EndBDSession method finishes a BD session that has been previously started with the StartBDSession method. | |
bool | EndBDSession (bool closeSession, bool closeDisc) |
The EndBDSession method finishes a BD session that has been previously started with the StartBDSession method. | |
bool | EndBDTrack () |
The EndBDTrack closes a BD track. | |
bool | EndBDTrack (bool closeTrack) |
The EndBDTrack completes a BD track. | |
bool | EndCDSession () |
Finishes a CD session which has been previously started with the StartCDSession method. | |
bool | EndCDTrack () |
Ends a CD track. | |
bool | EndCDTrack (bool closeTrack) |
Ends a CD track. | |
bool | EndDVDSession () |
Finishes a DVD session that has been previously started with the StartDVDSession method. | |
bool | EndDVDSession (bool closeSession) |
Finishes a DVD session that has been previously started with the StartDVDSession method. | |
bool | EndDVDTrack () |
The EndDVDTrack completes a DVD fragment (track). | |
bool | EndDVDTrack (bool closeTrack) |
The EndDVDTrack completes a DVD fragment (track). | |
bool | Erase () |
Attempts to perform a quick erase of a CD-RW or DVD-RW media if the device supports RW media. | |
bool | Erase (bool quick) |
Attempts to erase a CD-RW or DVD-RW media if the device supports RW media. | |
bool | Erase (EraseType type) |
Attempts to erase a CD-RW or DVD-RW media if the device supports RW media. | |
bool | Flush () |
Flushes the device internal cache buffer. | |
bool | Format (FormatType type) |
Formats a re-writable DVD media. | |
bool | Format (FormatType type, Int32 blocks) |
Formats a re-writable DVD media. | |
bool | Format (FormatType type, Int32 blocks, bool waitForBackground) |
Formats a re-writable DVD media. | |
bool | FormatBD (BDFormatType type, BDFormatSubType subType) |
Formats BD-R SRM or BD-RE media. | |
bool | FormatBD (BDFormatType type, BDFormatSubType subType, BDFormatParameters formatParameters) |
Formats BD-R SRM or BD-RE media. | |
QSubChannel | GetQSubChannel (SubChannelFormat channelFormat, byte[] rawCdData) |
Returns the Q Sub-channel data from a raw audio cd block. | |
ScsiInterface | GetScsiInterface () |
Creates and returns a new ScsiInterface object which can be used to send SCSI commands to the underlying hardware device. | |
IList< PrimoSoftware.Burner.SpeedDescriptor > | GetWriteSpeeds () |
Reads the burning speeds supported by the device into a IList collection of SpeedDescriptor objects. | |
bool | LockMedia (bool lockMedia) |
Enables or disables manual removal of the medium in the device. | |
bool | LockOutputBuffer (Int32 blocks, out Int64 buffer1, out Int32 bufferBlocks1, out Int64 buffer2, out Int32 bufferBlocks2) |
Obtains a buffer for storing user data that will be written to the device. | |
bool | LockOutputBuffer (Int32 blocks, out Int64 buffer1, out Int32 bufferBlocks1, out Int64 buffer2, out Int32 bufferBlocks2, out Int32 blockSize) |
Obtains a buffer for storing user data that will be written to the device. | |
bool | RawCDRead (Int32 startLba, SubChannelFormat channelFormat, Int32 blockSize, byte[]buffer, Int32 numberOfBlocksToRead, ref Int32 numberOfBlocksRead) |
Reads raw data from a CD. | |
bool | ReadAudio (TrackBuffer trackBuffer, Int32 startAddress) |
The readAudio method reads digital audio data from the media. | |
bool | ReadAudio (TrackBuffer trackBuffer, Int32 startAddress, Int32 blocks) |
The readAudio method reads digital audio data from the media. | |
CDSession | ReadCDSessionLayout (byte sessionNumber) |
Extracts a CDSession object from a CD session. | |
CDSession | ReadCDSessionLayout (byte sessionNumber, bool performIndexScan) |
Extracts a CDSession object from a CD session. | |
CDSession | ReadCDSessionLayout (byte sessionNumber, bool performIndexScan, bool fastScan, Int32 fastScanBlocks) |
Extracts a CDSession object from a CD session. | |
CDText | ReadCDText () |
Reads the CD-TEXT of Audio CD. | |
bool | ReadData (TrackBuffer trackBuffer, Int32 startAddress) |
Reads data from the media. | |
bool | ReadData (TrackBuffer trackBuffer, Int32 startAddress, Int32 blocks) |
Reads data from the media. | |
DiscInfo | ReadDiscInfo () |
Reads information about the disk. | |
MediaInfo | ReadMediaInfo () |
Retrieves extended information from the media in the device. | |
RawToc | ReadRawToc () |
Reads the Full Table-Of-Content in raw format. | |
SessionInfo | ReadSessionInfo () |
Returns information about the disc sessions. | |
Toc | ReadToc () |
Reads the Table-Of-Content of a CD. | |
Toc | ReadTocFromSession (byte sessionNumber) |
Reads the Table-Of-Content of a session. | |
TrackInfoEx | ReadTrackInfoEx (Int32 trackNumber) |
Returns extended information about a track. | |
void | Refresh () |
The Refresh method re-reads disc information. | |
bool | ReserveTrack (Int32 blocks) |
Reserves a track. | |
bool | ReserveTrackLBA (Int32 endLBA) |
Reserves a track by specifying the end logical block address instead of size. | |
bool | Reset () |
The Reset method resets the device firmware. | |
bool | SetCDText (CDText cdText) |
Sets the CD-TEXT data that should be written to the CD. | |
bool | StartBDSession () |
The StartBDSession method initializes a new Blu-ray Disc session. | |
bool | StartBDTrack (Int32 blocks) |
The StartBDTrack method starts a new track or continues and existing track from a BD session. | |
bool | StartCDSession (bool simulate, CDSession session) |
Starts the recording of a new CD session. | |
bool | StartCDSession (bool simulate, CDSession session, WriteMethod wm) |
Starts the recording of a new CD session. | |
bool | StartCDSession (bool simulate, CDSession session, WriteMethod wm, bool closeSession, bool closeDisc) |
Starts the recording of a new CD session. | |
bool | StartCDTrack (CDTrack newTrack) |
Starts a new track on a TAO or Packet session. | |
bool | StartDVDSession (bool simulate) |
Initializes a new DVD session. | |
bool | StartDVDSession (bool simulate, WriteMethod writeMethod) |
Initializes a new DVD session. | |
bool | StartDVDSession (bool simulate, WriteMethod writeMethod, bool closeDisc) |
Initializes a new DVD session. | |
bool | StartDVDTrack (Int32 blocks) |
Starts a new track or continues an existing track from a DVD session. | |
void | UnlockOutputBuffer (Int32 blocks) |
Unlocks the write buffer and writes the data from the buffer to the disc. | |
void | UnlockOutputBufferEx (Int32 blocks, Int32 discAddress) |
Unlocks the write buffer and writes the data from the buffer to the disc. | |
bool | WriteData (Int32 startLba, byte[] buffer, Int32 blocks, Int32 blockSize) |
The WriteData method writes data to a CD, DVD or BD starting at the logical block address indicated by the startLba parameter. | |
Properties | |
BDFeatures | BDFeatures [get] |
Returns a BDFeatures object describing the Blu-ray Disc capabilities of the device. | |
bool | BDWriteVerify [get, set] |
Indicates whether the device should do automatic verify-after-write cycle while writing data to BD media. | |
double | BgFormatProgress [get] |
Gets the background format progress as a percentage. | |
BgFormatStatus | BgFormatStatus [get] |
Gets the background format status of the mounted disc. | |
CDFeatures | CDFeatures [get] |
Returns a CDFeatures object describing the CD capabilities of the device. | |
string | Description [get] |
Gets the device description as it is set by its manufacturer. | |
char | DriveLetter [get] |
Gets the device drive letter. | |
DVDFeatures | DVDFeatures [get] |
Returns a DVDFeatures object describing the DVD capabilities of the device. | |
bool | DVDWriteVerify [get, set] |
Indicates whether the device should do automatic verify-after-write cycle while writing data to DVD media. | |
double | EraseProgress [get] |
Gets/sets a percentage showing the progress of an erase operation started with the Device.Erase method. | |
ErrorInfo | Error [get] |
Returns information about the last error that occurred while using the Device object. | |
double | FormatProgress [get] |
Gets/sets a percentage showing the progress of a format operation started with the Device.Format method. | |
IntPtr | Handle [get] |
Gets the operating system device handle. | |
Int32 | InternalCacheCapacity [get] |
Gets the capacity of the device internal cache buffer. | |
Int32 | InternalCacheUsedSpace [get] |
Gets the number of bytes used in the device internal cache. | |
Int32 | MaxReadSpeedKB [get] |
Gets the maximum supported read speed in Kbytes/s. | |
Int32 | MaxWriteSpeedKB [get] |
Gets the maximum supported write speed in Kbytes/s. | |
Int64 | MediaCapacity [get] |
Gets the block capacity of the media inserted in the device. | |
Int64 | MediaFreeSpace [get] |
Gets the numbers of blocks that can be added to the disc in the device before an additional add will cause a failure for lack of space. | |
bool | MediaIsBD [get] |
Indicates whether the media in the device is BD-R or BD-RE. | |
bool | MediaIsBlank [get] |
Indicates that the media in the device is blank. | |
bool | MediaIsCD [get] |
Indicates whether the media in the device is CD-ROM, CD-R or CD-RW. | |
bool | MediaIsDVD [get] |
Indicates whether the medium in the device is DVD-ROM, DVD-RAM, DVD-R/RW or DVD+R/RW. | |
bool | MediaIsFormatted [get] |
Indicates whether the media in the device is formatted. | |
bool | MediaIsReWritable [get] |
Indicates whether the media in the device is re-writable. | |
Int64 | MediaLayerCapacity [get] |
Returns the layer 0 (L0) capacity, in blocks, of DVD-R DL and DVD+R DL media. | |
MediaProfile | MediaProfile [get] |
Gets the type of the media that is currently inserted in the device. | |
MediaReady | MediaState [get] |
Indicates whether there is medium inserted in the device. | |
Int32 | NewSessionStartAddress [get, set] |
Gets/Sets the start address of the new disc session. | |
Int32 | NewTrackStartAddress [get] |
Gets the start address of the next disc track. | |
string | ProductId [get] |
Gets the product id (the model) of the device as it is set by its manufacturer. | |
Int32 | ReadSpeedKB [get, set] |
Gets/Sets the read speed in Kbytes/s. | |
string | Revision [get] |
Gets the revision (the version) of the device's firmware as it is set by its manufacturer. | |
string | ScsiAddress [get] |
Gets the SCSI bus address of the device as string in the form of (Host Adapter Number:Target ID:LUN) | |
bool | Streaming [get, set] |
Indicates whether the device should use stream recording or not. | |
String | SystemPath [get] |
Returns the system path that identifies the device. | |
Int32 | UnitReady [get] |
Indicates whether the device is ready. | |
string | Vendor [get] |
Gets the device vendor name as set by the manufacturer. | |
string | VendorSpecificInfo [get] |
Gets the vendor specific information of the device as it is set by its manufacturer. | |
Int32 | WriteSpeedKB [get, set] |
Gets/Sets the write speed in Kbytes/s. | |
Int32 | WriteTransferRate [get] |
Gets the actual write transfer rate (write speed) as measured by PrimoBurner. | |
Events | |
EventHandler< DeviceContinueEventArgs > | OnContinueRead |
Raised to check if a long read operation should continue. | |
EventHandler< DeviceEraseEventArgs > | OnErase |
Raised to report the progress of a disc blanking operation started with the Erase method. | |
EventHandler< DeviceFormatEventArgs > | OnFormat |
Raised to report the progress of a format operation started with the Format method. | |
EventHandler< DeviceReadEventArgs > | OnRead |
Raised to report the progress of long read operations. | |
EventHandler< DeviceWriteLeadInEventArgs > | OnWriteLeadIn |
Raised to report the progress during the recording of the lead-in area of a CD session. | |
EventHandler< DeviceWriteLeadOutEventArgs > | OnWriteLeadOut |
Raised to report the progress during the recording of the lead-out area of a CD session when RAW CD writng is used. | |
Recording Device Low Level Application Programming Interface.
void ClearOutputBuffer | ( | ) |
Clears the buffer that is used for writing.
The buffer is filled with zeros. This method should be called when the current burn operation is about to be canceled.
ObjectDisposedException | The Device object was already disposed. |
bool CloseDisc | ( | ) |
Closes an open BD-R disc.
Last session on the disc must be closed before this method is called.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool CloseLastSession | ( | ) |
Closes the last open session on the disc.
false - An error occured or the media is blank unformatted BD-RE.
ObjectDisposedException | The Device object was already disposed. |
bool CloseTrack | ( | Int32 | trackNumber | ) |
Closes a track.
trackNumber | Track to be closed. The track number is 1 based. To close the last track pass 0 for trackNumber. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
TrackType DetectTrackType | ( | Int32 | trackStartLba | ) |
Returns the type of a CD track.
To detect the track type the method actually scans several blocks from the disc that is in the device. This method requires a valid recorded disc to be present in the device.
trackStartLba | Logical block address of the track start. |
NOTES:
1) To detect the track type the method reads blocksToScan blocks starting from trackStartLba.
2)A valid recorded disc must be present in the device.
ObjectDisposedException | The Device object was already disposed. |
References Device.DetectTrackType().
Referenced by Device.DetectTrackType().
TrackType DetectTrackType | ( | Int32 | trackStartLba, |
Int32 | blocksToScan | ||
) |
Returns the type of a CD track.
To detect the track type the method actually scans several blocks from the disc that is in the device. This method requires a valid recorded disc to be present in the device.
trackStartLba | Logical block address of the track start. |
blocksToScan | Number of blocks to scan (read) from the disc. This parameter has a default value of 10. |
NOTES:
1) To detect the track type the method reads blocksToScan blocks starting from trackStartLba.
2)A valid recorded disc must be present in the device.
ObjectDisposedException | The Device object was already disposed. |
bool DisableMCN | ( | ) |
Disables media change notifications.
This prevents Windows from sending the IO MEDIA ARRIVAL and IO MEDIA REMOVAL events to applications. This method works only on Windows XP and above.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool Dismount | ( | ) |
Tries to dismount the volume in the device.
That forces the operating system to invalidate its cache and to refresh the file system information.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool Eject | ( | bool | eject | ) |
Ejects the media from the device.
eject | Indicates whether to eject the tray of device. If this parameter is true, the media is ejected. If this parameter is false the device tray is closed. |
false - The device does not support the eject command.
ObjectDisposedException | The Device object was already disposed. |
References Device.Eject().
Referenced by Device.Eject().
bool Eject | ( | bool | eject, |
bool | unlockMedium | ||
) |
Ejects the media from the device.
eject | Indicates whether to eject the tray of device. If this parameter is true, the media is ejected. If this parameter is false the device tray is closed. |
unlockMedium | Indicates that the medium must be ejected even if the device tray is locked. |
false - The device does not support the eject command.
ObjectDisposedException | The Device object was already disposed. |
bool EnableMCN | ( | ) |
Enables media change notifications.
This method works only on Windows XP and above.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool EndBDSession | ( | ) |
The EndBDSession method finishes a BD session that has been previously started with the StartBDSession method.
This method leaves the disc open.
The session is closed and so is the disc
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.EndBDSession().
Referenced by Device.EndBDSession().
bool EndBDSession | ( | bool | closeSession, |
bool | closeDisc | ||
) |
The EndBDSession method finishes a BD session that has been previously started with the StartBDSession method.
This method leaves the disc open.
closeSession | Indicates that the session should be closed. This parameter is ignored if closeDisc is set to "true". The default value of this parameter is "true". |
closeDisc | Indicates that the disc should be closed. The default value of this parameter is "true". |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool EndBDTrack | ( | ) |
The EndBDTrack closes a BD track.
Track is closed.
This parameter must be set to true if the EndBDSession method will be called with closeSession or closeDisc parameters set to true.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.EndBDTrack().
Referenced by Device.EndBDTrack().
bool EndBDTrack | ( | bool | closeTrack | ) |
The EndBDTrack completes a BD track.
closeTrack | Indicates whether the track should be closed. The default value of this parameter is "true". |
This parameter must be set to true if the EndBDSession method will be called with closeSession or closeDisc parameters set to true.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool EndCDSession | ( | ) |
Finishes a CD session which has been previously started with the StartCDSession method.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool EndCDTrack | ( | ) |
Ends a CD track.
The track will also be closed.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.EndCDTrack().
Referenced by Device.EndCDTrack().
bool EndCDTrack | ( | bool | closeTrack | ) |
Ends a CD track.
closeTrack | Indicates that the track should be closed. This parameter must be set to true if a write method different than WriteMethod.Packet is used. In Packet mode the track can be left open to allow recording of data at the end of the track at a later time. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool EndDVDSession | ( | ) |
Finishes a DVD session that has been previously started with the StartDVDSession method.
The session will be closed.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.EndDVDSession().
Referenced by Device.EndDVDSession().
bool EndDVDSession | ( | bool | closeSession | ) |
Finishes a DVD session that has been previously started with the StartDVDSession method.
closeSession | Indicates that the session should be closed. The default value of this parameter is "true". |
The session is always closed when Disc-At-Once recording is performed regardless of the value of the 'closeSession' parameter.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool EndDVDTrack | ( | ) |
The EndDVDTrack completes a DVD fragment (track).
The track will be closed.
If the Incremental (WriteMethod.DvdIncremental) method is used the application may leave the track open to allow recording of data at the end of the track at a later time by setting this parameter value to false.
This parameter must be set to true if the Disc-At-Once (WriteMethod.DvdDao) write method is used.
This parameter must be set to true if the StartDVDSession method was previously called with the 'closeDisc' parameter set to true.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.EndDVDTrack().
Referenced by Device.EndDVDTrack().
bool EndDVDTrack | ( | bool | closeTrack | ) |
The EndDVDTrack completes a DVD fragment (track).
closeTrack | Indicates whether the track should be closed. The default value of this parameter is "true". |
If the Incremental (WriteMethod.DvdIncremental) method is used the application may leave the track open to allow recording of data at the end of the track at a later time by setting this parameter value to false.
This parameter must be set to true if the Disc-At-Once (WriteMethod.DvdDao) write method is used.
This parameter must be set to true if the StartDVDSession method was previously called with the 'closeDisc' parameter set to true.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool Erase | ( | ) |
Attempts to perform a quick erase of a CD-RW or DVD-RW media if the device supports RW media.
false - The erasing failed.
ObjectDisposedException | The Device object was already disposed. |
References Device.Erase().
Referenced by Device.Erase().
bool Erase | ( | bool | quick | ) |
Attempts to erase a CD-RW or DVD-RW media if the device supports RW media.
quick | Indicates the erase type. If this parameter is true, a quick erase is performed. If this parameter is false, a full erase is performed. The default value of this parameter is "true". |
false - The erasing failed.
ObjectDisposedException | The Device object was already disposed. |
bool Erase | ( | EraseType | type | ) |
Attempts to erase a CD-RW or DVD-RW media if the device supports RW media.
type | Indicates the erase type. |
false - The erasing failed.
ObjectDisposedException | The Device object was already disposed. |
bool Flush | ( | ) |
Flushes the device internal cache buffer.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool Format | ( | FormatType | type | ) |
Formats a re-writable DVD media.
Depending on the media profile different formatting can be performed.
type | Type of the format that should be performed. |
See the FormatType enumeration for details about all the format types. See the MediaProfile enumeration for details about all media types.
DVD+RW – the format has two phases - "foreground" and "background". The foreground format is very short and is executed synchronously. After the foreground format is completed the background format continues until the whole DVD+RW disc is fully formatted. During the background format the DVD/CD writing is possible on the part of the disc that has been formatted.
DVD-RW – when used with FormatType.DvdMinusRwQuick you can set blocks to 0 to make it a really quick format.
When waitForBackground is set to true the Format method will wait until the background format is completed and will use the OnFormat event to report the format progress.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References PrimoSoftware.Burner.Format.
bool Format | ( | FormatType | type, |
Int32 | blocks | ||
) |
Formats a re-writable DVD media.
Depending on the media profile different formatting can be performed.
type | Type of the format that should be performed. |
blocks | The number of blocks(sectors) that should be formatted. This parameter is ignored for DVD+RW media when the value of the format type is FormatType.DvdPlusRwFull, FormatType.DvdPlusRwRestart or FormatType.DvdPlusRwStop. |
See the FormatType enumeration for details about all the format types. See the MediaProfile enumeration for details about all media types.
DVD+RW – the format has two phases - "foreground" and "background". The foreground format is very short and is executed synchronously. After the foreground format is completed the background format continues until the whole DVD+RW disc is fully formatted. During the background format the DVD/CD writing is possible on the part of the disc that has been formatted.
DVD-RW – when used with FormatType.DvdMinusRwQuick you can set blocks to 0 to make it a really quick format.
When waitForBackground is set to true the Format method will wait until the background format is completed and will use the OnFormat event to report the format progress.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References PrimoSoftware.Burner.Format.
bool Format | ( | FormatType | type, |
Int32 | blocks, | ||
bool | waitForBackground | ||
) |
Formats a re-writable DVD media.
Depending on the media profile different formatting can be performed.
type | Type of the format that should be performed. |
blocks | The number of blocks(sectors) that should be formatted. This parameter is ignored for DVD+RW media when the value of the format type is FormatType.DvdPlusRwFull, FormatType.DvdPlusRwRestart or FormatType.DvdPlusRwStop. |
waitForBackground | Use this parameter to block in the Format method until the background format is completed. This parameter is ignored if format type is other than FormatType.DvdPlusRwFull, FormatType.DvdPlusRwRestart. |
See the FormatType enumeration for details about all the format types. See the MediaProfile enumeration for details about all media types.
DVD+RW – the format has two phases - "foreground" and "background". The foreground format is very short and is executed synchronously. After the foreground format is completed the background format continues until the whole DVD+RW disc is fully formatted. During the background format the DVD/CD writing is possible on the part of the disc that has been formatted.
DVD-RW – when used with FormatType.DvdMinusRwQuick you can set blocks to 0 to make it a really quick format.
When waitForBackground is set to true the Format method will wait until the background format is completed and will use the OnFormat event to report the format progress.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool FormatBD | ( | BDFormatType | type, |
BDFormatSubType | subType | ||
) |
Formats BD-R SRM or BD-RE media.
Depending on the media profile different formatting are available.
type | The type of the format that should be performed. |
subType | The format sub type. The value of this parameter depends on the value of the type parameter. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.FormatBD().
Referenced by Device.FormatBD().
bool FormatBD | ( | BDFormatType | type, |
BDFormatSubType | subType, | ||
BDFormatParameters | formatParameters | ||
) |
Formats BD-R SRM or BD-RE media.
Depending on the media profile different formatting are available.
type | The type of the format that should be performed. |
subType | The format sub type. The value of this parameter depends on the value of the type parameter. |
formatParameters | Reserved. Must be set to null. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
QSubChannel GetQSubChannel | ( | SubChannelFormat | channelFormat, |
byte[] | rawCdData | ||
) |
Returns the Q Sub-channel data from a raw audio cd block.
The function reads the sub-channel information from the last ChannelSize.Pw (96) bytes of the RAW CD block passed with the rawCdData parameter.
channelFormat | Expected format of the sub-channel data. |
rawCdData | A buffer that contains BlockSize.CdRaw (2448) bytes of RAW CD data. Use the Device.RawCDRead method to read CD data in RAW mode. |
ObjectDisposedException | The Device object was already disposed. |
ScsiInterface GetScsiInterface | ( | ) |
Creates and returns a new ScsiInterface object which can be used to send SCSI commands to the underlying hardware device.
The ScsiInterface object needs to be disposed when not needed anymore.
ObjectDisposedException | The Device object was already disposed. |
IList< PrimoSoftware.Burner.SpeedDescriptor > GetWriteSpeeds | ( | ) |
Reads the burning speeds supported by the device into a IList collection of SpeedDescriptor objects.
If the device is not capable of reporting multiple speed descriptors, this method reports a collection with one object in it that describes the maximum write speed. If that is the case, check the the error property for the actual reason.
ObjectDisposedException | The Device object was already disposed. |
ObjectDisposedException | The Device object was already disposed. |
bool LockMedia | ( | bool | lockMedia | ) |
Enables or disables manual removal of the medium in the device.
lockMedia | Indicates whether the device tray mechanism can be opened /closed by the device operator. Set this parameter to true to prevent manual ejecting of the medium and to false to allow manual ejecting of the medium. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool LockOutputBuffer | ( | Int32 | blocks, |
out Int64 | buffer1, | ||
out Int32 | bufferBlocks1, | ||
out Int64 | buffer2, | ||
out Int32 | bufferBlocks2 | ||
) |
Obtains a buffer for storing user data that will be written to the device.
blocks | Size, in blocks, of the portion of the buffer to lock. Note that the output buffer is conceptually circular. |
buffer1 | Upon successful execution this parameter will contain the address of the first block of the output buffer to be locked. |
bufferBlocks1 | Upon successful execution this parameter will contain the number of blocks pointed to by the buffer1 parameter. If this value is less than the blocks parameter, buffer2 will point to a second portion of the output buffer. |
buffer2 | Upon successful execution this parameter will contain the address of the second block of the output buffer to be locked. |
bufferBlocks2 | Upon successful execution this parameter will contain the number of blocks pointed to by the buffer2 parameter. If buffer2 is 0, this value will be 0. |
The size of the blocks depends on the write method (WriteMethod) and the current session (Device.StartCDSession, Device.StartDVDSession, Device.StartBDSession).
false - Failed to lock buffer. This may happen when the number of blocks requested is too big.
ObjectDisposedException | The Device object was already disposed. |
References Device.LockOutputBuffer().
Referenced by Device.LockOutputBuffer().
bool LockOutputBuffer | ( | Int32 | blocks, |
out Int64 | buffer1, | ||
out Int32 | bufferBlocks1, | ||
out Int64 | buffer2, | ||
out Int32 | bufferBlocks2, | ||
out Int32 | blockSize | ||
) |
Obtains a buffer for storing user data that will be written to the device.
blocks | Size, in blocks, of the portion of the buffer to lock. Note that the output buffer is conceptually circular. |
buffer1 | Upon successful execution this parameter will contain the address of the first block of the output buffer to be locked. |
bufferBlocks1 | Upon successful execution this parameter will contain the number of blocks pointed to by the buffer1 parameter. If this value is less than the blocks parameter, buffer2 will point to a second portion of the output buffer. |
buffer2 | Upon successful execution this parameter will contain the address of the second block of the output buffer to be locked. |
bufferBlocks2 | Upon successful execution this parameter will contain the number of blocks pointed to by the buffer2 parameter. If buffer2 is 0, this value will be 0. |
blockSize | Upon successful execution this parameter will contain the size of a single block from the locked output buffer |
false - Failed to lock buffer. This may happen when the number of blocks requested is too big.
ObjectDisposedException | The Device object was already disposed. |
bool RawCDRead | ( | Int32 | startLba, |
SubChannelFormat | channelFormat, | ||
Int32 | blockSize, | ||
byte[] | buffer, | ||
Int32 | numberOfBlocksToRead, | ||
ref Int32 | numberOfBlocksRead | ||
) |
Reads raw data from a CD.
startLba | The logical block address from which the reading should start |
channelFormat | The expected format of the sub-channel data. The sub-channel data occupies the last ChannelSize.PW (96) bytes from a RAW CD block. The size of a RAW CD block is BlockSize.CdRaw (2448) bytes. |
blockSize | The size of a raw block. This parameter should be set to BlockSize.Cdda if the selected sub-channel data format is SubChannelFormat.None and to BlockSize.CdRaw if the selected channel is set to SubChannelFormat.PWRaw or SubChannelFormat.PWDeinterleaved. |
buffer | Buffer that receives the data read from the disc. The size fo the buffer must be at least (blockSize * numberOfBlocksToRead) bytes. |
numberOfBlocksToRead | Number of blocks to read. |
numberOfBlocksRead | Receives the number of blocks read. RawCDRead sets this value to zero before the reading. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool ReadAudio | ( | TrackBuffer | trackBuffer, |
Int32 | startAddress | ||
) |
The readAudio method reads digital audio data from the media.
Reads up to DefaultBufferSize.Cd blocks from the medium.
trackBuffer | Upon successful execution the track buffer will contain the data read from the medium. The TrackBuffer object must be created before calling this method. |
startAddress | Address (in blocks) at which to start the reading operation |
false - Error
ObjectDisposedException | The Device object was already disposed. |
References Device.ReadAudio().
Referenced by Device.ReadAudio().
bool ReadAudio | ( | TrackBuffer | trackBuffer, |
Int32 | startAddress, | ||
Int32 | blocks | ||
) |
The readAudio method reads digital audio data from the media.
trackBuffer | Upon successful execution the track buffer will contain the data read from the medium. The TrackBuffer object must be created before calling this method. |
startAddress | Address (in blocks) at which to start the reading operation |
blocks | Number of blocks to be read |
false - Error
ObjectDisposedException | The Device object was already disposed. |
References TrackBuffer.Blocks, and TrackBuffer.BlockSize.
CDSession ReadCDSessionLayout | ( | byte | sessionNumber | ) |
Extracts a CDSession object from a CD session.
Creates a CDSession object with the track and index information of the extracted session (also known as Cue Sheet information).
sessionNumber | The number of the session that should be scanned for index information. To obtain information about the disk sessions use the ReadSessionInfo method. |
This method scans the entire session and reads the pre-gap and the track index information from the audio sector sub-channels.
The reading progress is reported via the OnRead event.
ObjectDisposedException | The Device object was already disposed. |
References Device.ReadCDSessionLayout().
Referenced by Device.ReadCDSessionLayout(), and Device.ReadCDSessionLayout().
CDSession ReadCDSessionLayout | ( | byte | sessionNumber, |
bool | performIndexScan | ||
) |
Extracts a CDSession object from a CD session.
Creates a CDSession object with the track and index information of the extracted session (also known as Cue Sheet information).
sessionNumber | The number of the session that should be scanned for index information. To obtain information about the disk sessions use the ReadSessionInfo method. |
performIndexScan | Indicates that the session tracks should be scanned for index information, pre-gap information, and CD form and mode change points. The PrimoBurner abstraction of a CD form and mode change point is the CDMode class. The default value of this parameter is true. |
This method scans the entire session and reads the pre-gap and the track index information from the audio sector sub-channels.
The reading progress is reported via the OnRead event.
ObjectDisposedException | The Device object was already disposed. |
References Device.ReadCDSessionLayout().
CDSession ReadCDSessionLayout | ( | byte | sessionNumber, |
bool | performIndexScan, | ||
bool | fastScan, | ||
Int32 | fastScanBlocks | ||
) |
Extracts a CDSession object from a CD session.
Creates a CDSession object with the track and index information of the extracted session (also known as Cue Sheet information).
sessionNumber | The number of the session that should be scanned for index information. To obtain information about the disk sessions use the ReadSessionInfo method. |
performIndexScan | Indicates that the session tracks should be scanned for index information, pre-gap information, and CD form and mode change points. The PrimoBurner abstraction of a CD form and mode change point is the CDMode class. The default value of this parameter is true. |
fastScan | Indicates that a fast scan should be performed. When set to true only first 600 blocks from each track are scanned. This parameter has no meaning if performIndexScan is set to false. The default value for this parameter is true. |
fastScanBlocks | Number of blocks to scan from each track when scanning for ISRC and MCN information. This parameter has no meaning if fastScan is set to false. |
This method scans the entire session and reads the pre-gap and the track index information from the audio sector sub-channels.
The reading progress is reported via the OnRead event.
ObjectDisposedException | The Device object was already disposed. |
CDText ReadCDText | ( | ) |
Reads the CD-TEXT of Audio CD.
bool ReadData | ( | TrackBuffer | trackBuffer, |
Int32 | startAddress | ||
) |
Reads data from the media.
Reads up to DefaultBufferSize.Cd blocks from the medium.
trackBuffer | Upon successful execution the track buffer will contain the data read from the medium. The TrackBuffer object must be created before calling this method. |
startAddress | Address (in blocks) at which to start the reading operation |
false - Error
ObjectDisposedException | The Device object was already disposed. |
References Device.ReadData().
Referenced by Device.ReadData().
bool ReadData | ( | TrackBuffer | trackBuffer, |
Int32 | startAddress, | ||
Int32 | blocks | ||
) |
Reads data from the media.
Reads up to DefaultBufferSize.Cd blocks from the medium.
trackBuffer | Upon successful execution the track buffer will contain the data read from the medium. The TrackBuffer object must be created before calling this method. |
startAddress | Address (in blocks) at which to start the reading operation |
blocks | Number of blocks to be read |
false - Error
References TrackBuffer.BlockSize, and TrackBuffer.MaxBlocks.
DiscInfo ReadDiscInfo | ( | ) |
Reads information about the disk.
This method works even when the last session on the disk is empty or incomplete.
ObjectDisposedException | The Device object was already disposed. |
MediaInfo ReadMediaInfo | ( | ) |
Retrieves extended information from the media in the device.
ObjectDisposedException | The Device object was already disposed. |
RawToc ReadRawToc | ( | ) |
Reads the Full Table-Of-Content in raw format.
This method returns all Q sub-code data in the Lead-In (TOC) area. For multi-session discs, the TOC data for all sessions is returned.
ObjectDisposedException | The Device object was already disposed. |
SessionInfo ReadSessionInfo | ( | ) |
Returns information about the disc sessions.
This method reports only the complete sessions. If the last session on the disc is in an incomplete state, the session will be ignored. The method will fail if there is only one session on the disc and it is in an incomplete state.
ObjectDisposedException | The Device object was already disposed. |
Toc ReadToc | ( | ) |
Reads the Table-Of-Content of a CD.
For multi-session discs, this command returns the TOC data for all complete sessions.
This method reports only the tracks from the complete sessions. If the last session on the disc is incomplete that session is ignored. The method will fail if there is only one session on the disc and it is an incomplete one.
ObjectDisposedException | The Device object was already disposed. |
Toc ReadTocFromSession | ( | byte | sessionNumber | ) |
Reads the Table-Of-Content of a session.
sessionNumber | Specifies the session number for which the data is returned. If this value is set to zero, the Table of Contents will start with the first track on the disc. |
The track with index = AAh contains the start of the lead-out area of the last complete session on the disc.
ObjectDisposedException | The Device object was already disposed. |
TrackInfoEx ReadTrackInfoEx | ( | Int32 | trackNumber | ) |
Returns extended information about a track.
This methods works for any track including the tracks that have not been closed and the tracks which are in open sessions.
trackNumber | The number of the track to return information for. For CD media the value of this parameter should be a number between 1 and 99. |
ObjectDisposedException | The Device object was already disposed. |
void Refresh | ( | ) |
The Refresh method re-reads disc information.
Use this method right after the device tray was closed.
NOTE: This method also tries to dismount the volume in the device. That forces the operating system to invalidate its cache and to refresh the information about the cd file system.
ObjectDisposedException | The Device object was already disposed. |
bool ReserveTrack | ( | Int32 | blocks | ) |
Reserves a track.
For CD the track size must be 300 blocks or more.
blocks | The size in blocks of the reserved track. |
Use after Device.StartCDSession/StartDVDSession
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool ReserveTrackLBA | ( | Int32 | endLBA | ) |
Reserves a track by specifying the end logical block address instead of size.
For CD the LBA must be such that the size of the reserved track to be 300 or more.
endLBA | The end logical block address to use. |
Use after Device.StartCDSession/StartDVDSession
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool Reset | ( | ) |
The Reset method resets the device firmware.
Use this method to reset the device when a writing operation failed.
false - reset failed
ObjectDisposedException | The Device object was already disposed. |
bool SetCDText | ( | CDText | cdText | ) |
Sets the CD-TEXT data that should be written to the CD.
This method must be called before the StartCDSession method.
cdText | Set this parameter to null if you do not want CD-TEXT to be written on the CD, otherwise set teh desired CD Text data |
CD-TEXT data is encoded in the lead in area of the CD. CD-TEXT is not supported in TAO, RAW DAO and RAW SAO modes.
ObjectDisposedException | The Device object was already disposed. |
bool StartBDSession | ( | ) |
The StartBDSession method initializes a new Blu-ray Disc session.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool StartBDTrack | ( | Int32 | blocks | ) |
The StartBDTrack method starts a new track or continues and existing track from a BD session.
blocks | Number of BD blocks to be added to the track. The size of one BD block is 2048 bytes. An open track may consume all remaining available blocks on the disc. |
This method should be called after the StartBDSession method and before the EndBDTrack method.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool StartCDSession | ( | bool | simulate, |
CDSession | session | ||
) |
Starts the recording of a new CD session.
simulate | Indicates whether a simulated burn should be performed. The simulation is a good test of a device, because most of the operations are performed as in a real burn. If this parameter is true, the burn is simulated and nothing is burned on the CD. If this parameter is set to false the burn is real. |
session | A CDSession object that contains the session definition. The CDSession object is used to create a Table-Of-Content (TOC) record on the CD and to drive the burning process. The CDSession object determines also the type of the CD session (i.e. Audio, Data, CD-XA, RAW) and the mode of each track (via the CDTrack.Type property). |
The method starts recording the specified CD session using WriteMethod.Sao. The session is always closed when any of the SAO write methods are used.
The following rules apply to the CDSession object depending on the selected write method:
WriteMethod.Sao, WriteMethod.FullRawDao, WriteMethod.RawDao2352 and WriteMethod.RawDao: The CDSession object specified with the ‘session’ parameter determines the type and the structure of the session and should contain valid CDTrack items for all tracks in the session.
WriteMethod.Tao and WriteMethod.Packet: The CDSession object specified with the ‘session’ parameter determines the type of the session only and should not contain any CDTrack items. Parameters of each track are additionally specified when a new track is initiated using the StartCDTrack method.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.StartCDSession().
Referenced by Device.StartCDSession(), and Device.StartCDSession().
bool StartCDSession | ( | bool | simulate, |
CDSession | session, | ||
WriteMethod | wm | ||
) |
Starts the recording of a new CD session.
simulate | Indicates whether a simulated burn should be performed. The simulation is a good test of a device, because most of the operations are performed as in a real burn. If this parameter is true, the burn is simulated and nothing is burned on the CD. If this parameter is set to false the burn is real. |
session | A CDSession object that contains the session definition. The CDSession object is used to create a Table-Of-Content (TOC) record on the CD and to drive the burning process. The CDSession object determines also the type of the CD session (i.e. Audio, Data, CD-XA, RAW) and the mode of each track (via the CDTrack.Type property). |
wm | Determines the write method that should be used to burn the CD session. See the WriteMethod enumeration for a list of the supported write methods. |
The following rules apply to the CDSession object depending on the selected write method:
WriteMethod.Sao, WriteMethod.FullRawDao, WriteMethod.RawDao2352 and WriteMethod.RawDao: The CDSession object specified with the ‘session’ parameter determines the type and the structure of the session and should contain valid CDTrack items for all tracks in the session.
WriteMethod.Tao and WriteMethod.Packet: The CDSession object specified with the ‘session’ parameter determines the type of the session only and should not contain any CDTrack items. Parameters of each track are additionally specified when a new track is initiated using the StartCDTrack method.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.StartCDSession().
bool StartCDSession | ( | bool | simulate, |
CDSession | session, | ||
WriteMethod | wm, | ||
bool | closeSession, | ||
bool | closeDisc | ||
) |
Starts the recording of a new CD session.
simulate | Indicates whether a simulated burn should be performed. The simulation is a good test of a device, because most of the operations are performed as in a real burn. If this parameter is true, the burn is simulated and nothing is burned on the CD. If this parameter is set to false the burn is real. |
session | A CDSession object that contains the session definition. The CDSession object is used to create a Table-Of-Content (TOC) record on the CD and to drive the burning process. The CDSession object determines also the type of the CD session (i.e. Audio, Data, CD-XA, RAW) and the mode of each track (via the CDTrack.Type property). |
wm | Determines the write method that should be used to burn the CD session. See the WriteMethod enumeration for a list of the supported write methods. |
closeSession | Indicates whether the session should be closed. Set to false to leave the session open and to allow additional tracks to be added to the session at a later time. This parameter is ignored when the write method is WriteMethod.Sao. The session is always closed when any of the SAO write methods are used. This parameter is ignored if WriteMethod.FullRawDao or WriteMethod.RawDao2352 methods are used. The default value of this parameter is "true". |
closeDisc | Indicates whether the CD should be closed. Set this parameter to false to allow additional sessions to be added at later time to the disc. This parameter is ignored if there is raw B0 point set in the session and the write method is set to WriteMethod.FullRawDao and in WriteMethod.RawDao2352. The default value of this parameter is "true". |
The following rules apply to the CDSession object depending on the selected write method:
WriteMethod.Sao, WriteMethod.FullRawDao, WriteMethod.RawDao2352 and WriteMethod.RawDao: The CDSession object specified with the ‘session’ parameter determines the type and the structure of the session and should contain valid CDTrack items for all tracks in the session.
WriteMethod.Tao and WriteMethod.Packet: The CDSession object specified with the ‘session’ parameter determines the type of the session only and should not contain any CDTrack items. Parameters of each track are additionally specified when a new track is initiated using the StartCDTrack method.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool StartCDTrack | ( | CDTrack | newTrack | ) |
Starts a new track on a TAO or Packet session.
This method does nothing if the write mode is different than WriteMethod.Tao or
WriteMethod.Packet.
<para>The following rules apply to the type of the new track:</para> <para>1) Type cannot be <see cref="TrackType">TrackType.ModeRaw</see> when in StartCDSession method, the write method is set to <see cref="WriteMethod">WriteMethod.Tao</see>.</para> <para>2) Type cannot be <see cref="TrackType">TrackType.ModeRaw</see> or <see cref="TrackType">TrackType.Audio</see> when in StartCDSession, the write method is set to <see cref="WriteMethod">WriteMethod.Packet</see>.</para> <para>3) No pregap or postgap should be defined.</para> <para>4) The track start should be 0.</para> <para>5) The track end should be the length of the track in blocks.</para>
newTrack | A CDTrack object. The track start should be set to 0 and the track end should be set to the length of the track in blocks. The new track is added to the session object that which is passed to the Device.StartCDSession method during the session initialization. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool StartDVDSession | ( | bool | simulate | ) |
Initializes a new DVD session.
simulate | Indicates whether a simulated burn should be performed. The simulation is a good test of a device, because most of the operations are performed as in a real burn. If this parameter is true, the burn is simulated and nothing is burned on the DVD. If this parameter is set to false the burn is real. |
The method will use WriteMethod.DvdIncremental and will close the session once its recording is done.
Media Specific Details:
* DVD-R and DVD+R
It is possible to use both Disc-At-Once (WriteMethod.DvdDao) and Incremental (WriteMethod.DvdIncremental) methods with DVD-R. WriteMethod.DvdDao cannot be used with DVD+R media.
When using the WriteMethod.DvdIncremental the multi-session structure of the disc is similar to the one of a CD-R. The disc can contain several sessions with multiple tracks in each session.
* DVD-RW
It is possible to use both Disc-At-Once (WriteMethod.DvdDao) and Incremental (WriteMethod.DvdIncremental) methods with DVD-RW.
DVD-RW can be configured as sequential recording media or a restricted overwrite media. By default a new blank DVD-RW configured as a sequential recording media.
If a DVD-RW disc is formatted it becomes a Restricted Overwrite media and can only be written with the Incremental (WriteMethod.DvdIncremental) method.
The Disc-At-Once (WriteMethod.DvdDao) method cannot be used on restricted overwrite media. Fully blanking a DVD-RW will make it a sequential and formatting it a restricted overwrite disc. Use the Format method to format a DVD-RW and Erase to erase/blank it.
When DVD-RW Restricted Overwrite media is burned using the WriteMethod.DvdIncremental method multiple sessions are possible but each session contains only one track and new data is added to the same track until the session is closed.
When DVD-RW Sequential media is burned using the WriteMethod.DvdIncremental method the sessions can have one or more tracks.
* DVD+RW
Only Incremental (WriteMethod.DvdIncremental) method can be used with DVD+RW media. There is no multi-session in a traditional sense. The applications could write anywhere on the disc as long as it is formatted.
Notes:
The DVD-R specification describes entities called Lead-in, Lead-out, Border-in and Border-out. DVD-R always has zero or one Lead-in and zero or one Lead-out. The Lead-in, if recorded, is always at the beginning of the disc and the Lead-out, if recorded, is always at the end of the disc. No data can be recorded beyond the Lead-out. The information recording area is a collection of Lead-in/Border-in, Bordered Areas, and Border-out/Lead-out. The bordered area, when written, is called a complete session.
If only a Border-in and Border-out are to be written (after incrementally recording data), the calling application should set the 'closeDisc' parameter to false. If set to false, and insufficient space exists on the medium for another Border, the device will permanently close the medium by recording a Lead-out.
To be consistent with the sessions and tracks concept, in PrimoBurner SDK, the standard Multi-session is used instead of Multi-Border, incomplete session is used instead of incomplete Border and complete session is used instead of complete Border for DVD-R devices.
DVD media is 2KB addressable but the actual writing is done using 32KB packets. The PrimoBurner and the device itself take care of data packing and alignment internally. For the calling application the DVD writing process is similar to the writing of a MODE1 CD (Data CD) except that the StartDVDSession and the StartDVDTrack methods should be used to initiate a DVD session and track and the EndDVDTrack and EndDVDSession methods to finalize it.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.StartDVDSession().
Referenced by Device.StartDVDSession(), and Device.StartDVDSession().
bool StartDVDSession | ( | bool | simulate, |
WriteMethod | writeMethod | ||
) |
Initializes a new DVD session.
simulate | Indicates whether a simulated burn should be performed. The simulation is a good test of a device, because most of the operations are performed as in a real burn. If this parameter is true, the burn is simulated and nothing is burned on the DVD. If this parameter is set to false the burn is real. |
writeMethod | Determines the write method that should be used while burning a DVD session. The valid write methods for DVD are: Incremental (WriteMethod.DvdIncremental) and Disc-At-Once (WriteMethod.DvdDao). The default value of this parameter is WriteMethod.DvdIncremental. |
The WriteMethod.DvdIncremental method works with all DVD media profiles - DVD+RW/+R/-RW/-R.
The burning is done in sessions and fragments (tracks) with one exception for DVD+RW media: DVD+RW disc needs to be formatted before any burning could be done and once formatted the disc contains one session and one track and the whole track could be written and rewritten randomly with no overwrite restrictions.
With WriteMethod.DvdDao the disc will contain one session with one track. No sessions could be added after the burning is completed. The WriteMethod.DvdDao can be used only with DVD-RW media formatted for sequential writing and DVD-R media. It is recommended to use the WriteMethod.DvdDao and DVD-R media to burn DVD movies to ensure best compatibility with the consumer DVD players.
The method will close the session once its recording is done.
Media Specific Details:
* DVD-R and DVD+R
It is possible to use both Disc-At-Once (WriteMethod.DvdDao) and
Incremental (WriteMethod.DvdIncremental) methods with DVD-R. WriteMethod.DvdDao cannot be used with DVD+R media.
When using the WriteMethod.DvdIncremental the multi-session structure of the disc is similar to the one of a CD-R. The disc can contain several sessions with multiple tracks in each session.
* DVD-RW
It is possible to use both Disc-At-Once (WriteMethod.DvdDao) and
Incremental (WriteMethod.DvdIncremental) methods with DVD-RW.
DVD-RW can be configured as sequential recording media or a restricted overwrite media. By default a new blank DVD-RW configured as a sequential recording media.
If a DVD-RW disc is formatted it becomes a Restricted Overwrite media and can only be written with the Incremental (WriteMethod.DvdIncremental) method.
The Disc-At-Once (WriteMethod.DvdDao) method cannot be used on restricted overwrite media. Fully blanking a DVD-RW will make it a sequential and formatting it a restricted overwrite disc. Use the Format method to format a DVD-RW and Erase to erase/blank it.
When DVD-RW Restricted Overwrite media is burned using the WriteMethod.DvdIncremental method multiple sessions are possible but each session contains only one track and new data is added to the same track until the session is closed.
When DVD-RW Sequential media is burned using the WriteMethod.DvdIncremental method the sessions can have one or more tracks.
* DVD+RW
Only Incremental (WriteMethod.DvdIncremental) method can be used with DVD+RW media. There is no multi-session in a traditional sense. The applications could write anywhere on the disc as long as it is formatted.
Notes:
The DVD-R specification describes entities called Lead-in, Lead-out, Border-in and Border-out. DVD-R always has zero or one Lead-in and zero or one Lead-out. The Lead-in, if recorded, is always at the beginning of the disc and the Lead-out, if recorded, is always at the end of the disc. No data can be recorded beyond the Lead-out. The information recording area is a collection of Lead-in/Border-in, Bordered Areas, and Border-out/Lead-out. The bordered area, when written, is called a complete session.
If only a Border-in and Border-out are to be written (after incrementally recording data), the calling application should set the 'closeDisc' parameter to false. If set to false, and insufficient space exists on the medium for another Border, the device will permanently close the medium by recording a Lead-out.
To be consistent with the sessions and tracks concept, in PrimoBurner SDK, the standard Multi-session is used instead of Multi-Border, incomplete session is used instead of incomplete Border and complete session is used instead of complete Border for DVD-R devices.
DVD media is 2KB addressable but the actual writing is done using 32KB packets. The PrimoBurner and the device itself take care of data packing and alignment internally. For the calling application the DVD writing process is similar to the writing of a MODE1 CD (Data CD) except that the StartDVDSession and the StartDVDTrack methods should be used to initiate a DVD session and track and the EndDVDTrack and EndDVDSession methods to finalize it.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
References Device.StartDVDSession().
bool StartDVDSession | ( | bool | simulate, |
WriteMethod | writeMethod, | ||
bool | closeDisc | ||
) |
Initializes a new DVD session.
simulate | Indicates whether a simulated burn should be performed. The simulation is a good test of a device, because most of the operations are performed as in a real burn. If this parameter is true, the burn is simulated and nothing is burned on the DVD. If this parameter is set to false the burn is real. |
writeMethod | Determines the write method that should be used while burning a DVD session. The valid write methods for DVD are: Incremental (WriteMethod.DvdIncremental) and Disc-At-Once (WriteMethod.DvdDao). The default value of this parameter is WriteMethod.DvdIncremental. |
The WriteMethod.DvdIncremental method works with all DVD media profiles - DVD+RW/+R/-RW/-R. The burning is done in sessions and fragments (tracks) with one exception for DVD+RW media:
DVD+RW disc needs to be formatted before any burning could be done and once formatted the disc contains one session and one track and the whole track could be written and rewritten randomly with no overwrite restrictions.
With WriteMethod.DvdDao the disc will contain one session with one track. No sessions could be added after the burning is completed. The WriteMethod.DvdDao can be used only with DVD-RW media formatted for sequential writing and DVD-R media. It is recommended to use the WriteMethod.DvdDao and DVD-R media to burn DVD movies to ensure best compatibility with the consumer DVD players.
closeDisc | Indicates whether the DVD disc should be closed. Set this parameter to false to allow additional sessions to be added at later time to the disc. When burning DVD Video always set 'closeDisc' to true to ensure compatibility with all consumer DVD players. On DVD-R, when WriteMethod.DvdDao is used, the disc is always closed and a lead-out is written at the end of it. The default value of this parameter is "true". |
Media Specific Details:
* DVD-R and DVD+R
It is possible to use both Disc-At-Once (WriteMethod.DvdDao) and Incremental (WriteMethod.DvdIncremental) methods with DVD-R. WriteMethod.DvdDao cannot be used with DVD+R media.
When using the WriteMethod.DvdIncremental the multi-session structure of the disc is similar to the one of a CD-R. The disc can contain several sessions with multiple tracks in each session.
* DVD-RW
It is possible to use both Disc-At-Once (WriteMethod.DvdDao) and Incremental (WriteMethod.DvdIncremental) methods with DVD-RW.
DVD-RW can be configured as sequential recording media or a restricted overwrite media. By default a new blank DVD-RW configured as a sequential recording media.
If a DVD-RW disc is formatted it becomes a Restricted Overwrite media and can only be written with the Incremental (WriteMethod.DvdIncremental) method. The Disc-At-Once (WriteMethod.DvdDao) method cannot be used on restricted overwrite media. Fully blanking a DVD-RW will make it a sequential and formatting it a restricted overwrite disc. Use the Format method to format a DVD-RW and Erase to erase/blank it.
When DVD-RW Restricted Overwrite media is burned using the WriteMethod.DvdIncremental method multiple sessions are possible but each session contains only one track and new data is added to the same track until the session is closed.
When DVD-RW Sequential media is burned using the WriteMethod.DvdIncremental method the sessions can have one or more tracks.
* DVD+RW
Only Incremental (WriteMethod.DvdIncremental) method can be used with DVD+RW media. There is no multi-session in a traditional sense. The applications could write anywhere on the disc as long as it is formatted.
Notes:
The DVD-R specification describes entities called Lead-in, Lead-out, Border-in and Border-out. DVD-R always has zero or one Lead-in and zero or one Lead-out. The Lead-in, if recorded, is always at the beginning of the disc and the Lead-out, if recorded, is always at the end of the disc. No data can be recorded beyond the Lead-out. The information recording area is a collection of Lead-in/Border-in, Bordered Areas, and Border-out/Lead-out. The bordered area, when written, is called a complete session.
If only a Border-in and Border-out are to be written (after incrementally recording data), the calling application should set the 'closeDisc' parameter to false. If set to false, and insufficient space exists on the medium for another Border, the device will permanently close the medium by recording a Lead-out.
To be consistent with the sessions and tracks concept, in PrimoBurner SDK, the standard Multi-session is used instead of Multi-Border, incomplete session is used instead of incomplete Border and complete session is used instead of complete Border for DVD-R devices.
DVD media is 2KB addressable but the actual writing is done using 32KB packets. The PrimoBurner and the device itself take care of data packing and alignment internally. For the calling application the DVD writing process is similar to the writing of a MODE1 CD (Data CD) except that the StartDVDSession and the StartDVDTrack methods should be used to initiate a DVD session and track and the EndDVDTrack and EndDVDSession methods to finalize it.
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
bool StartDVDTrack | ( | Int32 | blocks | ) |
Starts a new track or continues an existing track from a DVD session.
This method should be called after the Device.StartDVDSession method and before the Device.EndDVDTrack method.
blocks | Number of DVD blocks to be added to the track. The size of one DVD block is 2048 bytes. An open track may consume all remaining available blocks on the DVD. |
NOTES:
DVD-R Sequential, DVD-RW in Sequential mode, and DVD-RW in Restricted Overwrite mode - if blocks is less than 65264 blocks, for the first track only, the device will automatically pad the track to a size of 65264 blocks.
On DVD-RW in Restricted Overwrite mode - if Required Space > Formatted Space, then the last formatted session will be expanded by (Required Space - Formatted Space) blocks, where Required Space = (NewSessionStartAddress + blocks), and Formatted Space = (MediaCapacity - MediaFreeSpace).
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
void UnlockOutputBuffer | ( | Int32 | blocks | ) |
Unlocks the write buffer and writes the data from the buffer to the disc.
blocks | Number of blocks actually written to the buffer1 and buffer2 returned by the LockOutputBuffer method. It should not exceed the number of blocks requested with the LockOutputBuffer method. |
ObjectDisposedException | The Device object was already disposed. |
void UnlockOutputBufferEx | ( | Int32 | blocks, |
Int32 | discAddress | ||
) |
Unlocks the write buffer and writes the data from the buffer to the disc.
WARNING. USE WITH CAUTION:
Usage of this method requires thorough understanding of DVD physical format and specifications. Improper use may result in errors during writing or even data loss on DVD+RW/-RW media.
blocks | Number of blocks actually written to the buffer1 and buffer2 returned by the LockOutputBuffer method. It should not exceed the number of blocks requested with the LockOutputBuffer method. |
discAddress | The address to which the block of data should be written. This parameter is ignored for CD-R and CD-RW media. For CD-R and CD-RW media the engine always manages the disc addresses automatically. |
ObjectDisposedException | The Device object was already disposed. |
bool WriteData | ( | Int32 | startLba, |
byte[] | buffer, | ||
Int32 | blocks, | ||
Int32 | blockSize | ||
) |
The WriteData method writes data to a CD, DVD or BD starting at the logical block address indicated by the startLba parameter.
startLba | The logical block address at which the writing should start |
buffer | Pointer to a buffer that contains the data to be written. |
blocks | The number of blocks that should be written. |
blockSize | The size of the data block. |
false - Failure.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Returns a BDFeatures object describing the Blu-ray Disc capabilities of the device.
|
getset |
Indicates whether the device should do automatic verify-after-write cycle while writing data to BD media.
The default value is false. Valid only for BD-R and BD-RE media. Setting this property has no effect if the media in the device is not Blu-ray Disc.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the background format progress as a percentage.
If a background format is not running the property returns 0.0. This property returns 0.0 for DVD-RW media.
ObjectDisposedException | The Device object was already disposed. |
Gets the background format status of the mounted disc.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Returns a CDFeatures object describing the CD capabilities of the device.
|
get |
Gets the device description as it is set by its manufacturer.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the device drive letter.
ObjectDisposedException | The Device object was already disposed. |
Returns a DVDFeatures object describing the DVD capabilities of the device.
|
getset |
Indicates whether the device should do automatic verify-after-write cycle while writing data to DVD media.
The default value is false. Valid only for DVD-RAM media. This property has no effect if the media in the device is not a DVD-RAM disc.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets/sets a percentage showing the progress of an erase operation started with the Device.Erase method.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Returns information about the last error that occurred while using the Device object.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets/sets a percentage showing the progress of a format operation started with the Device.Format method.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the operating system device handle.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the capacity of the device internal cache buffer.
The internal cache is a memory cache built in the CD-ROM device.
Most of the modern devices use from 1 to 4 MB of RAM for cache.
|
get |
Gets the number of bytes used in the device internal cache.
The internal cache is a memory cache built in the CD-ROM device. Most of the modern devices use from 1 to 4 MB of RAM for cache. The InternalCacheUsedSpace property should be used only during the burning process.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the maximum supported read speed in Kbytes/s.
The value of this property depends on the media that is in the device.
To get the speed relative to 1x divide the result to Speed1xKB.CD, Speed1xKB.DVD, or Speed1xKB.BD.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the maximum supported write speed in Kbytes/s.
The value of this property depends on the media that is in the device.
To get the speed relative to 1x divide the result to Speed1xKB.CD, Speed1xKB.DVD, or Speed1xKB.BD.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the block capacity of the media inserted in the device.
The actual byte capacity depends on the block size that will be used during the burning. Different media capacity may be reported than the full size of the disc when the disc in the device is complete (closed).
To determine whether the disc has free space available for writing use the MediaFreeSpace property.
NOTE: If the media is unformatted BD-RE and DVD+RW, this method returns the blank disc capacity.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the numbers of blocks that can be added to the disc in the device before an additional add will cause a failure for lack of space.
NOTE: For formatted DVD+RW and BD-RE media all disc space is reported as free (available) regardless of what is recorded on the disc. That is because once formatted the DVD+RW and BD-RE discs become unrestricted-overwrite random-writable media.
For DVD-RW in Restricted Overwrite mode (a.k.a. DVD-RW RO) the reported value is the number of blocks that have not been formatted. If the disc is fully formatted DVD-RW the reported free space is 0. However, the disc can still be written to.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates whether the media in the device is BD-R or BD-RE.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates that the media in the device is blank.
Formatted DVD-RAM, DVD+RW, and Restricted Overwrite DVD-RW are not blank.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates whether the media in the device is CD-ROM, CD-R or CD-RW.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates whether the medium in the device is DVD-ROM, DVD-RAM, DVD-R/RW or DVD+R/RW.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates whether the media in the device is formatted.
NOTES:
DVD-RW for Restricted Overwrite: returns true only when the DVD-RW disc is fully formatted.
DVD+RW: returns true only when the DVD+RW disc is fully formatted.
Retuns true if the media in the device is a fully formatted disc.
Returns false if the media in the device is blank unformatted disc, or the media is partially formatted or a background format is currently pending.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates whether the media in the device is re-writable.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Returns the layer 0 (L0) capacity, in blocks, of DVD-R DL and DVD+R DL media.
Returns 0 for all other media types.
ObjectDisposedException | The Device object was already disposed. |
Gets the type of the media that is currently inserted in the device.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Indicates whether there is medium inserted in the device.
ObjectDisposedException | The Device object was already disposed. |
|
getset |
Gets/Sets the start address of the new disc session.
NOTES:
This property should be set for random writable media like DVD+RW where all the space on the media is always available for writing. This property should be set before calling the StartDVDSession method.
If the last session is open (incomplete) this property returns the start address of the incomplete session.
This property should be used with random writable media like formatted DVD+RW, formatted DVD-RW or DVD-RAM, and formatted BD-RE media. For all other media types the engine determines and uses the correct start address internally.
For DVD+RW, DVD-RAM and BD-RE the calling application should set the start address because there is no other way to know what part of the media is written and what part is available.
On DVD+RW, DVD-RW RO, DVD-RAM and BD-RE the disc space is managed on a higher level by the file system used for the DVD disc, such as UDF, Joliet or ISO.
DVD special cases:
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the start address of the next disc track.
Using this property makes sense only when there is some free space on the disc and when the last session on the disc is not complete (has been left open).
To check if there is any free space on the disc use the MediaFreeSpace property. You can use the ReadDiscInfo method to see if the last session on the disk is incomplete.
If the last track in the last session is open (incomplete) this property returns the start address of the last incomplete track + the number of sectors recorded from the incomplete track.
DVD special cases:
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the product id (the model) of the device as it is set by its manufacturer.
ObjectDisposedException | The Device object was already disposed. |
|
getset |
Gets/Sets the read speed in Kbytes/s.
1 Kbyte = 1000 bytes.
To get the speed relative to 1x divide the result to Speed1xKB.CD, Speed1xKB.DVD, or Speed1xKB.BD.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the revision (the version) of the device's firmware as it is set by its manufacturer.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the SCSI bus address of the device as string in the form of (Host Adapter Number:Target ID:LUN)
Host Adapter Number - This field specifies which installed host adapter the request is intended for. Host adapter numbers are assigned by the SCSI manager layer, beginning with 0.
Target ID - This field indicates the SCSI ID of the target device.
LUN - This field indicates the Logical Unit Number (LUN) of the device
|
getset |
Indicates whether the device should use stream recording or not.
The default value is false. Valid only for BD-R and BD-RE media. Setting this property has no effect if the media in the device is not Blu-ray Disc.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Returns the system path that identifies the device.
|
get |
Indicates whether the device is ready.
Returns DeviceError.Success if the device is ready, or a status code indicating the device condition. The status codes are defined in the DeviceError enumeration.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the device vendor name as set by the manufacturer.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the vendor specific information of the device as it is set by its manufacturer.
|
getset |
Gets/Sets the write speed in Kbytes/s.
The speed in Kbytes is the x speed (1x, 2x ...) multiplied by Speed1xKB.CD, Speed1xKB.DVD, or Speed1xKB.BD. 1 Kbyte = 1000 bytes.
To get a list of all the write speeds supported by a device use the Device.GetWriteSpeeds method.
ObjectDisposedException | The Device object was already disposed. |
|
get |
Gets the actual write transfer rate (write speed) as measured by PrimoBurner.
Teh rate is in in KB/s (kilobytes/sec).
To calculate the actual write speed divide the result to the rates defined in the Speed1xKB enumeration.
ObjectDisposedException | The Device object was already disposed. |
EventHandler<DeviceContinueEventArgs> OnContinueRead |
Raised to check if a long read operation should continue.
EventHandler<DeviceEraseEventArgs> OnErase |
Raised to report the progress of a disc blanking operation started with the Erase method.
The event handler receives an argument of type DeviceEraseEventArgs containing data related to this event.
EventHandler<DeviceFormatEventArgs> OnFormat |
Raised to report the progress of a format operation started with the Format method.
The event handler receives an argument of type DeviceFormatEventArgs containing data related to this event.
EventHandler<DeviceReadEventArgs> OnRead |
Raised to report the progress of long read operations.
The event handler receives an argument of type DeviceReadEventArgs containing data related to this event.
EventHandler<DeviceWriteLeadInEventArgs> OnWriteLeadIn |
Raised to report the progress during the recording of the lead-in area of a CD session.
when RAW CD writng is used.
NOTE: The lead-in area is written directly by PrimoBurner only when all of the following conditions are met:
The event handler receives an argument of type DeviceWriteLeadInEventArgs containing data related to this event.
EventHandler<DeviceWriteLeadOutEventArgs> OnWriteLeadOut |
Raised to report the progress during the recording of the lead-out area of a CD session when RAW CD writng is used.
NOTE: The lead-out area is written directly by PrimoBurner only when all of the following conditions are met:
The event handler receives an argument of type DeviceWriteLeadOutEventArgs containing data related to this event.