Hi everyone,

I used the code above but the CameraView activity dies (see log
below).

Does the emulator support video recording for sdk1.5 on Windows Vista
+ Eclipse Ganymeade?
If yes, how did you get it to work?

Note:
- I did mount an sdcard image
- I also added permission in manifest: <uses-permission
android:name="android.permission.CAMERA"/>
- Interestingly, I do get a file created under /sdcard/test.mp4 but
the size is 0.

Thanks again in advance!


-----------------------------
Log:
06-03 23:44:36.151: INFO/ActivityManager(584): Starting activity:
Intent { action=android.intent.action.MAIN categories=
{android.intent.category.LAUNCHER} flags=0x10200000 comp={com.nb/
com.nb.CameraView} }
06-03 23:44:36.261: INFO/ActivityManager(584): Start proc com.nb for
activity com.nb/.CameraView: pid=723 uid=10019 gids={1006}
06-03 23:44:36.411: INFO/jdwp(723): received file descriptor 10 from
ADB
06-03 23:44:36.841: INFO/WindowManager(584): Setting rotation to 1,
animFlags=0
06-03 23:44:36.861: INFO/WindowManager(584): Config changed:
{ scale=1.0 imsi=0/0 locale=en_US touch=3 key=2/1/2 nav=3 orien=2 }
06-03 23:44:36.911: INFO/ARMAssembler(584): generated
scanline__00000077:03010104_00000004_00000000 [ 22 ipp] (41 ins) at
[0x252960:0x252a04] in 1307079 ns
06-03 23:44:36.991: INFO/ARMAssembler(584): generated
scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at
[0x252a08:0x252b14] in 534356 ns
06-03 23:44:37.091: INFO/DEBUG(551): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
06-03 23:44:37.121: INFO/DEBUG(551): Build fingerprint: 'generic/sdk/
generic/:1.5/CUPCAKE/148875:eng/test-keys'
06-03 23:44:37.121: INFO/DEBUG(551): pid: 723, tid: 723  >>> com.nb
<<<
06-03 23:44:37.121: INFO/DEBUG(551): signal 11 (SIGSEGV), fault addr
00000018
06-03 23:44:37.121: INFO/DEBUG(551):  r0 ffffef40  r1 ffffece8  r2
41095b28  r3 00000000
06-03 23:44:37.121: INFO/DEBUG(551):  r4 435a0ae0  r5 ab308358  r6
0000a9d0  r7 bef67530
06-03 23:44:37.121: INFO/DEBUG(551):  r8 bef67550  r9 41049cf0  10
41049cdc  fp 00000000
06-03 23:44:37.121: INFO/DEBUG(551):  ip ad083e50  sp bef67528  lr
ad03dcf5  pc ab305408  cpsr 80000030
06-03 23:44:37.221: DEBUG/StatusBar(584): updateResources
06-03 23:44:37.391: INFO/DEBUG(551):          #00  pc 00005408  /
system/lib/libmedia_jni.so
06-03 23:44:37.401: INFO/DEBUG(551):          #01  pc 0000e3b4  /
system/lib/libdvm.so
06-03 23:44:37.411: INFO/DEBUG(551):          #02  pc 00040a8a  /
system/lib/libdvm.so
06-03 23:44:37.411: INFO/DEBUG(551):          #03  pc 00013118  /
system/lib/libdvm.so
06-03 23:44:37.411: INFO/DEBUG(551):          #04  pc 00017b1c  /
system/lib/libdvm.so
06-03 23:44:37.441: INFO/DEBUG(551):          #05  pc 00017560  /
system/lib/libdvm.so
06-03 23:44:37.452: INFO/DEBUG(551):          #06  pc 00052268  /
system/lib/libdvm.so
06-03 23:44:37.471: INFO/DEBUG(551):          #07  pc 000596ee  /
system/lib/libdvm.so
06-03 23:44:37.471: INFO/DEBUG(551):          #08  pc 00013118  /
system/lib/libdvm.so
06-03 23:44:37.481: INFO/DEBUG(551):          #09  pc 00017b1c  /
system/lib/libdvm.so
06-03 23:44:37.481: INFO/DEBUG(551):          #10  pc 00017560  /
system/lib/libdvm.so
06-03 23:44:37.521: INFO/DEBUG(551):          #11  pc 000520ec  /
system/lib/libdvm.so
06-03 23:44:37.531: INFO/DEBUG(551):          #12  pc 0003f0f8  /
system/lib/libdvm.so
06-03 23:44:37.551: INFO/DEBUG(551):          #13  pc 00031ac2  /
system/lib/libdvm.so
06-03 23:44:37.561: INFO/DEBUG(551):          #14  pc 00028280  /
system/lib/libandroid_runtime.so
06-03 23:44:37.581: INFO/DEBUG(551):          #15  pc 00028d7e  /
system/lib/libandroid_runtime.so
06-03 23:44:37.591: INFO/DEBUG(551):          #16  pc 00008bf2  /
system/bin/app_process
06-03 23:44:37.621: INFO/DEBUG(551):          #17  pc 0001fd1a  /
system/lib/libc.so
06-03 23:44:37.641: INFO/DEBUG(551):          #18  pc 0000bcb2  /
system/lib/libc.so
06-03 23:44:37.641: INFO/DEBUG(551):          #19  pc b000157e  /
system/bin/linker
06-03 23:44:37.651: INFO/DEBUG(551): stack:
06-03 23:44:37.651: INFO/DEBUG(551):     bef674e8  435a0ae0
06-03 23:44:37.651: INFO/DEBUG(551):     bef674ec  ad03edab  /system/
lib/libdvm.so
06-03 23:44:37.651: INFO/DEBUG(551):     bef674f0  ad082c50
06-03 23:44:37.651: INFO/DEBUG(551):     bef674f4  41095b28
06-03 23:44:37.671: INFO/DEBUG(551):     bef674f8  0000a9d0  [heap]
06-03 23:44:37.671: INFO/DEBUG(551):     bef674fc  ab308828
06-03 23:44:37.681: INFO/DEBUG(551):     bef67500  ad082888
06-03 23:44:37.693: INFO/DEBUG(551):     bef67504  435a06f0
06-03 23:44:37.693: INFO/DEBUG(551):     bef67508  bef67530  [stack]
06-03 23:44:37.693: INFO/DEBUG(551):     bef6750c  ab30488d  /system/
lib/libmedia_jni.so
06-03 23:44:37.711: INFO/DEBUG(551):     bef67510  00000000
06-03 23:44:37.711: INFO/DEBUG(551):     bef67514  435a0ae0
06-03 23:44:37.711: INFO/DEBUG(551):     bef67518  ab308358
06-03 23:44:37.711: INFO/DEBUG(551):     bef6751c  0000a9d0  [heap]
06-03 23:44:37.722: INFO/DEBUG(551):     bef67520  df002777
06-03 23:44:37.722: INFO/DEBUG(551):     bef67524  e3a070ad
06-03 23:44:37.722: INFO/DEBUG(551): #00 bef67528  bef67580  [stack]
06-03 23:44:37.741: INFO/DEBUG(551):     bef6752c  0000000b
06-03 23:44:37.741: INFO/DEBUG(551):     bef67530  00000000
06-03 23:44:37.741: INFO/DEBUG(551):     bef67534  00190338  [heap]
06-03 23:44:37.751: INFO/DEBUG(551):     bef67538  bef67570  [stack]
06-03 23:44:37.761: INFO/DEBUG(551):     bef6753c  bef67570  [stack]
06-03 23:44:37.761: INFO/DEBUG(551):     bef67540  00000000
06-03 23:44:37.761: INFO/DEBUG(551):     bef67544  ab3053c9  /system/
lib/libmedia_jni.so
06-03 23:44:37.770: INFO/DEBUG(551):     bef67548  41049cf8
06-03 23:44:37.770: INFO/DEBUG(551):     bef6754c  ad00e3b8  /system/
lib/libdvm.so
06-03 23:44:37.770: INFO/DEBUG(551): #01 bef67550  411296e0
06-03 23:44:37.791: INFO/DEBUG(551):     bef67554  0000bc60  [heap]
06-03 23:44:37.791: INFO/DEBUG(551):     bef67558  ab3053c9  /system/
lib/libmedia_jni.so
06-03 23:44:37.791: INFO/DEBUG(551):     bef6755c  00000000
06-03 23:44:37.791: INFO/DEBUG(551):     bef67560  00001070
06-03 23:44:37.791: INFO/DEBUG(551):     bef67564  0000bc60  [heap]
06-03 23:44:37.791: INFO/DEBUG(551):     bef67568  bef67570  [stack]
06-03 23:44:37.791: INFO/DEBUG(551):     bef6756c  ad040a8d  /system/
lib/libdvm.so
06-03 23:44:39.521: INFO/ActivityManager(584): Process com.nb (pid
723) has died.




---------------------------

Activity:
public class CameraView extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        SurfaceView sv = (SurfaceView) findViewById
(R.id.mySurfaceView);
        SurfaceHolder holder = sv.getHolder();


        MediaRecorder recorder = new MediaRecorder();
        String filePath=("/sdcard/test.mp4");


        recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
        recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
        recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
        recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
        recorder.setVideoEncoder
(MediaRecorder.VideoEncoder.MPEG_4_SP);
        recorder.setOutputFile(filePath);


             this.setRequestedOrientation
        (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);


        recorder.setPreviewDisplay(holder.getSurface());
        try {
                        recorder.prepare();
                } catch (IllegalStateException e) {
                        Log.i(this.getClass().toString(),e.getMessage());
                } catch (IOException e) {
                        Log.i(this.getClass().toString(),e.getMessage());
                }
        recorder.start();




    }
}

---------------------------


On May 29, 10:07 am, "[email protected]" <[email protected]>
wrote:
> Hi,
>
> I have a problem similar to zeeshan's. But it doesn't crash, it just
> quits the activity during the recorder.prepare().
> So, I don't even have an execption to give me a clue from where the
> problem come from.
> Could you help me please?
> Thanks
>
> On 22 mai, 17:19, Jason Proctor <[email protected]> wrote:
>
>
>
> > can you log the exception and post it? thanks.
>
> > >I am trying to capture video with the same code above but it crash at
> > >- recorder.prepare();
> > >cant track what is the problem, does anybody come across similar
> > >problem ; any hint?
>
> > >On May 7, 11:50 pm, Jason Proctor <[email protected]> wrote:
> > >>  btw, since streaming movies via HTTP requires the moov atom to be
> > >>  ahead of the mdat atom in the file, it would therefore be handy if
> > >>  MediaRecorderwrote the file like that :-)
>
> > >>  will this be fixed do you think? wondering whether i should just
> > >>  write that piece of code anyway.
>
> > >>  --
> > >>  jason.software.particle
>
> > --
> > jason.software.particle- Hide quoted text -
>
> - Show quoted text -

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

Reply via email to