[MPlayer-dev-eng] [PATCH] Fix capture width/height selection in tvi_dshow
Vladimir Voroshilov
voroshil at gmail.com
Sat Mar 2 04:46:09 CET 2013
Hi, All
Attached patch fixes capture resolution selection in tvi_dshow by
specifying width/height via -tv argument in command line.
Problem was fixed by implementing TVI_CONTROL_VID_SET_WIDTH_HEIGHT ioctl.
Existing code is not able to change resolution if driver presents
supported modes (format+resolution) as separate format structures with
fixed width/height each. It tries to change width or height in bounds
of provided min/max values within the same format.
New ioctl searches is all detected formats for one with the same
FourCC (as was set previously by TVI_SET_FORMAT ioctl) and
appropriate width/height bounds (according to requested width/height).
If no such format found it leaves selected format untouched.
Patch was tested under Windows 7 with noname Video Webcam (vid 0x04F2
pid 0xB044) and
Philips SPC 1030NC Webcam.
I'm not sure about formatting/spaces in the patch since wrote it under
windows box.
Please review
--
Vladimir Voroshilovmailto:voroshil at gmail.com
Jabber:voroshil at gmail.com
ICQ: 95587719
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix_tvi_dshow_resolution_change.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130302/94ed19f3/attachment.ksh>
More information about the MPlayer-dev-eng
mailing list