Hello all,

I have the following code that gets called from my
main activity to capture a full Frame Image with the camera.
I've tried many differnt combinations of callback requests, but I
NEVER get a Jepeg Callback, though I do get all the other callbacks.

// **************************************************************

public void TakeFullFrameImage()
{
        if(mCam != null)
        {
                Date currenttime = new Date();
                long Timeout = currenttime.getTime() + 3000;
                mCam.stopPreview();
                mCam.takePicture(ShutterCb, RawCb, PostViewCb, JpegCb);
                
                // *** [ShutterCb, RawCb, PostViewCb, JpegCb] ****
                // mCam.takePicture(ShutterCb, RawCb, PostViewCb, JpegCb );
                // ** [ The above Gets ShutterCb, RawCb, & PostViewCb only ]
                // mCam.takePicture(ShutterCb, RawCb, PostViewCb, null );       
                // ** [ The above Gets ShutterCb, RawCb, & PostViewCb ]
                // mCam.takePicture(ShutterCb, RawCb, null, null );             
        
                // ** [ The above Gets ShutterCb & RawCb ]
                // mCam.takePicture(ShutterCb, null, null, null );              
        
                // ** [ The above Gets ShutterCb only ]
                // mCam.takePicture(ShutterCb, null, PostViewCb, null );
                // ** [ The above Gets ShutterCb & PostViewCb ]
                // mCam.takePicture(ShutterCb, null, null, JpegCb );
                // ** [ The above Gets ShutterCb only ]
                // mCam.takePicture(ShutterCb, null, PostViewCb, JpegCb );
                // ** [ The above Gets ShutterCb & PostViewCb ]
                // mCam.takePicture(null, RawCb, null, null );                  
        
                // ** [ The above Gets RawCb only ]
                // mCam.takePicture(null, RawCb, PostViewCb, null );            
        
                // ** [ The above Gets RawCb, & PostViewCb ]
                // mCam.takePicture(null, RawCb, PostViewCb, JpegCb );          
                // ** [ The above Gets RawCb, & PostViewCb only ]
                // mCam.takePicture(null, null, PostViewCb, null );             
        
                // ** [ The above Gets PostViewCb only ]
                // mCam.takePicture(null, null, null, JpegCb );
                // ** [ The above Gets no callback
        
                while( (currenttime.getTime()) < (Timeout) )
                        currenttime = new Date();
                mCam.startPreview();
        }
}

// ********************************************************

I print out some debug info about the data each call back receives,
the log is below.
I always receive the Shutter Callback when I request it.
The Raw Callback always receives a NULL for the data parameter,
the PostView Callback recieves data, but it is much too small,
and is NOT a jpeg, and I never receive the Jepeg callback
even if request it.

The code is running on a samsung galaxy SII. Which according
to mCam.mCamParameters.getSupportedPictureFormats() only supports
ImageFormat.JPEG and nothing else.

So...Why don't I get a Jpeg callback...?

Pleas feel free to ask for additional information if you
think you might know what is wrong, but need more explaination.

// ********************************************************

03-10 18:12:59.535: D/dalvikvm(12393): GC_CONCURRENT freed ...
03-10 18:13:00.020: D/CLIPBOARD(12393): Hide Clipboard dialog ...
03-10 18:13:00.245: D/skia(12393): onFlyCompress
03-10 18:13:16.775: D/ShutterCb(12393): Shutter Callback received
03-10 18:13:17.125: D/dalvikvm(12393): GC_CONCURRENT freed 451K, ...
03-10 18:13:17.420: D/RawCb(12393): Image size is: 3264 x 2448
03-10 18:13:17.420: D/RawCb(12393): Image PixelFormat is: 256
03-10 18:13:17.435: D/RawCb(12393): Jpeg Image Quality is: 100
03-10 18:13:17.435: D/RawCb(12393): Thumbnail size is: 400 x  240
03-10 18:13:17.435: D/RawCb(12393): Thumbnail quality is: 100
03-10 18:13:17.435: D/RawCb(12393): Callback received with null data
03-10 18:13:17.470: D/PostViewCb(12393): Image size is: 3264 x 2448
03-10 18:13:17.470: D/PostViewCb(12393): Image PixelFormat is: 256
03-10 18:13:17.470: D/PostViewCb(12393): Callback Bytes: 576000
03-10 18:13:17.470: D/PostViewCb(12393): Jpeg Image Quality is: 100
03-10 18:13:17.470: D/PostViewCb(12393): Thumbnail size is: 400 x  240
03-10 18:13:17.470: D/PostViewCb(12393): Thumbnail quality is: 100
03-10 18:13:17.645: D/dalvikvm(12393): GC_CONCURRENT freed 1010K, 56% ...
03-10 18:13:18.095: D/dalvikvm(12393): GC_CONCURRENT freed 410K, ...
03-10 18:13:18.485: D/dalvikvm(12393): GC_CONCURRENT freed 399K, ...
03-10 18:13:18.880: D/dalvikvm(12393): GC_CONCURRENT freed 399K, ...
.
.
.
// ********************************************************

TIA

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to