PrimoBurner(tm) for C++  4.6
CD, DVD and Blu-ray Software Development Kit
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
CDSector Class Referenceabstract

The CDSector interface provides methods that allow encoding of RAW CD blocks from user data. More...

#include <PrimoBurnerAPI.h>

Inherits Reference.

Public Member Functions

virtual bool_t encodeRawCDBlock (TrackType::Enum tt, int32_t lba, bool_t scramble, uint8_t *outBuffer, uint8_t *inBuffer, uint32_t inBufferSize)=0
 Encodes a raw 2352 byte CD-ROM block from user data. More...
 
virtual int32_t getTrackBlockSize (TrackType::Enum tt)=0
 The getTrackBlockSize returns the block size corresponding to a given track type. More...
 
virtual TrackType::Enum getTrackType (uint8_t *blockData, int blockSize=BlockSize::CDRaw)=0
 The getTrackType method retrieves the type of a block of data. More...
 
- Public Member Functions inherited from Reference
virtual int32_t release () const =0
 Releases the instance. More...
 
virtual int32_t retain () const =0
 Retains the instance. More...
 
virtual int32_t retainCount () const =0
 Returns the current reference count. More...
 

Detailed Description

The CDSector interface provides methods that allow encoding of RAW CD blocks from user data.

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

Member Function Documentation

virtual bool_t encodeRawCDBlock ( TrackType::Enum  tt,
int32_t  lba,
bool_t  scramble,
uint8_t *  outBuffer,
uint8_t *  inBuffer,
uint32_t  inBufferSize 
)
pure virtual

Encodes a raw 2352 byte CD-ROM block from user data.

This method calculates the required ECC/EDC and CRC checksums for a given user data. The result is a raw block that can be burned with WriteMethod::RawDao2352. This method should not be used with audio data.

Parameters
tt[in] The track type for which a raw block should be encoded.
lba[in] the logical block address at which the block is supposed to be recorded
scramble[in] Indicates whether the user data in the block should be scrambled according to the CD-ROM specification.
outBuffer[out] A buffer to receive the encoded raw data. The buffer size should be BlockSize::CDDA (2352) bytes or bigger.
inBuffer[in] A buffer with the user data that should be encoded. In case of TrackType::Mode2Form1, TrackType::Mode2Form2, TrackType::Mode2Form1XA or TrackType::Mode2Mixed the calling application should also supply the correct sub-header information as part of the data.
inBufferSize[in] The size of the user data in inBuffer buffer. The size should be consistent with the size of the user data corresponding to the track type supplied.

See Mode2FormedSubheader for more details about Mode 2 Formed Sector sub-header structure. See BlockSize::CDRomMode2Form1, BlockSize::CDRomMode2Form2, BlockSize::CDRomMode2Form1XA for explanation of the structure of a CD-ROM Mode2 block.

See Also
Mode2FormedSubheader
BlockSize::CDRomMode2Form1
BlockSize::CDRomMode2Form2
BlockSize::CDRomMode2Form1XA
Returns
1 Success
0 Failed
virtual int32_t getTrackBlockSize ( TrackType::Enum  tt)
pure virtual

The getTrackBlockSize 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
tttrack type - a value from the TrackType::Enum enumeration.
Returns
The block size corresponding to specified track type.
0 if the block size cannot be determined for the specified track type.
virtual TrackType::Enum getTrackType ( uint8_t *  blockData,
int  blockSize = BlockSize::CDRaw 
)
pure virtual

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

Parameters
blockData[in] pointer to a buffer that contains the block data.
blockSize[in] the size of the data buffer.
Returns
the detected block type. The block should be of the same type as the track from which the block was read except for mixed mode tracks which could have blocks of different type.