---
name: "perlcdio"
section: "3pm"
platform: "linux"
package: "libdevice-cdio-perl"
version: "2.0.0-2+b5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/perlcdio"
---

# perlcdio(3pm)

lower-level wrapper to libcdio, the CD Input and Control library

## NAME

perlcdio - lower-level wrapper to libcdio, the CD Input and Control library

## SYNOPSIS

This is fairly straight-forward wrapper around the C library libcdio. Although this is perfectly usable on its own, it is expected that the Object-Oriented interface Device::Cdio is what most people will want to use.

There are various constants that are defined here.

## DESCRIPTION

Encapsulation is done in two parts. The lower-level Perl interface is called perlcdio (this file) and is generated via SWIG.

## CONSTANTS

### Driver ID's

- DRIVER\_UNKNOWN

  Use when you don't know what kind of driver and you don't care if it is an CD image driver or a real CD-ROM driver. See also DRIVER\_DEVICE which doesn't include image drivers.

- DRIVER\_AIX

  Driver for IBM's AIX.

- DRIVER\_BSDI

  Driver for BSDI.

- DRIVER\_FREEBSD

  Driver for Free BSD

- DRIVER\_LINUX

  Driver for GNU/LINUX

- DRIVER\_SOLARIS

  Driver for Solaris

- DRIVER\_OSX

  Driver for Apple's OS X.

- DRIVER\_WIN32

  Driver for Microsoft Windows

- DRIVER\_CDRDAO

  Image Driver for cdrdao

- DRIVER\_BINCUE

  Image driver for CDRWin BIN/CUE

- DRIVER\_NRG

  Image driver for Nero NRG

- DRIVER\_DEVICE

  Use when you don't know what kind of driver but the driver must be a real CD-ROM driver. See also DRIVER\_UNKNOWN which includes image drivers.

### Driver Return codes

May driver operations return a status code.

- DRIVER\_OP\_SUCCESS

  Driver operation was successful

- DRIVER\_OP\_ERROR

  Driver operation had an error of some sort

- DRIVER\_OP\_UNSUPPORTED

  Operation is not supported for this driver. For example ejecting a CD from an image driver.

- DRIVER\_OP\_UNINIT

  Source is not initialized for this operation.

- DRIVER\_OP\_NOT\_PERMITTED

  Operation is not permitted

- DRIVER\_OP\_BAD\_PARAMETER

  An invalid parameter was passed to the routine

- DRIVER\_OP\_BAD\_POINTER

  A pointer somehow got corrupted.

- DRIVER\_OP\_NO\_DRIVER

  No driver has been set.

### Device Capabilities

*Miscellaneous*

- DRIVE\_CAP\_ERROR

  - DRIVE\_CAP\_UNKNOWN

  - DRIVE\_CAP\_MISC\_CLOSE\_TRAY

  - DRIVE\_CAP\_MISC\_EJECT

  - DRIVE\_CAP\_MISC\_LOCK

  - DRIVE\_CAP\_MISC\_SELECT\_SPEED

  - DRIVE\_CAP\_MISC\_SELECT\_DISC

  - DRIVE\_CAP\_MISC\_MULTI\_SESSION

  - DRIVE\_CAP\_MISC\_MEDIA\_CHANGED

  - DRIVE\_CAP\_MISC\_RESET

  - DRIVE\_CAP\_MISC\_FILE

  *Read Capabilities*

- DRIVE\_CAP\_READ\_AUDIO

  - DRIVE\_CAP\_READ\_CD\_DA

  - DRIVE\_CAP\_READ\_CD\_G

  - DRIVE\_CAP\_READ\_CD\_R

  - DRIVE\_CAP\_READ\_CD\_RW

  - DRIVE\_CAP\_READ\_DVD\_R

  - DRIVE\_CAP\_READ\_DVD\_PR

  - DRIVE\_CAP\_READ\_DVD\_RAM

  - DRIVE\_CAP\_READ\_DVD\_ROM

  - DRIVE\_CAP\_READ\_DVD\_RW

  - DRIVE\_CAP\_READ\_DVD\_RPW

  - DRIVE\_CAP\_READ\_C2\_ERRS

  - DRIVE\_CAP\_READ\_MODE2\_FORM1

  - DRIVE\_CAP\_READ\_MODE2\_FORM2

  - DRIVE\_CAP\_READ\_MCN

  - DRIVE\_CAP\_READ\_ISRC

  ### Writing masks

- DRIVE\_CAP\_WRITE\_CD\_R

  - DRIVE\_CAP\_WRITE\_CD\_RW

  - DRIVE\_CAP\_WRITE\_DVD\_R

  - DRIVE\_CAP\_WRITE\_DVD\_PR

  - DRIVE\_CAP\_WRITE\_DVD\_RAM

  - DRIVE\_CAP\_WRITE\_DVD\_RW

  - DRIVE\_CAP\_WRITE\_DVD\_RPW

  - DRIVE\_CAP\_WRITE\_MT\_RAINIER

  - DRIVE\_CAP\_WRITE\_BURN\_PROOF

  *Derived Capabilities*

- DRIVE\_CAP\_WRITE\_CD

  Has some sort of CD writer ability

- DRIVE\_CAP\_WRITE\_DVD

  Has some sort of DVD writer ability

- DRIVE\_CAP\_WRITE

  Has some sort of writer ability

### Filesystem type constants

These constants are used in getting drive capabilities:

- FS\_AUDIO

  audio only - not really a filesystem

- FS\_HIGH\_SIERRA

  High-Sierra Filesystem

- FS\_ISO\_9660

  ISO-9660 filesystem

- FS\_INTERACTIVE

  - FS\_HFS

  file system used on the Macintosh system in MacOS 6 through MacOS 9 and deprecated in OSX

- FS\_UFS

  Generic Unix file system derived from the Berkeley fast file system.

- FS\_EXT2

  EXT2 was the GNU/Linux native filesystem for early kernels. Newer GNU/Linux OS's may use EXT3 which EXT2 with a journal.

- FS\_ISO\_HFS

  both HFS & ISO-9660 filesystem

- FS\_ISO\_9660\_INTERACTIVE

  both CD-RTOS and ISO filesystem

- FS\_3DO

  The 3DO is, technically, a set of specifications created by the 3DO company.  These specs are for making a 3DO Interactive Multiplayer which uses a CD-player. Panasonic in the early 90's was the first company to manufacture and market a 3DO player.

- FS\_XISO

  Microsoft X-BOX CD

- FS\_UDFX

  - FS\_UDF

  - FS\_ISO\_UDF

  - FS\_ANAL\_XA

  eXtended Architecture format

- FS\_ANAL\_MULTISESSION

  CD has multisesion

- FS\_ANAL\_PHOTO\_CD

  Is a Kodak Photo CD

- FS\_ANAL\_HIDDEN\_TRACK

  Hidden track at the beginning the CD

- FS\_ANAL\_CDTV

  - FS\_ANAL\_BOOTABLE

  CD is bootable

- FS\_ANAL\_VIDEOCD

  VCD 1.1

- FS\_ANAL\_ROCKRIDGE

  Has Rock Ridge Extensions to ISO 9660

- FS\_ANAL\_JOLIET

  Microsoft Joliet extensions to ISO 9660

- FS\_ANAL\_SVCD

  Super VCD or Choiji Video CD

- FS\_ANAL\_CVD

  Choiji Video CD

- FS\_ANAL\_XISO

  XBOX CD determined by some analysis

- FS\_MATCH\_ALL

  bitmask which can  be used to specify matching any sort of CD

### Sector size constants

- CD\_FRAMESIZE

  - CD\_FRAMESIZE\_RAW

  Size of a Philip Red book CD-DA block. It is also the maximum CD sector size possible: 2352 bytes.

- ISO\_BLOCKSIZE

  Size of an ISO 9660 block. Also the size of the data portion in CD data reads: 2048 bytes.

- M2F2\_SECTOR\_SIZE

  Mode 2 Form 2 Data size: 2328 bytes.

- M2RAW\_SECTOR\_SIZE

  Mod1 Form 1 Data size: 2336 bytes.

### Reading Modes

- READ\_MODE\_AUDIO

  audio mode (CD-DA) read. Blocksize is a multiple of `$perlcdio::CD_FRAMESIZE_RAW` (2352) bytes.

- READ\_MODE\_M1F1

  Mode 1 Form 1 read. Blocksize is a multiple of `$perlcdio::CD_FRAMESIZE` (2048) bytes.

- READ\_MODE\_M1F2

  Mode 1 Form 2 read. Blocksize is a multiple of `$perlcdio::M2RAW_SECTIOR_SIZE` (2336) bytes.

- READ\_MODE\_M2F1

  Mode 2 Form 1 read. Blocksize is a multiple of `$perlcdio::CD_FRAMESIZE` (2048) bytes.

- READ\_MODE\_M2F2

  Mode 2 Form 1 read. Blocksize is a multiple of (2328) bytes.

### Miscellaneous

- VERSION\_NUM

  libcdio version that is getting used

- INVALID\_LBA

  Canonical value used for an invalid LBA.

- INVALID\_LSN

  Canonical value used for an invalid LSN.

- INVALID\_TRACK

  Canonical value used for an invalid track number. (Valid range is 0 to 99.)

- LEADOUT\_TRACK

  Canonical value for the "leadout" or track just after the last track. So again this value is outside the range 0 to 99. The leadout track is often used to get the last LSN or LBA. The libcdio routines also allow the last actual track plus one as a synonym for the leadout track.

## METHODS

### cdio\_version

```
    perlcdio::cdio_version
```

Returns the libcdio version string Device::Cdio is currently linked with.

### this

This seems to be an artifact of SWIG.

## SEE ALSO

\<http://www.gnu.org/software/libcdio\> has documentation on libcdio including the a manual and the API via doxygen.

## AUTHORS

Rocky Bernstein `"<rocky at cpan.org>"`.

## COPYRIGHT

Copyright (C) 2006, 2008, 2011 Rocky Bernstein \<rocky@cpan.org\>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program.  If not, see \<http://www.gnu.org/licenses/\>.
