[MPlayer-dev-eng] [PATCH] Fix capture width/height selection in tvi_dshow

Vladimir Voroshilov voroshil at gmail.com
Sat May 4 08:17:52 CEST 2013


Hi again, All

> [...]
>
> I think the behaviour would be more consistent if this was a function
> and also used from SET_WIDTH and SET_HEIGHT, in the way that
> SET_WIDTH would call it with (new width, old height)
>
> [...]
>
> You can probably even put all of this code into that function, and
> thus avoid having things like the Min/Max size validation duplicated
> between those different SET_ functions.
> Or alternatively, if the SET_WIDTH and SET_HEIGHT are actually
> not used at all any more after this change (I didn't double-check
> how all this works) then just removing them might be an option, too.
> Still, I am a fan of using lots of functions, they tend to make
> the code much easier to understand.

This is second version of patch.
As suggested by Reimar i've implemented changing width/height via
separated routine.
Moreover i've also extracted checking width/height into separate
routines - this slighty imporoved routine readability.


-- 
Vladimir Voroshilov     mailto:voroshil at gmail.com
Jabber: voroshil at gmail.com
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-remove-unused-width-height-in-check_video_format.patch
Type: application/octet-stream
Size: 1567 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130504/7ff3e9d6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-implement-separated-check_width-check_height.patch
Type: application/octet-stream
Size: 3292 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130504/7ff3e9d6/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-implement-single-routine-for-setting-width-height.patch
Type: application/octet-stream
Size: 4937 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130504/7ff3e9d6/attachment-0002.obj>


More information about the MPlayer-dev-eng mailing list