×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    132

    Smile how to get fps in camera example?

    Hi,

    i want to get the frame per second in camera example. In this example, i got every CFbsBitmap& frame in functin ViewFinderFrameReady and then transferred it to container to draw. so how can i get the frame per second?

    For get fps, i set two variables in cameracaptureengine.h
    Code:
    int                       TickCounter;
            
            TTime                     iStartTime;
    and in ViewFinderFrameReady
    Code:
    TickCounter++;
             
             
            TTime iNow;
            
      
           // FindMarkerCorners(iFrame);
            
           // AR(aFrame);
            
            iNow.HomeTime();
            
            TTimeIntervalMicroSeconds microSeconds = iNow.MicroSecondsFrom( iStartTime );
    
            TUint miliSeconds = microSeconds.Int64() / 1000;
            
            if(miliSeconds==1000)//demostrate one second
            	{
            
                    TBuf<100> buf1;
                    buf1.Num(TickCounter);
                    
                    CEikonEnv::InfoWinL(_L("The time of every frame"),buf1);
                   
                    iStartTime=iNow;
                }
    but there is no any infowin, so why?

    i have got it. These are my codes in viewfinderframeready:
    Code:
    TickCounter++;
             
             if(TickCounter==100)
            	 {
            	 TTime iNow;
            	 iNow.HomeTime();
            	 
            	 TTimeIntervalMicroSeconds microSeconds = iNow.MicroSecondsFrom( iStartTime );
    
            	 TUint miliSeconds = microSeconds.Int64() / 1000;
            	         
            	 TBuf<100> buf1;
            	 buf1.Num(miliSeconds);
            	         
            	 CEikonEnv::InfoWinL(_L("the time of 100 frames"),buf1);
            	        
            	 
            	 
            	 }
    Thank you.

    Mia
    Last edited by freesui1984; 2009-01-04 at 02:15. Reason: need

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: how to get fps in camera example?

    maybe you could try notes, like Global notes for example: http://wiki.forum.nokia.com/index.php/Global_notes

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    11

    Re: how to get fps in camera example?

    How about drawing directly on the Gc, I dunno if is the neatest & fastest way to do it but I would do it so. :-)

    In the header file:
    Code:
    TUint32 iTimeMs;
    TInt iFps;
    Init iTimeMs e.g. in the beginning of DoViewFinderL().

    Code:
    iTimeMs = 0;
    Calc Fps in the beginning of ImageReady()

    Code:
    iFps = (TInt)(1000/(User:NTickCount() - iTimeMs));
    iTimeMs = User:NTickCount();
    At the end of DrawL blit on top of captured image:

    Code:
    _LIT(KFps,"FPS: %d");
    TBuf<10> fpsBuf;
    TPoint pos(set desired screen coordinates);
    fpsBuf.Format( KFps, iFps);
    fpsBitGc->UseFont(CEikonEnv::Static()->DenseFont());
    fbsBitGc->SetPenColor( KRgbWhite);
    fbsBitGc->DrawText( fpsBuf, pos);
    HTH,

    -Ari
    Last edited by arijr; 2009-01-08 at 16:16.

Similar Threads

  1. Python for S60 1.4.0 released
    By jplauril in forum Symbian
    Replies: 43
    Last Post: 2009-05-24, 09:22
  2. how to calculate fps in camera example?
    By freesui1984 in forum Symbian
    Replies: 1
    Last Post: 2009-01-04, 06:29
  3. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  4. camera capturing with 30 fps?
    By Kurt Johannes in forum Mobile Java General
    Replies: 0
    Last Post: 2006-06-22, 11:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×