perlcdio(3pm)
β¨ NAME β¨
okay so welcome to perlcdio(3pm) π β this is the page for perlcdio, the lower-level wrapper to libcdio, aka the CD Input and Control library. yes bestie, we're talking about CDs, in this economy. iconic. πΏβ¨
π¦ SYNOPSIS π¦
ngl this is a pretty straight-forward wrapper around the C library libcdio. like, it does the thing, no drama.
And yes, it is perfectly usable on its own, but fr fr β the expected move is that the Object-Oriented interface Device::Cdio is what most people will actually want to use. that's the main character. this one is the vibes backstage. π
There are various constants that are defined here. many constants. a concerning amount, honestly. we'll get to them. π«Ά
πΈ DESCRIPTION πΈ
The encapsulation is done in two parts, lowkey a duo:
- The lower-level Perl interface is called
perlcdio(this file, hi, that's me π ) - and it is generated via SWIG.
periodt. that's the whole architecture. β¨
π CONSTANTS π
π Driver ID's π
DRIVER_UNKNOWNβ use this when you don't know what kind of driver it is and you don't care whether it's a CD image driver or a real CD-ROM driver. see alsoDRIVER_DEVICE, which does not include image drivers. so like, this one is the "idk and idc" option π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 forcdrdao.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 it is, but the driver has to be a real CD-ROM driver. see alsoDRIVER_UNKNOWN, which does include image drivers. so this one is the "idk but make it physical" option π
π Driver Return codes π
so, driver operations return a status code. here's the whole roster, no skips:
DRIVER_OP_SUCCESSβ the driver operation was successful. slay. πDRIVER_OP_ERRORβ the driver operation had an error of some sort. πDRIVER_OP_UNSUPPORTEDβ this operation is not supported for this driver. for example, ejecting a CD from an image driver. yeah, you can't eject a file bestie, it's not a real tray πDRIVER_OP_UNINITβ the source is not initialized for this operation.DRIVER_OP_NOT_PERMITTEDβ the operation is not permitted.DRIVER_OP_BAD_PARAMETERβ an invalid parameter got passed to the routine.DRIVER_OP_BAD_POINTERβ a pointer somehow got corrupted. π we don't talk about it.DRIVER_OP_NO_DRIVERβ no driver has been set.
π§ Device Capabilities π§
Miscellaneous
these ones literally just sit here with no little description, so here they are, name for name, no commentary invented, no cap:
DRIVE_CAP_ERRORDRIVE_CAP_UNKNOWNDRIVE_CAP_MISC_CLOSE_TRAYDRIVE_CAP_MISC_EJECTDRIVE_CAP_MISC_LOCKDRIVE_CAP_MISC_SELECT_SPEEDDRIVE_CAP_MISC_SELECT_DISCDRIVE_CAP_MISC_MULTI_SESSIONDRIVE_CAP_MISC_MEDIA_CHANGEDDRIVE_CAP_MISC_RESETDRIVE_CAP_MISC_FILE
Read Capabilities
same situation β no one-liners given, so no spoilers from me:
DRIVE_CAP_READ_AUDIODRIVE_CAP_READ_CD_DADRIVE_CAP_READ_CD_GDRIVE_CAP_READ_CD_RDRIVE_CAP_READ_CD_RWDRIVE_CAP_READ_DVD_RDRIVE_CAP_READ_DVD_PRDRIVE_CAP_READ_DVD_RAMDRIVE_CAP_READ_DVD_ROMDRIVE_CAP_READ_DVD_RWDRIVE_CAP_READ_DVD_RPWDRIVE_CAP_READ_C2_ERRSDRIVE_CAP_READ_MODE2_FORM1DRIVE_CAP_READ_MODE2_FORM2DRIVE_CAP_READ_MCNDRIVE_CAP_READ_ISRC
π₯ Writing masks π₯
DRIVE_CAP_WRITE_CD_RDRIVE_CAP_WRITE_CD_RWDRIVE_CAP_WRITE_DVD_RDRIVE_CAP_WRITE_DVD_PRDRIVE_CAP_WRITE_DVD_RAMDRIVE_CAP_WRITE_DVD_RWDRIVE_CAP_WRITE_DVD_RPWDRIVE_CAP_WRITE_MT_RAINIERDRIVE_CAP_WRITE_BURN_PROOF
Derived Capabilities
these ones do get a vibe check, and they all passed:
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. like, some. any. writing happens. βοΈ
π Filesystem type constants π
so these constants get used when you're getting drive capabilities:
FS_AUDIOβ audio only. not really a filesystem, it's just out here living its truth π§FS_HIGH_SIERRAβ High-Sierra Filesystem.FS_ISO_9660β ISO-9660 filesystem.FS_INTERACTIVEFS_HFSβ the file system used on the Macintosh system in MacOS 6 through MacOS 9, and deprecated in OSX. rip old mac filesystem, you were so real π«‘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 is EXT2 with a journal.FS_ISO_HFSβ both HFS & ISO-9660 filesystem. two filesystems, one CD β¨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. history lesson, bestie, take notes πFS_XISOβ Microsoft X-BOX CD.FS_UDFXFS_UDFFS_ISO_UDFFS_ANAL_XAβ eXtended Architecture format.FS_ANAL_MULTISESSIONβ the CD has multisesion.FS_ANAL_PHOTO_CDβ is a Kodak Photo CD. πΈFS_ANAL_HIDDEN_TRACKβ hidden track at the beginning the CD. sneaky little thing πΆβπ«οΈFS_ANAL_CDTVFS_ANAL_BOOTABLEβ the 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β a bitmask which can be used to specify matching any sort of CD. the "i'll take one of everything" of bitmasks π
β Sector size constants β
CD_FRAMESIZECD_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. (yes it saysSECTIOR_SIZEin there, that is genuinely the spelling, I am not touching it, hand on heart π€)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β the 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 the 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 that Device::Cdio is currently linked with. cute lil version check π
this
This seems to be an artifact of SWIG. that's it. that's the whole entry. SWIG left it here, we respect it π
π SEE ALSO π
<http://www.gnu.org/software/libcdio> β it has documentation on libcdio, including a manual and the API via doxygen. go read it, iykyk πβ¨
π«Ά 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/>.
okay that's the legal part, which means it's the serious part β no jokes needed, just respect the license bestie, fr fr π
aaaand that's the whole page!! ty for coming to my ted talk, go read Device::Cdio if you actually want the Object-Oriented experience, mwah π
this was perl v5.42.3, dated 2026-08-19, and it lives at perlcdio(3pm) β stay iconic, bye π¦β¨π
π¦ where this page comes from
- ubuntu stonking: libdevice-cdio-perl 2.0.0-2build8 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms