PrimoBurner for .NET  5.0
CD, DVD and Blu-ray Software Development Kit
Loading...
Searching...
No Matches
CDSector Class Reference

The CDSector interface provides methods for encoding RAW CD sectors(blocks) from user data. More...

Static Public Member Functions

static bool EncodeRawCDBlock (TrackType tt, Int32 lba, bool scramble, byte[] outputRawData, byte[] inputData)
 The EncodeRawCDBlock method encodes a raw 2352 byte CD-ROM block from user data.
 
static Int32 GetTrackBlockSize (TrackType tt)
 The GetTrackBlockSize method returns the block size corresponding to a given track type.
 
static TrackType GetTrackType (byte[] blockData)
 The GetTrackType method retrieves the type of a block of data.
 
static TrackType GetTrackType (byte[] blockData, Int32 blockSize)
 The GetTrackType method retrieves the type of a block of data.
 

Detailed Description

The CDSector interface provides methods for encoding RAW CD sectors(blocks) from user data.

It is useful for creating raw CD images for CD/DDP mastering equipment.

Member Function Documentation

◆ EncodeRawCDBlock()

static bool EncodeRawCDBlock ( TrackType  tt,
Int32  lba,
bool  scramble,
byte[]  outputRawData,
byte[]  inputData 
)
static

The EncodeRawCDBlock method encodes a raw 2352 byte CD-ROM block from user data.

Parameters
ttThe track type for which a raw block should be encoded.
lbaThe logical block address at which the block is supposed to be recorded
scrambleIndicates whether the user data in the block should be scrambled according to the CD-ROM specification.
outputRawDataA buffer to receive the encoded raw data. The buffer size should be Cdda (2352) bytes or bigger.
inputDataA buffer with the user data that should be encoded.
In the case of TrackType.Mode2Form1, TrackType.Mode2Form2,
TrackType.Mode2Form1Xa or TrackType.Mode2Mixed
the calling application should also supply the correct sub-header information at the beginning of the input data buffer.

This method calculates the required ECC/EDC and CRC checksums for a given user data.
The result is a raw block that can be used to burn data tracks using the RawDao2352 write method. This method should not be used with audio data.

Returns
If successful returns true, otherwise returns false.

◆ GetTrackBlockSize()

static Int32 GetTrackBlockSize ( TrackType  tt)
static

The GetTrackBlockSize method returns the block size corresponding to a given track type.

Use this method to determine the correct block size that should be used to record a track of a given type.

Parameters
ttA value from the TrackType enumeration
Returns
Returns the number of bytes that are included in a single block of teh specified track type

◆ GetTrackType() [1/2]

static TrackType GetTrackType ( byte[]  blockData)
static

The GetTrackType method retrieves the type of a block of data.

Parameters
blockDataA buffer that contains the block data. The size of the data buffer should be CdRaw (2352)
Returns
Returns the track type that corresponds to the data in the blockData buffer.

References CDSector.GetTrackType().

Referenced by CDSector.GetTrackType().

◆ GetTrackType() [2/2]

static TrackType GetTrackType ( byte[]  blockData,
Int32  blockSize 
)
static

The GetTrackType method retrieves the type of a block of data.

Parameters
blockDataA buffer that contains the block data.
blockSizeSize of the data buffer. Should not be 0 or les, nor bigger than the size of the blockData array
Returns
Returns the track type that corresponds to the data in the blockData buffer. If the track type cannot be determined the method returns PrimoSoftware.Burner.TrackType.Error