[vlc-devel] Add frequency and video standard options in dshow - rev2

Manol Manolov man40dev at gmail.com
Thu Aug 5 23:31:44 CEST 2010


  Hi,
rev 3.

> Are the new definitions copied verbatim from a copyright header or are they
> rewritten from scratch? I am not sure we can include say, MSVC headers into
> VLC legally.
>
> Did you try to get the necessary update to MingW folks?
I rewrote them from scratch.
> +const GUID PROPSETID_TUNER = {0x6a2e0605, 0x28e4, 0x11d0, {0xa1, 0x8c, 0x00,
> 0xa0, 0xc9, 0x11, 0x89, 0x56}};
>
> How about adding a static qualifier?
Done!
>       var_Create( p_this, "dshow-tuner-country",
>                   VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
>       var_Create( p_this, "dshow-tuner-input",
> @@ -2227,11 +2277,15 @@ static void ConfigTuner( vlc_object_t *p_this,
> ICaptureGraphBuilder2 *p_graph,
>       i_country = var_GetInteger( p_this, "dshow-tuner-country" );
>       i_input = var_GetInteger( p_this, "dshow-tuner-input" );
>       i_amtuner_mode = var_GetInteger( p_this, "dshow-amtuner-mode" );
> +    i_frequency = var_GetInteger( p_this, "dshow-tuner-frequency" );
> +    i_standard =
> +        i_standards_list[var_CreateGetInteger( p_this, "dshow-tuner-standard"
> )];
>
> You should really not need to 'Create' the variable again here.
>
> Also, for good measure, you should probably check that the value is within the
> boundary of the table. But I don't understand why you need that level of
> indirection at all??
No need to check the value here. later I check against the supported 
values of the tuner device.
Also changed to direct cast: i_standard = var_GetInteger .....
I keep var_Create because the code looks more consistent. The whole 
module has to be rewritten anyway some day...
There are other issues, but I prefer to keep it homogeneous.
> I guess you are leaking p_TV here.
I fixed the leaks of p_TV and p_KS.

-- 
Best regards,
Manol

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-frequency-and-video-standard-to-dshow.patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100805/cc2c731b/attachment.ksh>


More information about the vlc-devel mailing list