forked from FFmpeg/FFmpeg
vfwcap: add option to print list of supported drivers
Originally committed as revision 25552 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2aa72ecccc
commit
1973e1018e
1 changed files with 16 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue