#1 Burning Software

It is currently Fri Dec 20, 2024 3:49 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Calculating free space in RW disc
PostPosted: Thu Apr 27, 2006 6:37 am 
Offline

Joined: Tue Mar 14, 2006 10:18 am
Posts: 15
Hi

I am trying to calculate free space in RW media. first I have erased the disc , then i am trying to calculate free space, but still I am getting 0 for free space.

I am doing as follows

1) StarBurn_CdvdBurnerGrabber_GetTOCInformation is used to get toc information
if toc informtion is there then calculate nooftracks
*numberOfTracks = tocInformation.m__UCHAR__NumberOfTracks;
2)StarBurn_CdvdBurnerGrabber_GetTrackInformation it return false
Exception CStarBurn_ScsiTransportSPTI::ExecuteCDB(),
I am not sure why StarBurn_CdvdBurnerGrabber_GetTrackInformation fails for RW media, however it works fine for Blank R disc

3)As per sample if tocread if true then following code is executed
if ( tocRead )
{

LARGE_INTEGER trackSpace;
trackSpace.QuadPart = 0;

for (int tocIndex = 0; tocIndex < tocInformation.m__UCHAR__NumberOfTracks; tocIndex ++ )
{
TOC_ENTRY tocEntry = tocInformation.m__TOC_ENTRY[tocIndex];
trackSpace.QuadPart = (LONGLONG)(tocEntry.m__LONG__EndingLBA - tocEntry.m__LONG__StartingLBA) ;
trackSpace.QuadPart *= (LONGLONG) tocEntry.m__ULONG__LBSizeInUCHARs;
usedSpace->QuadPart +=trackSpace.QuadPart;
freeSpace->QuadPart = 0;
}

}

but it doesnot show right value for freespace as it is made to 0 in last line.
Can I get some idea how to calculate free space.???

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 9:46 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
That's totally wrong approach. Don't try to re-invent the wheel :) Just use GetTrackInformation passing TRACK_NUMBER_INVISIBLE and you'd get number of free logical block left on the media.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 9:55 am 
Offline

Joined: Tue Mar 14, 2006 10:18 am
Posts: 15
I have written in above mail
I am not sure why StarBurn_CdvdBurnerGrabber_GetTrackInformation fails for RW media, however it works fine for Blank R disc

I am using erased disc and StarBurn_CdvdBurnerGrabber_GetTrackInformation is failing for that


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 10:04 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
I've replied in the other thread about doing full erase for RW disc. Your hand-crafted method would not work.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 10:41 am 
Offline

Joined: Tue Mar 14, 2006 10:18 am
Posts: 15
Thanks ..Issue got resolved after doing full erase.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 11:34 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Good :)

ac wrote:
Thanks ..Issue got resolved after doing full erase.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group