prepare errors when open videocamera(pxa3xx)

by linzhangkun » Wed, 11 Nov 2009 02:54:08 GMT


Sponsored Links
 ow,I can see the preview when open the camera, but the preview is
very blurred.This is the first problem now.

And the second problem is about the videorecorder.When I open the
videorecorder,the screen just turns to be black and nothing
happens.From the COM's output, I can see below:

key 0x1c reported
key 0x1c reported
pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3221509671,
param= 1088461772l

camera_do_ioctl(line 3266): VIDIOC_S_INPUT

camera_do_ioctl(line 3268): arg_id value ====== 1

ov3640_init
finish SENSOR_HIGH power_on!
sensor reset
reset over
camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3234616854,
param= 1088461408l

camera_do_ioctl(line 3329): VIDIOC_S_PARM

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3234616837,
param= 1088461204l

camera_do_ioctl(line 3201): VIDIOC_S_FMT VIDIOC_TRY_FMT

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3222558216,
param= 1088461596l

camera_do_ioctl(line 3557): VIDIOC_REQBUFS

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703945,
param= 1088461528l

camera_do_ioctl(line 3442): VIDIOC_QUERYBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703945,
param= 1088461528l

camera_do_ioctl(line 3442): VIDIOC_QUERYBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703945,
param= 1088461528l

camera_do_ioctl(line 3442): VIDIOC_QUERYBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703945,
param= 1088461528l

camera_do_ioctl(line 3442): VIDIOC_QUERYBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 1074026002,
param= 1088461612l

camera_do_ioctl(line 3590): VIDIOC_STREAMON begin++++++++++++++++

pxa_camera_ioctl_streamon ++++++++++++++ begin
camera_start_capture begin...............
para defaut yuv 422
camera_context->capture_input_width=320
camera_context->capture_input_height=240
ov3640 set QVGA YUV setting
wait focus-----------
camera_start_capture end ...................
pxa_camera_ioctl_streamon ++++++++++++++++++++end
camera_do_ioctl(line 3601): VIDIOC_STREAMON end++++++++++++++++++++

camera_do_ioctl(line 3696): return value = 0

pxa_camera_irq(line 3975): buf_id = 0

pxa_camera_irq(line 3975): buf_id = 1

pxa_camera_irq(line 3975): buf_id = 2

pxa_camera_irq(line 3975): buf_id = 3

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703951,
param= 1088461508l

camera_do_ioctl(line 3470): VIDIOC_QBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703951,
param= 1088461508l

camera_do_ioctl(line 3470): VIDIOC_QBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703951,
param= 1088461508l

camera_do_ioctl(line 3470): VIDIOC_QBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_ioctl(line 4520): pxa_camera_ioctl: cmd= 3225703951,
param= 1088461508l

camera_do_ioctl(line 3470): VIDIOC_QBUF

camera_do_ioctl(line 3696): return value = 0

pxa_camera_irq(



prepare errors when open videocamera(pxa3xx)

by linzhangkun » Thu, 12 Nov 2009 14:25:21 GMT


 Now,when I open camera first,then turn it to the video mode from the
menu,I can see the video preview,but no buttons can respond to my
actions.I can just see the video preview.From the logcat, I alse see
the prepare errors.



When I open the camcorder directly,the problem is still the
same,nothing happens just the black screen and the prepare errors.

In the cameraharware.cpp,I see the code about videorecorder below:

status_t CameraHardware::startRecording(recording_callback cb, void*
user)
{
    return UNKNOWN_ERROR;
}

void CameraHardware::stopRecording()
{
}

bool CameraHardware::recordingEnabled()
{
    return false;
//return true;
}

void CameraHardware::releaseRecordingFrame(const sp<IMemory>& mem)
{
}

Why?These functions do nothing but just return unknown error.

Would you please give som help as soon as possible?



Thank you,

Best regards.

-- 


Sponsored Links


Other Threads

1. tanya: hp android buat ber gps ria

Para suhu sekalian mau tanya,

Hp droid value seperti samsung galaxy mini atau optimus me sudah cukup
mumpuni belum untuk keperluan ber gps ria ?? Prefer offline. Flash n kamera
bkn prioritas.

Atau Ada saran lain? Pengen-nya yg di range 1jt an..

Thx before,
Budi

-- 
"

2. Image gallery without memory error

I  made a image gallery but  getting a memory error when I slide
photos.
Then I added bitmapfactory but I can run the program because It shows
error in the bitmapdrawable.
can anybody tell me how to solve this problem.

ContentResolver cr=getContentResolver();
        Cursor c=cr.query(
            MediaStore.Images.Media.INTERNAL_CONTENT_URI,
            null,null,null,null);
        c.moveToFirst();
        for (int i=0;i<c.getCount();i++) {
            String path=c.getString(c.getColumnIndexOrThrow("_data"));
            photoList.add(file2bmp(path,480,480));
            for (String column:c.getColumnNames()) {//
                android.util.Log.e("",column+"="+
                    c.getString(c.getColumnIndexOrThrow(column)));
            }
            c.moveToNext();
        }


        Gallery gallery=new Gallery(this);
        gallery.setSpacing(2);
        gallery.setAdapter(new GalleryAdapter());
        gallery.setLayoutParams(new LinearLayout.LayoutParams(FP,FP));
        layout.addView(gallery);
    }


    private Bitmap file2bmp(String path,int maxW,int maxH) {
        BitmapFactory.Options options;
        InputStream in=null;
        try {

            options=new BitmapFactory.Options();
            options.inJustDecodeBounds=true;
            in=new FileInputStream(path);
            BitmapFactory.decodeStream(in,null,options);
            in.close();
            int scaleW=options.outWidth/maxW+1;
            int scaleH=options.outHeight/maxH+1;
            int scale =Math.max(scaleW,scaleH);


            options=new BitmapFactory.Options();
            options.inJustDecodeBounds=false;
            options.inSampleSize=scale;
            in=new FileInputStream(path);
            Bitmap bmp=BitmapFactory.decodeStream(in,null,options);
            in.close();
            return bmp;
        } catch (Exception e) {
            try {
                if (in!=null) in.close();
            } catch (Exception e2) {
            }
            return null;
        }
    }


    public class GalleryAdapter extends BaseAdapter {

        public int getCount() {
            return photoList.size();
        }


        public Object getItem(int position) {
            return position;
        }


        public long getItemId(int position) {
            return position;
        }


        public View getView(int position, View convertView, ViewGroup
parent) {
            ImageView imageView;
            if (convertView==null) {
                imageView=new ImageView(MainAct.this);
                imageView.setLayoutParams(new
Gallery.LayoutParams(240,240));
 
imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
                imageView.setBackgroundColor(Color.BLACK);

                BitmapDrawable bd=new
BitmapDrawable(photoList.get(position));   //getting error
                imageView.setImageDrawable(bd);
            } else {
                imageView=(ImageView)convertView;
            }
            return imageView;
        }
    }


Thank you

-- 

3. Problem to fix image view to layout

4. RIL understanding

5. OutOfMemoryError

6. Need help on ftyp's..

7. Have to clean build to get app to install on phone