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. How to get a frame from a video at particular time?

public native Bitmap getFrameAt(int msec) throws
is deprecated with respect  earlier vesrion..
Can we have similar API in sdk 1.5 ?
Is there any alternative solutions for it.


2. Problems with Home samples

Hi guys,
     There is a problem  when I am trying to modify the Home app in
the sample code. I modified it and compiled it on emulator (Sdk 1.1),
it's OK. But when I run it on 1.5(my android phone is 1.5), it always
shows me: " The application Home Sample(process
com.exmaple.android.home) has stopped unexpectedly. Please try
again."  Could any one give some suggestions to solve this problem?
Becase I want it run on real phone. Thanks a lot.


3. Help needed on Streaming live video feed

4. how to run apk in Unix command line

5. AlertDialog small border on top and bottom of window - how to remove?

6. getAPIversion

7. dalvikvm doesnt seem to recognize classes compiled with groovyc