Hello,
I have to write a program for uni and part of it includes accessing the dvd drive to see whether a disc is a dvd-rom, dvd-r, dvd+r.
Could anyone give me some pointers to libraries which I should be looking into using?
Thanks for any replies.
This is a discussion on Program which accesses DVD drive within the C Programming forums, part of the General Programming Boards category; Hello, I have to write a program for uni and part of it includes accessing the dvd drive to see ...
Hello,
I have to write a program for uni and part of it includes accessing the dvd drive to see whether a disc is a dvd-rom, dvd-r, dvd+r.
Could anyone give me some pointers to libraries which I should be looking into using?
Thanks for any replies.
If you are on linux, why not simply see if /dev/dvd exists?
Last edited by sphynxter; 01-29-2009 at 06:13 PM.
Translation: for what operating system? If it's linux, you have your answer. Otherwise...
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
Windows but I don't mind doing it on linux if its easier.
Cheers
I'm not entirely sure that is "easy" to do in either. I expect that DVD burners (and there are some for Linux that you can probably get the source-code for) will know how to read that sort of information - but it's not something that for example Windows or Linux has a specific interface to read - instead it's a case of a specific IOCTL call to the driver that is likely to retrieve that sort of information.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
It's fairly easy on windows. You can use MCI specifically I found http://msdn.microsoft.com/en-us/libr...77(VS.85).aspx on MSDN.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
winioctl.h seems to be what I'm after for windows although I can't find anything about it in any reference librarys or "the c programming languange" book by Brain Kernigham and Dennis Ritchie.
I really think you'll need MMC6R02A.PDF from t10.org. The document is halfway down the page. This provides detailed information on the multi media command sets. Specifically, the READ DISC INFORMATION command. You'll also need the header files from the Windows DDK kit. You can download the whole DDK but you'll only need the header files since you should be doing this task from userland not the kernel.
You definitely won't find this info in the K&R book.
Bob gives good advice.
I'd like to explain that the reason K&R doesn't contain any information about this is that K&R wrote a book on the language of C - the C language in itself doesn't know anything about DVD's - in fact it is perfectly possible to build a C compiler on or for a machine that doesn't have the capabilty of connecting a DVD-drive.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
That cleared it up quite well. I've been looking into this further and I think if figured out how the whole process works bar one thing. If I send MMC commands which are defined as SCSI interface, will it work using an optical drive which is SATA connected.
I'm not sure as I read they are compatible however won't sata use different commands or something?
Thanks.