#1 Burning Software

It is currently Thu Dec 19, 2024 3:44 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Dvd Media Type and Disk space
PostPosted: Tue Mar 25, 2008 5:14 pm 
Offline

Joined: Thu Mar 13, 2008 4:39 pm
Posts: 3
Can anyone post code snippet for c# to calculate dvd available space for
Dvd+r, dvd+rw, dvd-r, dvd-rw, and dual layer dvd.
Ex in mb.

Also, can you tell me how get get media type. Is there an enum or something I can use to determine media type(ex dvd=r, dvr-r, etc).

Does the calculation differ on media type and brand

Thanks;
Steve


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 26, 2008 2:04 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 609
Hello

Steve

1) We have provided C# examples with our new component StarBurnX OCX which you can download from our link was removed

The StarBurnX component provides the DiscInfo object which keeps information about the media type and free space available on media.

!! We recommend to use the StarBurnX for .Net programming !!

Notify me please if functionality of StarBurnX does not cover all of functionality necessary for you.


2) If you prefer to use SDK directly you should use the SDK function StarBurn_CdvdBurnerGrabber_GetDiscFreeSpace which returns number of free logical blocks on the disc. To convert LB value into Mb you can use SDK constants MODE1_LB_SIZE_IN_UCHARS, MODE2_FORM2_LB_SIZE_IN_UCHARS, MODE2_FORM1_LB_SIZE_IN_UCHARS etc.

((LBSizeValue * LogicalBlockSize)/1024)/1024

where LogicalBlockSize = MODE1_LB_SIZE_IN_UCHARS (or MODE2_FORM1_LB_SIZE_IN_UCHARS etc.)


3) To get type of media you should use the SDK function StarBurn_CdvdBurnerGrabber_GetInsertedDiscType which returns DISC_TYPE enumeration value

Regards

Dmitry Bortsov


Top
 Profile  
 
 Post subject: Dvd free space base on media type
PostPosted: Wed Mar 26, 2008 6:06 pm 
Offline

Joined: Thu Mar 13, 2008 4:39 pm
Posts: 3
Does the calculation differ for discInformation.FreeLBs call based
on it s media type(dvd+r,dvd-r, etc). This is the code that I am using

StarBurn.CDiscInfo discInformation = device.GetDiscInfo();

long dvdSize = discInformation.FreeLBs;
dvdSize = dvdSize * 2048;

Thanks;
Steve


Top
 Profile  
 
 Post subject: Re: Dvd free space base on media type
PostPosted: Wed Mar 26, 2008 8:37 pm 
Offline

Joined: Fri Jan 11, 2008 6:13 am
Posts: 200
Location: BVI
For DVD and Blu-Ray and HD-DVD this is right. For CD (data burning mode) - also. For AudioCD & VideoCD you need to multiply not to 2048 (data sector size) but rather to 2352 (audio sector size) and 2324 (video sector size).

shommel wrote:
Does the calculation differ for discInformation.FreeLBs call based
on it s media type(dvd+r,dvd-r, etc). This is the code that I am using

StarBurn.CDiscInfo discInformation = device.GetDiscInfo();

long dvdSize = discInformation.FreeLBs;
dvdSize = dvdSize * 2048;

Thanks;
Steve


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 12:54 pm 
Offline

Joined: Fri Apr 04, 2008 12:51 pm
Posts: 17
Quote:
To convert LB value into Mb you can use SDK constants MODE1_LB_SIZE_IN_UCHARS, MODE2_FORM2_LB_SIZE_IN_UCHARS, MODE2_FORM1_LB_SIZE_IN_UCHARS etc.


But how can I knew what constant should I use?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 7:28 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
This is you who knows what exactly you want to burn - AudioCD, DataCD or VideoCD. We don't know :)

Calisto wrote:
Quote:
To convert LB value into Mb you can use SDK constants MODE1_LB_SIZE_IN_UCHARS, MODE2_FORM2_LB_SIZE_IN_UCHARS, MODE2_FORM1_LB_SIZE_IN_UCHARS etc.


But how can I knew what constant should I use?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 7:50 pm 
Offline

Joined: Fri Apr 04, 2008 12:51 pm
Posts: 17
Hmm... the second problem - can't found the StarBurn_CdvdBurnerGrabber_GetDiscFreeSpace function (using Delphi 2007).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 05, 2008 1:45 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
What version of the SDK are you actually running? Please check and drop us a line. We'll respond with the updated Pascal header.

Calisto wrote:
Hmm... the second problem - can't found the StarBurn_CdvdBurnerGrabber_GetDiscFreeSpace function (using Delphi 2007).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 05, 2008 12:32 pm 
Offline

Joined: Fri Apr 04, 2008 12:51 pm
Posts: 17
Actually, I have just downloaded the latest version from your site right now. So it is 7.2.20 (from 20 february).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 11:58 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Please drop us a message to support@rocketdivision.com and we'd issue you with updated Pascal header.

Calisto wrote:
Actually, I have just downloaded the latest version from your site right now. So it is 7.2.20 (from 20 february).


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 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