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

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat May 4 08:36:22 CEST 2013



On 04.05.2013, at 08:17, Vladimir Voroshilov <voroshil at gmail.com> wrote:

> 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.

I didn't review it carefully, but I think it looks fairly nice, great work!


More information about the MPlayer-dev-eng mailing list