Commit 1973e101 authored by Ramiro Polla's avatar Ramiro Polla

vfwcap: add option to print list of supported drivers

Originally committed as revision 25552 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2aa72ecc
......@@ -248,6 +248,22 @@ static int vfw_read_header(AVFormatContext *s, AVFormatParameters *ap)
int height;
int ret;
if (!strcmp(s->filename, "list")) {
for (devnum = 0; devnum <= 9; devnum++) {
char driver_name[256];
char driver_ver[256];
ret = capGetDriverDescription(devnum,
driver_name, sizeof(driver_name),
driver_ver, sizeof(driver_ver));
if (ret) {
av_log(s, AV_LOG_INFO, "Driver %d\n", devnum);
av_log(s, AV_LOG_INFO, " %s\n", driver_name);
av_log(s, AV_LOG_INFO, " %s\n", driver_ver);
}
}
return AVERROR(EIO);
}
if(!ap->time_base.den) {
av_log(s, AV_LOG_ERROR, "A time base must be specified.\n");
return AVERROR(EIO);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment