SCSI command 0xAD (GPCMD_READ_DVD_STRUCTURE) with the eighth byte of the command set to 0x00 (DVD_STRUCT_PHYSICAL) returns physical disc information for DVDs and blu-rays. On success, the command returns status 0, and for ordinary CDs, the command returns the error status 0x02 (SAM_STAT_CHECK_CONDITION). The format of the data returned is different for blu-rays than for DVDs, and the second byte of the command indicates whether to return DVD information or blu-ray information. (My LG WH16NS40 drive actually ignores the second byte when there is a DVD in the drive, but it returns SAM_STAT_CHECK_CONDITION when there is a blu-ray in the drive and the second byte is not 0x01.) Windows does not distinguish between DVDs and blu-rays in IOCTL_DISK_GET_MEDIA_TYPES, so if the SCSI command succeeds for either disc type, report FILE_DEVICE_DVD.
More specific media information is still not implemented.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57790
-- v3: ntdll: Detect the optical disc type on Linux using a SCSI command.