user356126
user356126

Reputation: 105

Read data from DVD with maximum speed

I'm trying to make a disk dump program (like dd) with C language on Windows. The program is almost finished, but there is one problem: reading data from DVD is very slow. According to the specification, the DVD drive of my PC supports up to 8x reading rate, but my program reads about 5MB/sec (about 4x). I want to read data with maximum speed.

The algorithm of my program is simple: using win32api CreateFile and ReadFile, like

src=CreateFileA("\\\\.\\E:",GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
ReadFile(src,buf,buffer_size,&read_ret,NULL);

The buffer size can be set to 20-100MB. I tried to set speed with DeviceIoControl, like

cdromSetSpeed.RequestType = CdromSetSpeed;
cdromSetSpeed.ReadSpeed = 0xFFFF; // max speed
cdromSetSpeed.WriteSpeed = 0xFFFF; // max speed
cdromSetSpeed.RotationControl = CdromDefaultRotation;
DeviceIoControl(src,IOCTL_CDROM_SET_SPEED,&cdromSetSpeed,sizeof(cdromSetSpeed),NULL,0,NULL,NULL);

but it had no effect.

Please tell me if there is any way to read data from DVD with maximum speed.

Upvotes: 0

Views: 378

Answers (0)

Related Questions