#1 Burning Software

It is currently Thu Dec 19, 2024 5:12 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Burning Progress Issues
PostPosted: Thu Feb 02, 2006 7:29 pm 
Offline

Joined: Thu Feb 02, 2006 7:21 pm
Posts: 9
Hi,

I've been using the SDK for about a week and everything is working properly except I'm having some problem displaying the burning progress to the user.

I'm displaying progress the way that I saw it in many of the samples but the progress never seems to reach the end (sometimes only going halfway). The burns are completing properly so I'm wondering if I'm handling the progress callback improperly?

I'm working in C++ and linking to the DLL dynamically.

Here is my code from the progress callback:

Code:
case CN_CDVD_WRITE_PROGRESS:
{
   //
    // Get parameters passed with callback
    //
    l__LARGE_INTEGER__FileSizeInLBs = *( PLARGE_INTEGER )( p__PVOID__CallbackSpecial1 );
    l__LARGE_INTEGER__LBsWritten = *( PLARGE_INTEGER )( p__PVOID__CallbackSpecial2 );

    //
    // Calculate number of percent written
    //
    l__LARGE_INTEGER__CurrentPercent.QuadPart =
        ( ( l__LARGE_INTEGER__LBsWritten.QuadPart * 100 )
      / l__LARGE_INTEGER__FileSizeInLBs.QuadPart );

    //
    // Check if current calculated was already written
    //
    if ( l__LARGE_INTEGER__CurrentPercent.QuadPart
      != pStatusWrapper->m_llLastUsedPercent)
    {
        //
        // Update last written percent with current value
        //
        pStatusWrapper->m_llLastUsedPercent = l__LARGE_INTEGER__CurrentPercent.QuadPart;

        //
        // Print this percent
        //
        pStatusWrapper->m_pProgressToUse->SetStatusPos(
         (int)l__LARGE_INTEGER__CurrentPercent.QuadPart);
    }         
}
break;


Is there something else I should be doing? Or is there a better way to handle the progress?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 7:25 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
StarBurn is written to call progress callback after some period of time. So if you burn very small amount of data and asked to call you back in say after every 2 seconds it could happen your callback would be called only a couple of times and you'd get something like:

30% 70%

and that's all. The solution would be - always show 100% completion after you got "syncrhonize cache" callback. Of course you can decrease timeout and ask to call you back every 1 second or so but it would not work for very small amounts of data (and doing a lot of callbacks is not a good idea as well).

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 06, 2006 4:11 pm 
Offline

Joined: Thu Feb 02, 2006 7:21 pm
Posts: 9
Hi Anton thanks for the information, we are indeed burning small amounts of data, below 15Mb for the most part.

What we ended up doing was showing progress based on the average amount of time that it takes to accomplish different parts of the burn.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 06, 2006 8:39 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Not exactly good idea... Burning now uses CAV speeds so starting to burn at say 40X does not mean you'd actually do whole disc burn at 40X. Speed would start from say 12X and only at the outer border part would reach maximum 40X. So doing approximation using amount of data expected to be recorded and burning speed would not work for most of the cases.

markir wrote:
Hi Anton thanks for the information, we are indeed burning small amounts of data, below 15Mb for the most part.

What we ended up doing was showing progress based on the average amount of time that it takes to accomplish different parts of the burn.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 49 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group