Basically I run a network of computers and need to know what region code the drives of the various computers are set to. I don’t need to change the region, but I have no idea how to determine the region without going to each computer individually and sticking in a disc. I tried using Apple’s cocoa DVD playback framework, but that requires that a disk be inserted into the drive, which sort of defeats the purpose.
So are there any APIs that I can use to determine the region code on a Mac Pro’s DVD drive without requiring that a disc be inserted? I am willing to code in pretty much any language.
Thanks
I found some utilities that are capable of dealing with DVD region settings on OS X: DVD Info X, and Region X. DVD Info X will display the region code of your drive without requiring to have a DVD inserted.
Region X is more interesting because although it doesn’t directly serve your purpose, its source is available. Looking at it I found that the
ScanAllmethod inRegion X.mis what you need. More specifically, the interesting case is the one where the disk name isn’t found (because there’s no disk mounted) and a SCSI command is used to find out the DVD drive’s properties (theprintfcalls are my addition):I ran this on my Macbook Pro and the result was as expected.
Obviously you’ll need to massage it in order to isolate that part into something you can use, but I think that this code will be a useful starting point.