avformat_open_input(&format_ctx, filename, inputFmt, NULL)方法打开摄像头,返回:Not a typew
使用ffmpeg在安卓版打开usb摄像头,请问是什么原因造成的?
av_register_all();
avdevice_register_all();
const char* filename = "/dev/video0";
AVInputFormat *inputFmt = av_find_input_format ("video4linux2");
if( (ret = avformat_open_input(&format_ctx, filename, inputFmt, NULL)) < 0 )
{
printf("Cann't open the file: %s, %d \n", strerror(error), ret);
return -1;
}
使用avformat_open_input(&format_ctx, filename, inputFmt, NULL)方法打开摄像头的时候出错了,错误信息是:Cann't open the file: Not a typewriter , (-22)
请问这是什么原因造成的?