摄像机服务器死亡!开始录音时错误100

本文关键字:录音 错误 开始 服务器 摄像机 | 更新日期: 2023-09-27 18:02:41

注意:我使用Monodroid,期望c#代码。

当_recorder.Start()被调用时,我面临这个错误。

代码:

private void IniciarGrabacion()
{
    try
    {
        CamcorderProfile camProfile = CamcordeProfile.Get(CamcorderQuality.High);
        String outputFile = "/sdcard/trompiz.mp4";
        _camera.Unlock ();
        _recorder = new MediaRecorder();
        _recorder.SetCamera(_camera);
        _recorder.SetAudioSource(AudioSource.Default);
        _recorder.SetVideoSource(VideoSource.Camera);
        _recorder.SetProfile(camProfile);
        _recorder.SetOutputFile(outputFile);
        _recorder.SetPreviewDisplay(_preview.Holder.Surface);
        _recorder.Prepare();
        _recorder.Start(); // HERE IS WHERE THE ERROR APPEARS
    }
    catch(Exception ex)
    {
        string error = "Error starting Recording: " + ex.Message;
        Log.Debug("ERROR",error);
        Toast.MakeText(Application, error, ToastLength.Long).Show();
    }
}

outputFile是硬编码的,因为我还在测试。我可以确认它的存在,因为它已经创建了

摄像机服务器死亡!开始录音时错误100

我刚刚发现了问题所在。关键不在于摄像机的操作。是Profile设置。

CamcorderProfile camProfile = CamcordeProfile.Get(CamcorderQuality.High);

可能是设备错误,但我不能将其设置为高。为了使其工作,我将其更改为LOW。

CamcorderProfile camProfile = CamcordeProfile.Get(CamcorderQuality.Low);

我有一个Zenithink C93 Z283 (H6_2f)

我希望这能帮助到其他与之斗争的人。

现在我得看看如何用高质量录制。我知道我可以,因为本机相机应用记录在高....