#1 Burning Software

It is currently Thu Dec 19, 2024 8:42 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Burning a Blu-Ray
PostPosted: Fri Oct 12, 2007 1:34 pm 
Offline

Joined: Wed Oct 03, 2007 8:41 am
Posts: 5
Hi to everyone and particularly to Anton.
First of all I want to apologize myself for the last time.
I didn't want to cause a mess for your forum.

I've got a problem burning a blu-ray.
I've realized an application (obviously with StarBurn) that works fine with DVD and CD.
Yesterday I tried to Burn a 45GB file on a Blu-Ray (using XP Pro). At the end of the operation I found only (exactly) 1GB on the disc and content was a subset of original file.
There were not errors by the starburn library.
I've used the DataBurner example to do my own application, but that example doesn't contemplate the use of a Blu-Ray.
So I'd like to know if there are some things to change to adapt the application or if you have some suggestions for me (also about generics problem with Blu-Ray).
An example code of the procedures to use would be great (I don't know if I'm asking too much) :D .
Thanks


Top
 Profile  
 
 Post subject: Re: Burning a Blu-Ray
PostPosted: Sun Oct 14, 2007 10:26 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
It's not a problem, you're not the first and definitely not the last one :)

Back to the Blu-Ray thing...

1) We need StarBurn to make sure the burning really was successful.

2) What file system did you use? UDF Vs ISO9660/Joliet?

3) If it was ready ISO image could you please take TrackAtOnceFromFile sample and burn ISO to BD-RE with it? Capturing and sending us back the log.

So we'll be happy to proceed with this issue. For now we know NOTHING. Starting from Blu-Ray burner and ending with the way you handle exceptions...

Thanks!

twain wrote:
Hi to everyone and particularly to Anton.
First of all I want to apologize myself for the last time.
I didn't want to cause a mess for your forum.

I've got a problem burning a blu-ray.
I've realized an application (obviously with StarBurn) that works fine with DVD and CD.
Yesterday I tried to Burn a 45GB file on a Blu-Ray (using XP Pro). At the end of the operation I found only (exactly) 1GB on the disc and content was a subset of original file.
There were not errors by the starburn library.
I've used the DataBurner example to do my own application, but that example doesn't contemplate the use of a Blu-Ray.
So I'd like to know if there are some things to change to adapt the application or if you have some suggestions for me (also about generics problem with Blu-Ray).
An example code of the procedures to use would be great (I don't know if I'm asking too much) :D .
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 7:47 am 
Offline

Joined: Wed Oct 03, 2007 8:41 am
Posts: 5
Thanks for your reply.

For the 3rd point in your reply I'm trying to obtain an answer

At the moment I can send to you the code I've used for the burning function.

But before, about the 2nd point, I don't know how to use the UDF filesystem, because in the sample code I've used (the databurner), the structure FILE_TREE
has only two type: ISO9660 and Joliet.
Furthermore, if I would use the UDF filesystem, there are a lot of functions that are not translated for a Dllimport. So I need for an help in that sense.

Back to the burning function
Arguments:
int DeviceNum : number of the device selected
string[] FileNames : an array of files to burn
uint MultiSession : 1 to activate the multisession.

In our case MultiSession=0 (single session) and FileNames is an array of one single file of 45GB (It was just a test).

The code used is completely based on the DataBurner example.
The burning process takes 5 hours.

public uint Burn(int DeviceNum, string[] FileNames, uint MultiSession)
{
if (FileNames.Length < 0)
throw new Exception("\nBurn: cannot use empty file list");

if (DeviceNum >= Devices.Count)
throw new Exception("\nBurn: device number not valid");

if (!TestDevice(DeviceNum))
throw new Exception("\nBurn: device not ready");

GetDiscInsertedType(DeviceNum);

CDDVDINFO Info = DevicesInfo[DeviceNum];

if (Info.mediainfo == "Empty")
throw new Exception("\nBurn: device empty");

//these two function save into the apposite field of DevicesInfo[DeviceNum] the infos about the space
GetDiscUsedSpace(DeviceNum);
GetDiscFreeSpace(DeviceNum);

Info = DevicesInfo[DeviceNum];

Marshal.WriteByte(ExceptionText, 0);

byte IsBUPEnabled;
byte IsBUPSupported;

ExceptionNum = StarBurn_CdvdBurnerGrabber_GetBUP(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
out IsBUPEnabled,
out IsBUPSupported
);

if (EXCEPTION_NUMBER.EN_SUCCESS != ExceptionNum)
{
OutMessage = String.Format("\nBurn: GetBUP failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

if (IsBUPSupported != 0)
{
ExceptionNum =
StarBurn_CdvdBurnerGrabber_SetBUP(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
1
);

if (EXCEPTION_NUMBER.EN_SUCCESS != ExceptionNum)
{
OutMessage = String.Format("\nBurn: SetBUP failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);
throw new Exception(OutMessage);
}
}

int maxSpeed = GetMaxWriteSpeed(DeviceNum);

ExceptionNum =
StarBurn_CdvdBurnerGrabber_SetSpeeds(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
MAX_POSSIBLE_SPEED,
maxSpeed
);

if (EXCEPTION_NUMBER.EN_SUCCESS != ExceptionNum)
{
OutMessage = String.Format("\nBurn: SetSpeeds failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

ExceptionNum =
StarBurn_CdvdBurnerGrabber_SendOPC(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo
);

if (EXCEPTION_NUMBER.EN_SUCCESS != ExceptionNum)
{
OutMessage = String.Format("\nBurn: SendOPC failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

int lastTrack;

ExceptionNum = StarBurn_CdvdBurnerGrabber_GetLastTrack(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
out lastTrack
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: GetLastTrack failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);
throw new Exception(OutMessage);
}

FILE_TREE MyFileTreeType = FILE_TREE.FILE_TREE_JOLIET;
byte IsLevel = 0;

DISC_INFORMATION DiscInfo = new DISC_INFORMATION();

GetDiscInfo(Info, ref DiscInfo, DeviceNum);

if (DiscInfo.m__UCHAR__DiscStatus != (byte)DISC_STATUS.EMPTY)
{
DISC_FILESYSTEM DiscFileSystem;

ExceptionNum =
StarBurn_CdvdBurnerGrabber_GetDiscFileSystem(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
out DiscFileSystem);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: GetDiscFileSystem failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

if (DiscFileSystem.m__BOOLEAN__ISO9660Present == 1 && DiscFileSystem.m__BOOLEAN__UDFPresent == 0)
{
if (DiscFileSystem.m__BOOLEAN__JolietPresent == 1)
{
MyFileTreeType = FILE_TREE.FILE_TREE_JOLIET;
}
else
{
MyFileTreeType = FILE_TREE.FILE_TREE_ISO9660;
IsLevel = 1;
}
}
}

uint ISOFileTree;

ExceptionNum =
StarBurn_ISO9660JolietFileTree_Create(
out ISOFileTree,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
EmptyCallbackDelegate,
IntPtr.Zero,
1,
0,
IsLevel,
MyFileTreeType
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: JolietFileTree_Create failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

STARBURN_TRACK_INFORMATION InfoTracks = TracksInfo[DeviceNum];

if (lastTrack != 0)
{
ExceptionNum =
StarBurn_ISO9660JolietFileTree_ImportTrack(
Info.CdvdBurnerGrabber,
ISOFileTree,
lastTrack,
0,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: ISO9660JolietFileTree_ImportTrack failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);
throw new Exception(OutMessage);
}
}

uint ParentNode = 0;
uint StarBurnNewNode = 0;

ParentNode = StarBurn_ISO9660JolietFileTree_GetRoot(ISOFileTree);

for (int i = 0; i < FileNames.Length; ++i)
{
ExceptionNum =
StarBurn_ISO9660JolietFileTree_Add(
ISOFileTree,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
FileNames[i],
null,
FILE_TIME.FILE_TIME_LAST_WRITE,
ref ParentNode,
out StarBurnNewNode
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: ISO9660JolietFileTree_GetRoot failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

}

uint tree_level = StarBurn_ISO9660JolietFileTree_GetLevel(ISOFileTree);
if (tree_level > 8)
{
Console.WriteLine("Device " + DeviceNum + " level failed");
}

ExceptionNum =
StarBurn_ISO9660JolietFileTree_BuildImage(
ISOFileTree,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
InfoTracks.m__LONG__NextWritableAddress,
0,
1,
"Data backup",
"Data backup",
"Data backup"
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: ISO9660JolietFileTree_BuildImage failed, exception {0}, status {1}, text '{2}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

uint ImageSizeLowPart;
uint ImageSizeHighPart;
ImageSizeLowPart =
StarBurn_ISO9660JolietFileTree_GetSizeInUCHARs(
ISOFileTree,
out ImageSizeHighPart
);

ulong ImageSize = ImageSizeHighPart;
ImageSize <<= 4 * 8;
ImageSize += ImageSizeLowPart;

//20MB of leadin e leadout for each session
ulong LeadInOut = 20 * 1024 * 1024;

if (Info.freesizeInBytes <= (ImageSize + LeadInOut))
throw new Exception("\nBurn: not enough space - image size: " + ImageSize + " - free space: " + Info.freesizeInBytes + "\n");

Console.WriteLine("Device " + DeviceNum + " image size " + ImageSize);

Console.WriteLine("Burning process started....." + DateTime.Now);

ExceptionNum =
StarBurn_CdvdBurnerGrabber_TrackAtOnceFromTree(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
ISOFileTree,
0,
0,//test
(byte)MultiSession,
WRITE_REPORT_DELAY_IN_SECONDS,
BUFFER_STATUS_REPORT_DELAY_IN_SECONDS
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: CdvdBurnerGrabber_TrackAtOnceFromTree failed, exception {0}, status {1}, text '{3}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

Console.WriteLine("Burning process complete....." + DateTime.Now);

ExceptionNum =
StarBurn_CdvdBurnerGrabber_CloseSession(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: CloseSession failed, exception {0}, status {1}, text '{3}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

Console.WriteLine("Session closed....." + DateTime.Now);

uint FailedLBA;

ExceptionNum = StarBurn_CdvdBurnerGrabber_VerifyTree(
Info.CdvdBurnerGrabber,
ExceptionText,
EXCEPTION_TEXT_SIZE,
out SystemError,
out CDBFailureInfo,
ISOFileTree,
InfoTracks.m__LONG__NextWritableAddress,
out FailedLBA,
1000
);

if (ExceptionNum != EXCEPTION_NUMBER.EN_SUCCESS)
{
OutMessage = String.Format("\nBurn: VerifyTree failed, exception {0}, status {1}, text '{3}'\n",
ExceptionNum,
SystemError,
Marshal.PtrToStringAnsi(ExceptionText)
);

throw new Exception(OutMessage);
}

Console.WriteLine("Burning process verified....." + DateTime.Now);

if (FailedLBA != 0)
Console.WriteLine("Failed LB: " + FailedLBA);

StarBurn_Destroy(ref ISOFileTree);

Console.WriteLine("Memory and resources released....." + DateTime.Now);

return FailedLBA;
}

Unfortunately I don't know the value returned by this function for an error in its use.
Anyway the problem here is not about the failed verify but about the strange burning process.


Analyzing the Blu-Ray after the burning process with an ISO analyzer tool gives this result.
On the disc there are two files with these properties:
1 - VD Address = 16
VD Size = 1 Block
Type = ISO9660
2 - VD Address = 17
VD Size = 1 Block
Type = Joliet


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 8:01 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
1) OK, so it's Joliet and not UDF. Good.

2) I don't need your source code at this moment. I've asked for the StarBurn debug log. Just make sure you don't embedd it to the forum message. Send it to the support@rocketdivision.com e-mail address.

Please provide us with the missing info so we could proceed.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 16, 2007 7:00 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
OK, got the logs...

1) Please allocate reasonable amount of cache memory during burn. Passing 1 (one) to the CreateXxx API calls make StarBurn allocate smallest possible one. It's OK for device lookup and grabbing but not for burning. Looking for troublles :) Not linked in any case to the Blu-Ray recognition problem but... Just in case :)

2) We have the same unit (Matsushita/Panasonic 5582) and it works fine. Just like your unit (according to the logs). So checking content creation things...

Thank you!


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

All times are UTC


Who is online

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