Commit efd8144e authored by Laurent Aimar's avatar Laurent Aimar

Renamed "deinterlace" into "deinterlace-mode" at the core level.

parent cb6a3f8c
......@@ -595,8 +595,8 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
else if( i_action == ACTIONID_DEINTERLACE && p_vout )
{
vlc_value_t val={0}, val_list, text_list;
var_Get( p_vout, "deinterlace", &val );
if( var_Change( p_vout, "deinterlace", VLC_VAR_GETLIST,
var_Get( p_vout, "deinterlace-mode", &val );
if( var_Change( p_vout, "deinterlace-mode", VLC_VAR_GETLIST,
&val_list, &text_list ) >= 0 )
{
int i;
......@@ -610,7 +610,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
}
}
if( i == val_list.p_list->i_count ) i = 0;
var_SetString( p_vout, "deinterlace",
var_SetString( p_vout, "deinterlace-mode",
val_list.p_list->p_values[i].psz_string );
vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
_("Deinterlace mode: %s"),
......
......@@ -1925,7 +1925,7 @@ end:
var: "video-device" selector: @selector(toggleVar:)];
[o_controls setupVarMenuItem: o_mi_deinterlace target: (vlc_object_t *)p_vout
var: "deinterlace" selector: @selector(toggleVar:)];
var: "deinterlace-mode" selector: @selector(toggleVar:)];
#if 1
[o_controls setupVarMenuItem: o_mi_ffmpeg_pp target:
......
......@@ -209,7 +209,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
ui.hwYUVBox->setVisible( false );
#endif
CONFIG_GENERIC( "deinterlace", StringList, ui.deinterLabel, deinterlaceBox );
CONFIG_GENERIC( "deinterlace-mode", StringList, ui.deinterLabel, deinterlaceBox );
CONFIG_GENERIC( "aspect-ratio", String, ui.arLabel, arLine );
CONFIG_GENERIC_FILE( "snapshot-path", Directory, ui.dirLabel,
......
......@@ -229,7 +229,7 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
PUSH_VAR( "autoscale" );
PUSH_VAR( "aspect-ratio" );
PUSH_VAR( "crop" );
PUSH_VAR( "deinterlace" );
PUSH_VAR( "deinterlace-mode" );
PUSH_VAR( "postprocess" );
return VLC_SUCCESS;
......@@ -571,7 +571,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
ACT_ADDCHECK( current, "autoscale", qtr( "Sca&le" ) );
ACT_ADDMENU( current, "aspect-ratio", qtr( "&Aspect Ratio" ) );
ACT_ADDMENU( current, "crop", qtr( "&Crop" ) );
ACT_ADDMENU( current, "deinterlace", qtr( "&Deinterlace" ) );
ACT_ADDMENU( current, "deinterlace-mode", qtr( "&Deinterlace" ) );
ACT_ADDMENU( current, "postprocess", qtr( "&Post processing" ) );
}
......
......@@ -136,7 +136,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
pi_objects[i++] = p_object;
ppsz_varnames[i] = "zoom";
pi_objects[i++] = p_object;
ppsz_varnames[i] = "deinterlace";
ppsz_varnames[i] = "deinterlace-mode";
pi_objects[i++] = p_object;
ppsz_varnames[i] = "aspect-ratio";
pi_objects[i++] = p_object;
......@@ -328,7 +328,7 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu )
#endif
ppsz_varnames[i] = "zoom";
pi_objects[i++] = p_object;
ppsz_varnames[i] = "deinterlace";
ppsz_varnames[i] = "deinterlace-mode";
pi_objects[i++] = p_object;
ppsz_varnames[i] = "aspect-ratio";
pi_objects[i++] = p_object;
......
......@@ -627,7 +627,7 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int b_enable,
|| !strcmp(psz_mode, "mean") || !strcmp(psz_mode, "x") )
{
/* set deinterlace filter chosen */
var_SetString( p_vout, "deinterlace", psz_mode );
var_SetString( p_vout, "deinterlace-mode", psz_mode );
}
else
{
......@@ -638,7 +638,7 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int b_enable,
else
{
/* disable deinterlace filter */
var_SetString( p_vout, "deinterlace", "" );
var_SetString( p_vout, "deinterlace-mode", "" );
}
vlc_object_release( p_vout );
......
......@@ -451,14 +451,14 @@ static const char *const ppsz_align_descriptions[] =
"Hide mouse cursor and fullscreen controller after " \
"n milliseconds, default is 3000 ms (3 sec.)")
#define DEINTERLACE_TEXT N_("Deinterlace mode")
#define DEINTERLACE_LONGTEXT N_( \
#define DEINTERLACE_MODE_TEXT N_("Deinterlace mode")
#define DEINTERLACE_MODE_LONGTEXT N_( \
"Deinterlace method to use for video processing.")
static const char * const ppsz_deinterlace[] = {
static const char * const ppsz_deinterlace_mode[] = {
"", "discard", "blend", "mean", "bob",
"linear", "x", "yadif", "yadif2x"
};
static const char * const ppsz_deinterlace_text[] = {
static const char * const ppsz_deinterlace_mode_text[] = {
N_("Disable"), N_("Discard"), N_("Blend"), N_("Mean"), N_("Bob"),
N_("Linear"), "X", "Yadif", "Yadif (2x)"
};
......@@ -1677,9 +1677,9 @@ vlc_module_begin ()
add_integer( "align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT, true )
change_integer_list( pi_align_values, ppsz_align_descriptions, NULL )
add_float( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT, true )
add_string( "deinterlace", "", NULL,
DEINTERLACE_TEXT, DEINTERLACE_LONGTEXT, false )
change_string_list( ppsz_deinterlace, ppsz_deinterlace_text, 0 )
add_string( "deinterlace-mode", "", NULL,
DEINTERLACE_MODE_TEXT, DEINTERLACE_MODE_LONGTEXT, false )
change_string_list( ppsz_deinterlace_mode, ppsz_deinterlace_mode_text, 0 )
change_safe()
set_subcategory( SUBCAT_VIDEO_VOUT )
......
......@@ -1906,8 +1906,8 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
input_thread_t *p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT );
if( p_input )
{
var_Create( p_input, "deinterlace", VLC_VAR_STRING );
var_SetString( p_input, "deinterlace", *p_mode->psz_mode ? p_mode->psz_mode : "disable" );
var_Create( p_input, "deinterlace-mode", VLC_VAR_STRING );
var_SetString( p_input, "deinterlace-mode", *p_mode->psz_mode ? p_mode->psz_mode : "disable" );
var_Create( p_input, "filter-deinterlace-mode", VLC_VAR_STRING );
var_SetString( p_input, "filter-deinterlace-mode", p_mode->psz_mode );
......@@ -1963,21 +1963,21 @@ static void DeinterlaceEnable( vout_thread_t *p_vout )
msg_Dbg( p_vout, "Deinterlacing available" );
/* Create the configuration variable */
var_Create( p_vout, "deinterlace", VLC_VAR_STRING | VLC_VAR_DOINHERIT | VLC_VAR_HASCHOICE );
char *psz_deinterlace = var_GetNonEmptyString( p_vout, "deinterlace" );
var_Create( p_vout, "deinterlace-mode", VLC_VAR_STRING | VLC_VAR_DOINHERIT | VLC_VAR_HASCHOICE );
char *psz_deinterlace = var_GetNonEmptyString( p_vout, "deinterlace-mode" );
text.psz_string = _("Deinterlace");
var_Change( p_vout, "deinterlace", VLC_VAR_SETTEXT, &text, NULL );
text.psz_string = _("Deinterlace mode");
var_Change( p_vout, "deinterlace-mode", VLC_VAR_SETTEXT, &text, NULL );
const module_config_t *p_opt = config_FindConfig( VLC_OBJECT(p_vout), "deinterlace" );
var_Change( p_vout, "deinterlace", VLC_VAR_CLEARCHOICES, NULL, NULL );
const module_config_t *p_opt = config_FindConfig( VLC_OBJECT(p_vout), "deinterlace-mode" );
var_Change( p_vout, "deinterlace-mode", VLC_VAR_CLEARCHOICES, NULL, NULL );
for( int i = 0; p_opt && i < p_opt->i_list; i++ )
{
val.psz_string = p_opt->ppsz_list[i];
text.psz_string = (char*)vlc_gettext(p_opt->ppsz_list_text[i]);
var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
var_Change( p_vout, "deinterlace-mode", VLC_VAR_ADDCHOICE, &val, &text );
}
var_AddCallback( p_vout, "deinterlace", DeinterlaceCallback, NULL );
var_AddCallback( p_vout, "deinterlace-mode", DeinterlaceCallback, NULL );
/* */
char *psz_mode = psz_deinterlace;
......@@ -1994,7 +1994,7 @@ static void DeinterlaceEnable( vout_thread_t *p_vout )
else if( DeinterlaceIsPresent( p_vout, false ) )
psz_mode = var_CreateGetNonEmptyString( p_vout, "sout-deinterlace-mode" );
}
var_SetString( p_vout, "deinterlace", psz_mode ? psz_mode : "" );
var_SetString( p_vout, "deinterlace-mode", psz_mode ? psz_mode : "" );
free( psz_mode );
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment