Rocket Division Software
http://www.starburnsoftware.com/forum/

If Disc in device & BuildImage
http://www.starburnsoftware.com/forum/starburn-sdk-f3/disc-device-buildimage-t130.html
Page 1 of 1

Author:  abs [ Sun Sep 12, 2004 12:58 pm ]
Post subject:  If Disc in device & BuildImage

Hi :
I have some new questions:
1. How do detect if there is a disc in device?
2.I am trying to build a image file ,I open it with UltralSO and I found a additionally file named 'sing.bin' , What is it used for doing?
3.After i burned file from 'c:\back' with SessionAtOnceFromTree.exe and TrackAtOnceFromTree.exe ,I noticed
that folders and files are localed in folder '2004_9_11_14 _04_12', but i don't want my files in any other folder.
4.Can i append files on disc with SessionAtOnce mode?

Thank you every much.

Author:  anton (staff) [ Sun Sep 12, 2004 5:28 pm ]
Post subject:  Re: If Disc in device & BuildImage

1. You need to execute StarBurn_CdvdBurnerGrabber_TestUnitReady() code. On successful completion you have disc inserted.

2. It just a sample code to show how to insert virtual file to created file system. See call to StarBurn_ISO9660JolietFileTree_AddMemory(). You just skip calling it and you'll not have this file present :-)

3. Again. This is just a sample code renaming virtual root to whatever you want. See the lines below the comment "Generate today date and time as now root directory name".

4. No. Only TAO (Track-At-Once) should be used for multisession discs. Both Session-At-Once and Disc-At-Once leave disc closed for future writes.

P.S. It seems it was you who wanted OGG Vorbis support. Good news for you -- we're done with OGG implementation and version should be built not later then this week.

Thank you!

abs wrote:
Hi :
I have some new questions:
1. How do detect if there is a disc in device?
2.I am trying to build a image file ,I open it with UltralSO and I found a additionally file named 'sing.bin' , What is it used for doing?
3.After i burned file from 'c:\back' with SessionAtOnceFromTree.exe and TrackAtOnceFromTree.exe ,I noticed
that folders and files are localed in folder '2004_9_11_14 _04_12', but i don't want my files in any other folder.
4.Can i append files on disc with SessionAtOnce mode?

Thank you every much.

Author:  abs [ Mon Sep 13, 2004 4:46 am ]
Post subject: 

About quistion 1.
I see if there is no disc in device the StarBurn_CdvdBurnerGrabber_TestUnitReady function
will takes more than 20 seconds ,do you have method let it soon a bit ?

Thanks for your support.

Author:  anton (staff) [ Mon Sep 13, 2004 5:11 am ]
Post subject: 

No. Would you like to us to add _TestUnitReadyEx(...) variant with passed maximum time to wait in seconds? (This functionality is not exported but it's already present, so it's just a couple of minutes to add this code).

Thank you!

abs wrote:
About quistion 1.
I see if there is no disc in device the StarBurn_CdvdBurnerGrabber_TestUnitReady function
will takes more than 20 seconds ,do you have method let it soon a bit ?

Thanks for your support.

Author:  SpinDoctor [ Mon Sep 13, 2004 6:07 am ]
Post subject: 

hey ads.

In my code I had the same behavior (but only when using the debug-version of StarBurn-DLL)...I found out, that StarBurn_CdvdBurnerGrabber_TestUnitReady takes a very long time if there is NO media in, so I simply call Win-SDK GetDiskFreeSpace( szDeviceName, NULL, NULL, NULL, NULL ); wich returns FALSE if there is no disc, and if so, I do not call StarBurn_CdvdBurnerGrabber_TestUnitReady...

Spin

Author:  anton (staff) [ Mon Sep 13, 2004 2:40 pm ]
Post subject: 

This stuff is called WORKAROUND. While FIX is what we need :-) I've added TestUnitReadyEx(...) code to the current build. Hold on and wait for version 4.1.0 to come. Thanks!

SpinDoctor wrote:
hey ads.

In my code I had the same behavior (but only when using the debug-version of StarBurn-DLL)...I found out, that StarBurn_CdvdBurnerGrabber_TestUnitReady takes a very long time if there is NO media in, so I simply call Win-SDK GetDiskFreeSpace( szDeviceName, NULL, NULL, NULL, NULL ); wich returns FALSE if there is no disc, and if so, I do not call StarBurn_CdvdBurnerGrabber_TestUnitReady...

Spin

Author:  SpinDoctor [ Mon Sep 13, 2004 4:44 pm ]
Post subject: 

anton (staff) wrote:
This stuff is called WORKAROUND. While FIX is what we need :-) I've added TestUnitReadyEx(...) code to the current build. Hold on and wait for version 4.1.0 to come. Thanks!


hmmmmm....
think twice...imagine, TestUnitReadyEx is called with a timeout, say 3 seconds, and it returns with, probably, RET_TIMEOUT or something...what is the state then? Disc not ready? No disc in drive?

just askin' :D

Spin

Author:  anton (staff) [ Tue Sep 14, 2004 12:23 pm ]
Post subject: 

You can always analyze SCSI sense data coming from TestUnitReady(Ex). ASC/ASCQ or 0x3A/xx means "no disc in drive" or "tray opened" and other codes can be interpreted as "unit is in process of becoming ready".

SpinDoctor wrote:
anton (staff) wrote:
This stuff is called WORKAROUND. While FIX is what we need :-) I've added TestUnitReadyEx(...) code to the current build. Hold on and wait for version 4.1.0 to come. Thanks!


hmmmmm....
think twice...imagine, TestUnitReadyEx is called with a timeout, say 3 seconds, and it returns with, probably, RET_TIMEOUT or something...what is the state then? Disc not ready? No disc in drive?

just askin' :D

Spin

Author:  Vetch [ Tue Sep 14, 2004 1:18 pm ]
Post subject: 

Something like that :-):

Code:
struct ErrorReport
{
   CHAR   chText[1024];
   ULONG   ulStatus;
   CDB_FAILURE_INFORMATION   cdbFailInfo;
   EXCEPTION_NUMBER   iNr;
   ErrorReport();
   void Clear();
   bool Success();
   std::string SenseString();
   std::string ErrorAsString();
};

std::string ErrorReport::SenseString()
{
   std::string S;
   for (int i = 0; i < (int)cdbFailInfo.m__UCHAR__SenseSizeInUCHARs; i++)
   {
      CString N;
      N.Format("%0.2X", cdbFailInfo.m__UCHAR__Sense[i]);
      S += N;
   }
   return S;
}

bool IsDiscInserted(PVOID pCdvdBurnerGrabber)
{
   bool bResult = false;
   DISC_INFORMATION DI;
   ErrorReport ERR;
   ERR.iNr = StarBurn_CdvdBurnerGrabber_GetDiscInformation(pCdvdBurnerGrabber,
      (PCHAR)(&ERR.chText), sizeof(ERR.chText), &ERR.ulStatus, &ERR.cdbFailInfo, &DI);
   bResult = (ERR.SenseString().find("3A00") == std::string::npos);
   return bResult;
}

Author:  anton (staff) [ Tue Sep 14, 2004 3:24 pm ]
Post subject: 

Very close :-) Actually we'll add some kind of macro taking CDB failure information as pointer and returning different SCSI sense meanings (decoding 17 bytes or processed SCSI sense to the form readable my most of the humans) :-) For now we're gathering the opinions -- how this code should look like. Your vote is accepted :-)

Vetch wrote:
Something like that :-):

Code:
struct ErrorReport
{
   CHAR   chText[1024];
   ULONG   ulStatus;
   CDB_FAILURE_INFORMATION   cdbFailInfo;
   EXCEPTION_NUMBER   iNr;
   ErrorReport();
   void Clear();
   bool Success();
   std::string SenseString();
   std::string ErrorAsString();
};

std::string ErrorReport::SenseString()
{
   std::string S;
   for (int i = 0; i < (int)cdbFailInfo.m__UCHAR__SenseSizeInUCHARs; i++)
   {
      CString N;
      N.Format("%0.2X", cdbFailInfo.m__UCHAR__Sense[i]);
      S += N;
   }
   return S;
}

bool IsDiscInserted(PVOID pCdvdBurnerGrabber)
{
   bool bResult = false;
   DISC_INFORMATION DI;
   ErrorReport ERR;
   ERR.iNr = StarBurn_CdvdBurnerGrabber_GetDiscInformation(pCdvdBurnerGrabber,
      (PCHAR)(&ERR.chText), sizeof(ERR.chText), &ERR.ulStatus, &ERR.cdbFailInfo, &DI);
   bResult = (ERR.SenseString().find("3A00") == std::string::npos);
   return bResult;
}

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/