[vlc-devel] [PATCH 3/3] DVB-S scanning support
Rémi Denis-Courmont
remi at remlab.net
Thu Aug 5 18:24:46 CEST 2010
Le lundi 2 août 2010 17:26:05 David Kaplan, vous avez écrit :
> @@ -869,6 +898,7 @@ static void VarInit( access_t *p_access )
> var_Create( p_access, "dvb-budget-mode", VLC_VAR_BOOL |
> VLC_VAR_DOINHERIT );
>
> /* */
> + var_Create( p_access, "dvb-satellite", VLC_VAR_STRING |
> VLC_VAR_DOINHERIT ); var_Create( p_access, "dvb-satno", VLC_VAR_INTEGER |
> VLC_VAR_DOINHERIT ); var_Create( p_access, "dvb-voltage", VLC_VAR_INTEGER
> | VLC_VAR_DOINHERIT ); var_Create( p_access, "dvb-high-voltage",
> VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); @@ -926,6 +956,18 @@ static int
> ParseMRL( access_t *p_access )
> var_Set( p_access, "dvb-" option, val );
> \ }
>
> +#define GET_OPTION_STRING( option )
> \ + if ( !strncmp( psz_parser, option "=", strlen( option "=" ) ) )
> \ + {
> \ + psz_parser += strlen( option "=" );
> \ + val.psz_string = psz_parser;
> \ + char *p_save;
> \ + char *tok = strtok_r(val.psz_string, ":",
> &p_save); \ + val.psz_string[tok - val.psz_string -
> 1] = 0; \ + var_Set( p_access, "dvb-" option,
> val ); \ + psz_parser += strlen(
> val.psz_string ); \ + }
var_SetString() would be nicer.
I have no objection to this patch at the code level, but I am not very
familiar with DVB-S. I think you should really provide a choice list for the
satellite configuration option, though.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list