1) Just pass FALSE as IsNextSessionAllowed parameter when using burning API subset functions.
2) Yes. When recording data discs only 2048 bytes from each 2352 byte sector of the CD would be used (DVDs have ALWAYS 2048 byte sectors visible to user). When recording video or audio single sector size would be different to 2048 bytes.
3) Not so... When you're adding files to the tree you need to process callbacks updating total file content size (not to get complete tree size after BuildImage(...) call - you can do nothing with the tree after this point). Just add file system overhead itself (around 2 megabytes) and lead-out overhead for CD (let it be 15 megabytes) and 30 megabytes for DVD (if recording with "next session" set to FALSE) and you'll have whole "physical image" size stored on the media.
Your "would fit?" API call sounds like a good idea and I think we'll be adding it as feature request.
betty_crokker wrote:
In a previous topic ("Disc Free Space and Image Size") there was some discussion about how to tell whether a specific set of files would fit on a given disc or not, based on things like "lead-out" and "border-out".
If it helps answer my questions, I am insisting on an empty disc when I start my burning (and erase the disc if it isn't empty). It is absolutely necessary that all of the data fits on a single disc, and I don't need or want to leave the disc "open" to having additional sessions or tracks added to it after I'm done. If my data isn't going to fit, then my program needs to work with the user to decide which files to include and which files to exclude. Creating multiple discs isn't an option for my requirement. I would like to support whatever kind of disc the user sticks in their drive.
A couple questions on this subject.
1) Anton mentioned "disabling multisession during the current burn" as a way of maximizing the space available on a disc. I'm not quite sure how to do that.
2) The TRACK_INFORMATION structure contains the # of free logical blocks, are blocks always UDF_LOGICAL_BLOCK_SIZE_IN_UCHARS bytes long?
3) Is there a clever function like ISO9660JolietFileTree_WillFit() that lets me quickly determine whether the Joliet tree I've constructed will fit onto a single disc? Or maybe ISO9660JolietFileTree_GetSizeInUCHARSIncludingLeadOutAndBorderOut()? If not, how hard is it for you to create such a function?
Thanks again!