简体   繁体   English

MediaRecorder:IOexception准备失败错误。 请帮帮我

[英]MediaRecorder : IOexception prepare failed error . Help me please

Oh.. i always have error in prepare (of mediarecorder). 哦..我总是在准备(媒体记录器)时出错。 Error tell me what prepare failed i can't record not audio, not video (( 错误告诉我什么准备失败了,我不能录制音频,视频((
/* / *

 ERROR/audio_input(34): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
02-02 12:59:04.813: ERROR/audio_input(34): VerifyAndSetParameter failed

*/ this error what always i have ((( Please can anyone help me.. i realy need help. How to fix this. I tested many examples.. i watch many post's here - but nothing not help me. Guys - Help please :(((( Regards, Peter. ps sorry for my bad english - hope you understand me. * /此错误是我一直都会遇到的问题((((任何人都可以帮助我。.我真的需要帮助。如何解决此问题。我测试了很多示例。.我在这里看了很多帖子-但是没有帮助我。伙计们-请帮助:(((((问候,彼得。对不起,我的英语不好-希望您能理解我。

02-02 12:59:04.623: DEBUG/dalvikvm(9334): GC_FOR_MALLOC freed 4 objects / 307296 bytes in 69ms
02-02 12:59:04.813: ERROR/audio_input(34): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
02-02 12:59:04.813: ERROR/audio_input(34): VerifyAndSetParameter failed
02-02 12:59:04.833: ERROR/CameraInput(34): Unsupported parameter(x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value)
02-02 12:59:04.833: ERROR/CameraInput(34): VerifiyAndSetParameter failed on parameter #0
02-02 12:59:04.873: WARN/AuthorDriver(34): Video encoding bit rate is set to 320000 bps
02-02 12:59:04.933: INFO/MediaRecorderJNI(9334): prepare: surface=0x20fad8 (id=1)
02-02 12:59:04.943: ERROR/PVOMXEncNode(34): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle 
02-02 12:59:04.973: ERROR/CameraInput(34): Camera is not available
02-02 12:59:04.973: ERROR/AuthorDriver(34): Command 13 completed with error -1
02-02 12:59:04.983: ERROR/MediaRecorder(9334): prepare failed: -1
02-02 12:59:06.273: DEBUG/dalvikvm(9334): GC_FOR_MALLOC freed 201 objects / 319048 bytes in 190ms

yeah, sorry forgot about code : code here function : 是的,很抱歉忘记了代码:这里的代码功能:

private MediaRecorder mediaRecorder;
    private File file = null;
    static final String PREFIX = "record";
    static final String EXTENSION = ".3gpp";
    private void startRecording() throws Exception {
            mediaRecorder = new MediaRecorder();
            mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
            mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
            mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
            if (file == null) {
                File rootDir = Environment.getExternalStorageDirectory();
                file = File.createTempFile(PREFIX, EXTENSION, rootDir);
            }
            mediaRecorder.setOutputFile(file.getAbsolutePath());
            mediaRecorder.prepare();
            mediaRecorder.start();
            Log.i("Start","RECORD STARTED");
        }

so.. i never see message("record started") in logcat ((,if add videosurse and videoencode - i have error in IOException - prepare failed. I always have erros and can't find anything what can help me to solved this problem :( . I read more post's about it - and more guys have too problem.. but other guys - have not problem and all be ok. Now im try only record audio - my emulator is handsup, and in logcat i see only erros what i write before function code. :'( 所以..我从没在logcat中看到message(“记录已开始”)((如果添加videourse和videoencode-我在IOException中有错误-准备失败。我总是有错误,并且找不到任何能帮助我解决此问题的方法问题:(。我阅读了更多有关它的文章-还有更多的人也有问题..但是其他人-没问题,都还可以。现在我尝试只录制音频-我的模拟器是动手操作,在logcat中我只能看到错误我在功能代码之前写的内容。:'(

oh.. android v 2.2 im programming in exclipse galileo 哦..expressse galileo中的android v 2.2 im编程

red colors of errors only here : 错误的红色仅在这里:

02-03 13:36:22.783: ERROR/audio_input(34): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
02-03 13:36:22.783: ERROR/audio_input(34): VerifyAndSetParameter failed
02-03 13:36:23.004: ERROR/PVOMXEncNode(34): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle 
02-03 13:36:23.073: ERROR/AudioFlinger(34): Error reading audio input

ps edited : After updating eclipse and android sdk (all patch's and other function which aviable for downloads. My camera on "all" emulators work perfectly . I can test record/capture photo/ just review on camera. One minus - if bug with preview (green lines or other similar ) than this not showing in emulator. But bugs with rotation ( when on preview all ok and than click on capture or record video we can see what our screen rotated on 90 degree) can be fixed. Hope it's help :) ps编辑:更新eclipse和android sdk(所有补丁程序和其他可供下载的功能)后,我在“所有”模拟器上的相机都可以正常工作。我可以测试记录/捕获的照片/仅在相机上查看。 (绿线或其他类似符号),但没有在模拟器中显示。但可以修复带有旋转的错误(在预览时一切正常,然后单击捕获或录制视频,我们可以看到屏幕旋转了90度)。希望对您有所帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM