[MPlayer-dev-eng] [PATCH] [RFC] remove -vop
Diego Biurrun
diego at biurrun.de
Mon Nov 13 14:07:42 CET 2006
This has been a looong time in coming. Here is a patch that finally
removes -vop, it has been officially replaced by -vf for years now.
Let me know if I overlooked something and/or if there are objections,
otherwise I intend to commit this soon.
Diego
-------------- next part --------------
Index: cfg-common.h
===================================================================
--- cfg-common.h (revision 20879)
+++ cfg-common.h (working copy)
@@ -197,7 +197,7 @@
{"af-adv", audio_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
{"af", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
- {"vop*", &vo_plugin_args, CONF_TYPE_OBJ_SETTINGS_LIST, 0, 0, 0,&vf_obj_list },
+ {"vop", "-vop is deprecated, use -vf instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL},
{"vf*", &vf_settings, CONF_TYPE_OBJ_SETTINGS_LIST, 0, 0, 0, &vf_obj_list},
// select audio/video codec (by name) or codec family (by number):
// {"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync
@@ -555,8 +555,6 @@
{"type", &mf_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
-
-extern m_obj_settings_t* vo_plugin_args;
#include "libaf/af.h"
extern af_cfg_t af_cfg; // Audio filter configuration, defined in libmpcodecs/dec_audio.c
Index: libmpcodecs/vf.c
===================================================================
--- libmpcodecs/vf.c (revision 20879)
+++ libmpcodecs/vf.c (working copy)
@@ -200,8 +200,6 @@
// For the vf option
m_obj_settings_t* vf_settings = NULL;
-// For the vop option
-m_obj_settings_t* vo_plugin_args = NULL;
m_obj_list_t vf_obj_list = {
(void**)filter_list,
M_ST_OFF(vf_info_t,name),
@@ -275,7 +273,7 @@
w2=(mp_imgflag&MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE)?((w+15)&(~15)):w;
if(vf->put_image==vf_next_put_image){
- // passthru mode, if the plugin uses the fallback/default put_image() code
+ // passthru mode, if the filter uses the fallback/default put_image() code
return vf_get_image(vf->next,outfmt,mp_imgtype,mp_imgflag,w,h);
}
@@ -699,7 +697,6 @@
vf_instance_t* vf;
int i;
- // -vf take precedence over -vop
if(vf_settings) {
// We want to add them in the 'right order'
for(i = 0 ; vf_settings[i].name ; i++)
@@ -709,12 +706,6 @@
vf = vf_open_filter(last,vf_settings[i].name,vf_settings[i].attribs);
if(vf) last=vf;
}
- } else if(vo_plugin_args) {
- for(i = 0 ; vo_plugin_args[i].name ; i++) {
- vf = vf_open_filter(last,vo_plugin_args[i].name,
- vo_plugin_args[i].attribs);
- if(vf) last=vf;
- }
}
return last;
}
@@ -737,11 +728,3 @@
vf=next;
}
}
-
-void vf_list_plugins(void){
- int i=0;
- while(filter_list[i]){
- mp_msg(MSGT_VFILTER,MSGL_INFO,"\t%-10s: %s\n",filter_list[i]->name,filter_list[i]->info);
- i++;
- }
-}
Index: libmpcodecs/vf.h
===================================================================
--- libmpcodecs/vf.h (revision 20879)
+++ libmpcodecs/vf.h (working copy)
@@ -111,8 +111,6 @@
vf_instance_t* append_filters(vf_instance_t* last);
-void vf_list_plugins(void);
-
void vf_uninit_filter(vf_instance_t* vf);
void vf_uninit_filter_chain(vf_instance_t* vf);
Index: Gui/interface.c
===================================================================
--- Gui/interface.c (revision 20879)
+++ Gui/interface.c (working copy)
@@ -425,7 +425,6 @@
extern int frame_dropping;
extern int stream_dump_type;
extern int vcd_track;
-extern m_obj_settings_t*vo_plugin_args;
#if defined( USE_OSD ) || defined( USE_SUB )
void guiLoadFont( void )
@@ -520,40 +519,6 @@
}
#endif
-static void add_vop( char * str )
-{
- mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_AddingVideoFilter,str );
- if ( vo_plugin_args )
- {
- int i = 0;
- while ( vo_plugin_args[i].name ) if ( !gstrcmp( vo_plugin_args[i++].name,str ) ) { i=-1; break; }
- if ( i != -1 )
- { vo_plugin_args=realloc( vo_plugin_args,( i + 2 ) * sizeof( m_obj_settings_t ) ); vo_plugin_args[i].name=strdup( str );vo_plugin_args[i].attribs = NULL; vo_plugin_args[i+1].name=NULL; }
- } else { vo_plugin_args=malloc( 2 * sizeof( m_obj_settings_t ) ); vo_plugin_args[0].name=strdup( str );vo_plugin_args[0].attribs = NULL; vo_plugin_args[1].name=NULL; }
-}
-
-static void remove_vop( char * str )
-{
- int n = 0;
-
- if ( !vo_plugin_args ) return;
-
- mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_RemovingVideoFilter,str );
-
- while ( vo_plugin_args[n++].name ); n--;
- if ( n > -1 )
- {
- int i = 0,m = -1;
- while ( vo_plugin_args[i].name ) if ( !gstrcmp( vo_plugin_args[i++].name,str ) ) { m=i - 1; break; }
- i--;
- if ( m > -1 )
- {
- if ( n == 1 ) { free( vo_plugin_args[0].name );free( vo_plugin_args[0].attribs ); free( vo_plugin_args ); vo_plugin_args=NULL; }
- else { free( vo_plugin_args[i].name );free( vo_plugin_args[i].attribs ); memcpy( &vo_plugin_args[i],&vo_plugin_args[i + 1],( n - i ) * sizeof( m_obj_settings_t ) ); }
- }
- }
-}
-
int guiGetEvent( int type,char * arg )
{
stream_t * stream = (stream_t *) arg;
@@ -817,23 +782,13 @@
}
#ifdef HAVE_DXR3
-#ifdef USE_LIBAVCODEC
- remove_vop( "lavc" );
-#endif
if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) )
{
if ( ( guiIntfStruct.StreamType != STREAMTYPE_DVD)&&( guiIntfStruct.StreamType != STREAMTYPE_VCD ) )
{
-#ifdef USE_LIBAVCODEC
- if ( gtkVopLAVC ) add_vop( "lavc" );
-#endif
}
}
#endif
-// ---
- if ( gtkVopPP ) add_vop( "pp" );
- else remove_vop( "pp" );
-
// --- audio opts
// if ( ao_plugin_cfg.plugin_list ) { free( ao_plugin_cfg.plugin_list ); ao_plugin_cfg.plugin_list=NULL; }
if (gtkAONorm)
Index: Gui/win32/interface.c
===================================================================
--- Gui/win32/interface.c (revision 20879)
+++ Gui/win32/interface.c (working copy)
@@ -42,7 +42,6 @@
#include <cdio/cdio.h>
#endif
-extern m_obj_settings_t* vo_plugin_args;
extern vo_functions_t *video_out;
extern ao_functions_t *audio_out;
extern void exit_player(const char *how);
@@ -480,73 +479,6 @@
cfg_write();
}
-static void add_vop(char * str)
-{
- mp_msg(MSGT_GPLAYER, MSGL_STATUS, MSGTR_AddingVideoFilter, str);
- if (vo_plugin_args)
- {
- int i = 0;
- while (vo_plugin_args[i].name)
- if (!strcmp(vo_plugin_args[i++].name, str))
- {
- i = -1;
- break;
- }
- if (i != -1)
- {
- vo_plugin_args = realloc(vo_plugin_args, (i + 2) * sizeof(m_obj_settings_t));
- vo_plugin_args[i].name = strdup(str);
- vo_plugin_args[i].attribs = NULL;
- vo_plugin_args[i + 1].name = NULL;
- }
- }
- else
- {
- vo_plugin_args = malloc(2 * sizeof(m_obj_settings_t));
- vo_plugin_args[0].name = strdup(str);
- vo_plugin_args[0].attribs = NULL;
- vo_plugin_args[1].name = NULL;
- }
-}
-
-static void remove_vop(char * str)
-{
- int n = 0;
- if (!vo_plugin_args ) return;
-
- mp_msg(MSGT_GPLAYER,MSGL_STATUS, MSGTR_RemovingVideoFilter, str);
-
- while (vo_plugin_args[n++].name);
- n--;
- if ( n > -1 )
- {
- int i = 0, m = -1;
- while (vo_plugin_args[i].name)
- if (!strcmp(vo_plugin_args[i++].name, str))
- {
- m = i - 1;
- break;
- }
- i--;
- if (m > -1)
- {
- if (n == 1)
- {
- free(vo_plugin_args[0].name);
- free(vo_plugin_args[0].attribs);
- free(vo_plugin_args);
- vo_plugin_args=NULL;
- }
- else
- {
- free(vo_plugin_args[i].name);
- free(vo_plugin_args[i].attribs);
- memcpy(&vo_plugin_args[i], &vo_plugin_args[i + 1], (n - i) * sizeof(m_obj_settings_t));
- }
- }
- }
-}
-
/* this function gets called by mplayer to update the gui */
int guiGetEvent(int type, char *arg)
{
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1 (revision 20879)
+++ DOCS/man/en/mplayer.1 (working copy)
@@ -4879,12 +4879,6 @@
.B \-vf <filter1[=parameter1:parameter2:...],filter2,...>
Setup a chain of video filters.
.
-.TP
-.B \-vop <...,filter2[=parameter1:parameter2:...],filter1> (OBSOLETE)
-Setup a chain of video filters, to be applied in
-.B reverse
-order.
-Deprecated in favor of \-vf.
.PP
Many parameters are optional and set to default values if omitted.
To explicitly use a default value set a parameter to '-1'.
More information about the MPlayer-dev-eng
mailing list