| OLD | NEW |
| 1 /* | 1 /* |
| 2 * VFW capture interface | 2 * VFW capture interface |
| 3 * Copyright (c) 2006-2008 Ramiro Polla | 3 * Copyright (c) 2006-2008 Ramiro Polla |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 int devnum; | 241 int devnum; |
| 242 int bisize; | 242 int bisize; |
| 243 BITMAPINFO *bi; | 243 BITMAPINFO *bi; |
| 244 CAPTUREPARMS cparms; | 244 CAPTUREPARMS cparms; |
| 245 DWORD biCompression; | 245 DWORD biCompression; |
| 246 WORD biBitCount; | 246 WORD biBitCount; |
| 247 int width; | 247 int width; |
| 248 int height; | 248 int height; |
| 249 int ret; | 249 int ret; |
| 250 | 250 |
| 251 if (!strcmp(s->filename, "list")) { |
| 252 for (devnum = 0; devnum <= 9; devnum++) { |
| 253 char driver_name[256]; |
| 254 char driver_ver[256]; |
| 255 ret = capGetDriverDescription(devnum, |
| 256 driver_name, sizeof(driver_name), |
| 257 driver_ver, sizeof(driver_ver)); |
| 258 if (ret) { |
| 259 av_log(s, AV_LOG_INFO, "Driver %d\n", devnum); |
| 260 av_log(s, AV_LOG_INFO, " %s\n", driver_name); |
| 261 av_log(s, AV_LOG_INFO, " %s\n", driver_ver); |
| 262 } |
| 263 } |
| 264 return AVERROR(EIO); |
| 265 } |
| 266 |
| 251 if(!ap->time_base.den) { | 267 if(!ap->time_base.den) { |
| 252 av_log(s, AV_LOG_ERROR, "A time base must be specified.\n"); | 268 av_log(s, AV_LOG_ERROR, "A time base must be specified.\n"); |
| 253 return AVERROR(EIO); | 269 return AVERROR(EIO); |
| 254 } | 270 } |
| 255 | 271 |
| 256 ctx->hwnd = capCreateCaptureWindow(NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0); | 272 ctx->hwnd = capCreateCaptureWindow(NULL, 0, 0, 0, 0, 0, HWND_MESSAGE, 0); |
| 257 if(!ctx->hwnd) { | 273 if(!ctx->hwnd) { |
| 258 av_log(s, AV_LOG_ERROR, "Could not create capture window.\n"); | 274 av_log(s, AV_LOG_ERROR, "Could not create capture window.\n"); |
| 259 return AVERROR(EIO); | 275 return AVERROR(EIO); |
| 260 } | 276 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 AVInputFormat vfwcap_demuxer = { | 455 AVInputFormat vfwcap_demuxer = { |
| 440 "vfwcap", | 456 "vfwcap", |
| 441 NULL_IF_CONFIG_SMALL("VFW video capture"), | 457 NULL_IF_CONFIG_SMALL("VFW video capture"), |
| 442 sizeof(struct vfw_ctx), | 458 sizeof(struct vfw_ctx), |
| 443 NULL, | 459 NULL, |
| 444 vfw_read_header, | 460 vfw_read_header, |
| 445 vfw_read_packet, | 461 vfw_read_packet, |
| 446 vfw_read_close, | 462 vfw_read_close, |
| 447 .flags = AVFMT_NOFILE, | 463 .flags = AVFMT_NOFILE, |
| 448 }; | 464 }; |
| OLD | NEW |