[SCM] libav/experimental: vfwcap: add option to print list of supported drivers
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:18:01 UTC 2013
The following commit has been merged in the experimental branch:
commit 1973e1018e966d3f33cf3ed1e358b54344637945
Author: Ramiro Polla <ramiro.polla at gmail.com>
Date: Sat Oct 23 02:11:30 2010 +0000
vfwcap: add option to print list of supported drivers
Originally committed as revision 25552 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 13aaad9..7b54490 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);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list