diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-10-23 02:11:30 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-10-23 02:11:30 +0000 |
commit | 1973e1018e966d3f33cf3ed1e358b54344637945 (patch) | |
tree | 2f7e25547d89bb1d5b0eca48178b581dbe3f1004 /libavdevice/vfwcap.c | |
parent | 2aa72ecccc0610f49d3883e401202e95afc5d2a4 (diff) | |
download | ffmpeg-1973e1018e966d3f33cf3ed1e358b54344637945.tar.gz |
vfwcap: add option to print list of supported drivers
Originally committed as revision 25552 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/vfwcap.c')
-rw-r--r-- | libavdevice/vfwcap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c index 13aaad92ef..7b54490fbb 100644 --- a/libavdevice/vfwcap.c +++ b/libavdevice/vfwcap.c @@ -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); |