Exception happened in MediaRecorder

by Alex » Tue, 14 Apr 2009 13:01:36 GMT

Sponsored Links
   From cupcake sourcecode, camrecorder can be implemented with
mediarecorder API, and the camrecorder has implemented in package/app/
Camera.  but when I open the camera App, and click "swtich to
video" ,the application crashed.
   From the debug trace, can see that the MediaRecorder can  not be
newed(new MediaRecorder() ) successful.
   and the following function can not be called successful:
    MediaRecorderClient::MediaRecorderClient(pid_t pid)
        LOGV("Client constructor");
       mPid = pid;
       mRecorder = new PVMediaRecorder();   // the statement break
with a Exception

 and PVMediaRecorder() is defined as:

    mAuthorDriverWrapper = new AuthorDriverWrapper();

    mAuthorDriver = new AuthorDriver();

 From the opencore, the  PV_MasterOMX_Init() (in
pv_encomxmastercore.cpp) will be called, and please look at the
following source code in this function:



        pWrapper[0] = QC_OMX_Wrapper::New();
   //Holmes temp remove this {
        //pWrapper[NUMBER_OF_OMX_CORES-1] = PV_OMX_Wrapper::New(); //
initialize pointers to omx methods
        //Holmes temp remove this {

        // loop over all cores
        master_index = 0;
        OMX_STRING ComponentName = (OMX_STRING) malloc

        for (jj = 0; jj < NUMBER_OF_OMX_CORES; jj++)
            // first call OMX_Init
            Status = (*(pWrapper[jj]->GetpOMX_Init()))();





    I don't know why the statement  "pWrapper[NUMBER_OF_OMX_CORES-1] =
PV_OMX_Wrapper::New();" was deleted. and if this statement is deleted,
the pWrapper is empty, so when " Status = (*(pWrapper[jj]->GetpOMX_Init
()))();" is called, a exception  will happened , and this can be
caused the camrecorder crashed!

  but if I make the "pWrapper[NUMBER_OF_OMX_CORES-1] =
PV_OMX_Wrapper::New(); " usable, the author can not be complied
successful! and the error info is:
              PV_OMX_Wrapper::New() was not be declared

Can sb help me?

 Thanks !


Other Threads

1. Is NewWeakGlobalRef still not supported?

The Android JNI tips specifies that:
"NewWeakGlobalRef and DeleteWeakGlobalRef  are not implemented. The VM
supports weak references, but not JNI "weak global" references. These
will be supported in a future release."

Is this still the case, for example in the cupcake code?

I need to implement a set of callbacks from JNI to Java efficiently,
and I need to cache reference to the class in order to call the
methods. If NewWeakGlobalRef and DeleteWeakGlobalRef are not
supported, what is the best way?

2. Doesn't Android-1.0 support Recording Video well?

hi all,

I just experienced the video recording on G1 based on the system.img of
android1.0.  The process just lasts about 3 seconds, then blocks. And the
generated file is empty. What's the matter? Doesn't this version support
video recording, yet?



3. DroidDraw seems broken on 1.5

4. Anyone else "lose" their ratings in the developer console?

5. How to query the number of rows in a table

6. Is it possible to get the list of notifications ?

7. Get Process ID of while launching any specific applicatio