[Mplayer-cvslog] CVS: main/libmpcodecs vf.c,1.74,1.75 vf.h,1.17,1.18 vf_1bpp.c,1.3,1.4 vf_2xsai.c,1.2,1.3 vf_bmovl.c,1.6,1.7 vf_boxblur.c,1.2,1.3 vf_crop.c,1.10,1.11 vf_cropdetect.c,1.6,1.7 vf_denoise3d.c,1.5,1.6 vf_detc.c,1.2,1.3 vf_dint.c,1.2,1.3 vf_down3dright.c,1.1,1.2 vf_dvbscale.c,1.1,1.2 vf_eq.c,1.5,1.6 vf_eq2.c,1.5,1.6 vf_expand.c,1.21,1.22 vf_fame.c,1.9,1.10 vf_field.c,1.2,1.3 vf_flip.c,1.10,1.11 vf_format.c,1.9,1.10 vf_halfpack.c,1.4,1.5 vf_hqdn3d.c,1.1,1.2 vf_il.c,1.4,1.5 vf_lavc.c,1.11,1.12 vf_lavcdeint.c,1.6,1.7 vf_mirror.c,1.6,1.7 vf_noise.c,1.10,1.11 vf_palette.c,1.9,1.10 vf_perspective.c,1.1,1.2 vf_pp.c,1.25,1.26 vf_rectangle.c,1.7,1.8 vf_rgb2bgr.c,1.5,1.6 vf_rotate.c,1.7,1.8 vf_sab.c,1.2,1.3 vf_scale.c,1.33,1.34 vf_smartblur.c,1.3,1.4 vf_swapuv.c,1.2,1.3 vf_telecine.c,1.1,1.2 vf_test.c,1.4,1.5 vf_tfields.c,1.1,1.2 vf_unsharp.c,1.3,1.4 vf_vo.c,1.22,1.23 vf_yuy2.c,1.5,1.6 vf_yvu9.c,1.4,1.5
Alban Bedel CVS
albeu at mplayerhq.hu
Sat Mar 15 19:01:17 CET 2003
- Previous message: [Mplayer-cvslog] CVS: main/loader win32.c,1.76,1.77
- Next message: [Mplayer-cvslog] CVS: main cfg-common.h,1.84,1.85 m_config.c,1.5,1.6 m_option.c,1.6,1.7 m_option.h,1.3,1.4 mplayer.c,1.684,1.685
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv1650/libmpcodecs
Modified Files:
vf.c vf.h vf_1bpp.c vf_2xsai.c vf_bmovl.c vf_boxblur.c
vf_crop.c vf_cropdetect.c vf_denoise3d.c vf_detc.c vf_dint.c
vf_down3dright.c vf_dvbscale.c vf_eq.c vf_eq2.c vf_expand.c
vf_fame.c vf_field.c vf_flip.c vf_format.c vf_halfpack.c
vf_hqdn3d.c vf_il.c vf_lavc.c vf_lavcdeint.c vf_mirror.c
vf_noise.c vf_palette.c vf_perspective.c vf_pp.c
vf_rectangle.c vf_rgb2bgr.c vf_rotate.c vf_sab.c vf_scale.c
vf_smartblur.c vf_swapuv.c vf_telecine.c vf_test.c
vf_tfields.c vf_unsharp.c vf_vo.c vf_yuy2.c vf_yvu9.c
Log Message:
Add the new -vf option wich is the same as vop in reverse order.
Syntax is we decided, so you can give the nomes or not with both
vop and vf. vf take precedence over vop.
Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- vf.c 5 Mar 2003 10:23:52 -0000 1.74
+++ vf.c 15 Mar 2003 18:01:02 -0000 1.75
@@ -9,6 +9,8 @@
#include "../mp_msg.h"
#include "../help_mp.h"
+#include "../m_option.h"
+#include "../m_struct.h"
#include "img_format.h"
@@ -60,8 +62,6 @@
extern vf_info_t vf_info_telecine;
extern vf_info_t vf_info_tfields;
-char** vo_plugin_args=(char**) NULL;
-
// list of available filters:
static vf_info_t* filter_list[]={
&vf_info_rectangle,
@@ -116,6 +116,17 @@
NULL
};
+// 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),
+ M_ST_OFF(vf_info_t,info),
+ M_ST_OFF(vf_info_t,opts)
+};
+
//============================================================================
// mpi stuff:
@@ -306,7 +317,7 @@
return vf_next_query_format(vf,fmt);
}
-vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char *args){
+vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char **args){
vf_instance_t* vf;
int i;
for(i=0;;i++){
@@ -326,18 +337,48 @@
vf->put_image=vf_next_put_image;
vf->default_caps=VFCAP_ACCEPT_STRIDE;
vf->default_reqs=0;
- if(vf->info->open(vf,args)>0) return vf; // Success!
+ if(vf->info->opts) { // vf_vo get some special argument
+ m_struct_t* st = vf->info->opts;
+ void* vf_priv = m_struct_alloc(st);
+ int n;
+ for(n = 0 ; args && args[2*n] ; n++)
+ m_struct_set(st,vf_priv,args[2*n],args[2*n+1]);
+ vf->priv = vf_priv;
+ args = NULL;
+ } else // Otherwise we should have the '_oldargs_'
+ if(args && !strcmp(args[0],"_oldargs_"))
+ args = (char**)args[1];
+ else
+ args = NULL;
+ if(vf->info->open(vf,(char*)args)>0) return vf; // Success!
free(vf);
mp_msg(MSGT_VFILTER,MSGL_ERR,MSGTR_CouldNotOpenVideoFilter,name);
return NULL;
}
-vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char *args){
- if(strcmp(name,"vo"))
- mp_msg(MSGT_VFILTER,MSGL_INFO,
- args ? MSGTR_OpeningVideoFilter "[%s=%s]\n"
- : MSGTR_OpeningVideoFilter "[%s]\n",name,args);
- return vf_open_plugin(filter_list,next,name,args);
+vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char **args){
+ if(args && strcmp(args[0],"_oldargs_")) {
+ int i,l = 0;
+ for(i = 0 ; args && args[2*i] ; i++)
+ l += 1 + strlen(args[2*i]) + 1 + strlen(args[2*i+1]);
+ l += strlen(name);
+ {
+ char str[l+1];
+ char* p = str;
+ p += sprintf(str,"%s",name);
+ for(i = 0 ; args && args[2*i] ; i++)
+ p += sprintf(p," %s=%s",args[2*i],args[2*i+1]);
+ mp_msg(MSGT_VFILTER,MSGL_INFO,MSGTR_OpeningVideoFilter "[%s]\n",str);
+ }
+ } else if(strcmp(name,"vo")) {
+ if(args && strcmp(args[0],"_oldargs_") == 0)
+ mp_msg(MSGT_VFILTER,MSGL_INFO,MSGTR_OpeningVideoFilter
+ "[%s=%s]\n", name,args[1]);
+ else
+ mp_msg(MSGT_VFILTER,MSGL_INFO,MSGTR_OpeningVideoFilter
+ "[%s]\n", name);
+ }
+ return vf_open_plugin(filter_list,next,name,args);
}
//============================================================================
@@ -425,19 +466,27 @@
//============================================================================
vf_instance_t* append_filters(vf_instance_t* last){
- vf_instance_t* vf;
- char** plugin_args = vo_plugin_args;
- if(!vo_plugin_args) return last;
- while(*plugin_args){
- char* name=strdup(*plugin_args);
- char* args=strchr(name,'=');
- if(args){args[0]=0;++args;}
- vf=vf_open_filter(last,name,args);
- if(vf) last=vf;
- free(name);
- ++plugin_args;
+ 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++)
+ /* NOP */;
+ for(i-- ; i >= 0 ; i--) {
+ //printf("Open filter %s\n",vf_settings[i].name);
+ 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;
+ }
+ return last;
}
//============================================================================
Index: vf.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- vf.h 23 Feb 2003 20:40:21 -0000 1.17
+++ vf.h 15 Mar 2003 18:01:02 -0000 1.18
@@ -8,6 +8,8 @@
const char *author;
const char *comment;
int (*open)(struct vf_instance_s* vf,char* args);
+ // Ptr to a struct dscribing the options
+ void* opts;
} vf_info_t;
typedef struct vf_image_context_s {
@@ -67,8 +69,8 @@
void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
-vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char *args);
-vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char *args);
+vf_instance_t* vf_open_plugin(vf_info_t** filter_list, vf_instance_t* next, char *name, char **args);
+vf_instance_t* vf_open_filter(vf_instance_t* next, char *name, char **args);
vf_instance_t* vf_open_encoder(vf_instance_t* next, char *name, char *args);
unsigned int vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred);
Index: vf_1bpp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_1bpp.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vf_1bpp.c 6 Nov 2002 23:54:24 -0000 1.3
+++ vf_1bpp.c 15 Mar 2003 18:01:02 -0000 1.4
@@ -178,7 +178,8 @@
"1bpp",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_2xsai.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_2xsai.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_2xsai.c 6 Nov 2002 23:54:24 -0000 1.2
+++ vf_2xsai.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -357,7 +357,8 @@
"2xsai",
"A'rpi",
"http://elektron.its.tudelft.nl/~dalikifa/",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_bmovl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_bmovl.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_bmovl.c 28 Jan 2003 00:27:59 -0000 1.6
+++ vf_bmovl.c 15 Mar 2003 18:01:02 -0000 1.7
@@ -452,5 +452,6 @@
"bmovl",
"Per Wigren",
"",
- vf_open
+ vf_open,
+ NULL
};
Index: vf_boxblur.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_boxblur.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_boxblur.c 6 Nov 2002 23:54:24 -0000 1.2
+++ vf_boxblur.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -212,7 +212,8 @@
"boxblur",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_crop.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_crop.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vf_crop.c 4 Feb 2003 18:53:33 -0000 1.10
+++ vf_crop.c 15 Mar 2003 18:01:02 -0000 1.11
@@ -115,7 +115,8 @@
"crop",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_cropdetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_cropdetect.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_cropdetect.c 22 Sep 2002 02:33:25 -0000 1.6
+++ vf_cropdetect.c 15 Mar 2003 18:01:02 -0000 1.7
@@ -133,7 +133,8 @@
"cropdetect",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_denoise3d.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_denoise3d.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_denoise3d.c 15 Feb 2003 20:38:34 -0000 1.5
+++ vf_denoise3d.c 15 Mar 2003 18:01:02 -0000 1.6
@@ -265,7 +265,8 @@
"denoise3d",
"Daniel Moreno",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_detc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_detc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_detc.c 9 Mar 2003 18:14:56 -0000 1.2
+++ vf_detc.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -457,7 +457,8 @@
"detc",
"Rich Felker",
"",
- open
+ open,
+ NULL
};
Index: vf_dint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_dint.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_dint.c 6 Oct 2002 18:14:14 -0000 1.2
+++ vf_dint.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -191,5 +191,6 @@
"dint",
"A.G.",
"",
- open
+ open,
+ NULL
};
Index: vf_down3dright.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_down3dright.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_down3dright.c 11 Feb 2003 21:44:55 -0000 1.1
+++ vf_down3dright.c 15 Mar 2003 18:01:02 -0000 1.2
@@ -139,6 +139,7 @@
"down3dright",
"Zdenek Kabelac",
"",
- open
+ open,
+ NULL
};
Index: vf_dvbscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_dvbscale.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_dvbscale.c 6 May 2002 22:49:31 -0000 1.1
+++ vf_dvbscale.c 15 Mar 2003 18:01:02 -0000 1.2
@@ -42,7 +42,8 @@
"dvbscale",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_eq.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_eq.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_eq.c 10 Sep 2002 22:18:32 -0000 1.5
+++ vf_eq.c 15 Mar 2003 18:01:02 -0000 1.6
@@ -219,6 +219,7 @@
"eq",
"Richard Felker",
"",
- open
+ open,
+ NULL
};
Index: vf_eq2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_eq2.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_eq2.c 2 Feb 2003 02:09:23 -0000 1.5
+++ vf_eq2.c 15 Mar 2003 18:01:02 -0000 1.6
@@ -463,5 +463,6 @@
"eq2",
"Hampa Hug, Daniel Moreno, Richard Felker",
"",
- &open
+ &open,
+ NULL
};
Index: vf_expand.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_expand.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vf_expand.c 14 Mar 2003 15:06:21 -0000 1.21
+++ vf_expand.c 15 Mar 2003 18:01:02 -0000 1.22
@@ -356,7 +356,8 @@
"expand",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_fame.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_fame.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_fame.c 29 Sep 2002 19:19:31 -0000 1.9
+++ vf_fame.c 15 Mar 2003 18:01:02 -0000 1.10
@@ -145,7 +145,8 @@
"fame",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_field.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_field.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_field.c 16 Feb 2003 07:05:24 -0000 1.2
+++ vf_field.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -72,7 +72,8 @@
"field",
"Rich Felker",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_flip.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_flip.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vf_flip.c 4 Feb 2003 18:53:33 -0000 1.10
+++ vf_flip.c 15 Mar 2003 18:01:02 -0000 1.11
@@ -90,7 +90,8 @@
"flip",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_format.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_format.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_format.c 30 Jan 2003 09:14:58 -0000 1.9
+++ vf_format.c 15 Mar 2003 18:01:02 -0000 1.10
@@ -66,7 +66,8 @@
"format",
"A'rpi",
"FIXME! get_image()/put_image()",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_halfpack.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_halfpack.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vf_halfpack.c 10 Jan 2003 14:12:07 -0000 1.4
+++ vf_halfpack.c 15 Mar 2003 18:01:02 -0000 1.5
@@ -216,6 +216,7 @@
"halfpack",
"Richard Felker",
"",
- open
+ open,
+ NULL
};
Index: vf_hqdn3d.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_hqdn3d.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_hqdn3d.c 15 Feb 2003 22:24:32 -0000 1.1
+++ vf_hqdn3d.c 15 Mar 2003 18:01:02 -0000 1.2
@@ -290,7 +290,8 @@
"hqdn3d",
"Daniel Moreno & A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_il.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_il.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vf_il.c 6 Nov 2002 23:54:24 -0000 1.4
+++ vf_il.c 15 Mar 2003 18:01:02 -0000 1.5
@@ -145,7 +145,8 @@
"il",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_lavc.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vf_lavc.c 13 Mar 2003 09:24:03 -0000 1.11
+++ vf_lavc.c 15 Mar 2003 18:01:02 -0000 1.12
@@ -200,7 +200,8 @@
"lavc",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_lavcdeint.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_lavcdeint.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_lavcdeint.c 4 Jan 2003 22:43:40 -0000 1.6
+++ vf_lavcdeint.c 15 Mar 2003 18:01:02 -0000 1.7
@@ -183,7 +183,8 @@
"Joe Rabinoff",
"libavcodec's internal deinterlacer, in case you don't like "
"the builtin ones (invoked with -pp or -npp)",
- open
+ open,
+ NULL
};
Index: vf_mirror.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_mirror.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_mirror.c 4 Feb 2003 18:53:33 -0000 1.6
+++ vf_mirror.c 15 Mar 2003 18:01:02 -0000 1.7
@@ -109,7 +109,8 @@
"mirror",
"Eyck",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_noise.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_noise.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- vf_noise.c 10 Sep 2002 22:18:32 -0000 1.10
+++ vf_noise.c 15 Mar 2003 18:01:02 -0000 1.11
@@ -464,7 +464,8 @@
"noise",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_palette.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_palette.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vf_palette.c 4 Feb 2003 17:51:39 -0000 1.9
+++ vf_palette.c 15 Mar 2003 18:01:02 -0000 1.10
@@ -190,7 +190,8 @@
"palette",
"A'rpi & Alex",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_perspective.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_perspective.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_perspective.c 5 Nov 2002 13:28:50 -0000 1.1
+++ vf_perspective.c 15 Mar 2003 18:01:02 -0000 1.2
@@ -335,7 +335,8 @@
"perspective",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_pp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_pp.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- vf_pp.c 4 Mar 2003 22:48:37 -0000 1.25
+++ vf_pp.c 15 Mar 2003 18:01:02 -0000 1.26
@@ -239,7 +239,8 @@
"pp",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_rectangle.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_rectangle.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vf_rectangle.c 3 Jan 2003 12:53:48 -0000 1.7
+++ vf_rectangle.c 15 Mar 2003 18:01:02 -0000 1.8
@@ -168,5 +168,6 @@
"rectangle",
"Kim Minh Kaplan",
"",
- open
+ open,
+ NULL
};
Index: vf_rgb2bgr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_rgb2bgr.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_rgb2bgr.c 10 Sep 2002 22:18:32 -0000 1.5
+++ vf_rgb2bgr.c 15 Mar 2003 18:01:02 -0000 1.6
@@ -97,7 +97,8 @@
"rgb2bgr",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_rotate.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_rotate.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- vf_rotate.c 4 Feb 2003 18:53:33 -0000 1.7
+++ vf_rotate.c 15 Mar 2003 18:01:02 -0000 1.8
@@ -130,7 +130,8 @@
"rotate",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_sab.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_sab.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_sab.c 23 Feb 2003 22:05:52 -0000 1.2
+++ vf_sab.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -311,7 +311,8 @@
"sab",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- vf_scale.c 23 Feb 2003 22:05:52 -0000 1.33
+++ vf_scale.c 15 Mar 2003 18:01:02 -0000 1.34
@@ -13,7 +13,10 @@
#include "../libvo/fastmemcpy.h"
#include "../postproc/swscale.h"
-struct vf_priv_s {
+#include "m_option.h"
+#include "m_struct.h"
+
+static struct vf_priv_s {
int w,h;
int v_chr_drop;
int param;
@@ -21,6 +24,14 @@
struct SwsContext *ctx;
unsigned char* palette;
mp_image_t *dmpi;
+} vf_priv_dflt = {
+ -1,-1,
+ 0,
+ 0,
+ 0,
+ NULL,
+ NULL,
+ NULL
};
extern int opt_screen_size_x;
@@ -348,6 +359,7 @@
vf->put_image=put_image;
vf->query_format=query_format;
vf->control= control;
+ if(!vf->priv) {
vf->priv=malloc(sizeof(struct vf_priv_s));
// TODO: parse args ->
vf->priv->ctx=NULL;
@@ -356,6 +368,7 @@
vf->priv->v_chr_drop=0;
vf->priv->param=0;
vf->priv->palette=NULL;
+ } // if(!vf->priv)
if(args) sscanf(args, "%d:%d:%d:%d",
&vf->priv->w,
&vf->priv->h,
@@ -367,12 +380,66 @@
return 1;
}
+/// An example of presets usage
+static struct size_preset {
+ char* name;
+ int w, h;
+} vf_size_presets_defs[] = {
+ // TODO add more 'standard' resolutions
+ { "pal", 768, 576 },
+ { NULL, 0, 0}
+};
+
+#define ST_OFF(f) M_ST_OFF(struct size_preset,f)
+static m_option_t vf_size_preset_fields[] = {
+ {"w", ST_OFF(w), CONF_TYPE_INT, M_OPT_MIN,1 ,0, NULL},
+ {"h", ST_OFF(h), CONF_TYPE_INT, M_OPT_MIN,1 ,0, NULL},
+ { NULL, NULL, 0, 0, 0, 0, NULL }
+};
+
+static m_struct_t vf_size_preset = {
+ "scale_size_preset",
+ sizeof(struct size_preset),
+ NULL,
+ vf_size_preset_fields
+};
+
+static m_struct_t vf_opts;
+static m_obj_presets_t size_preset = {
+ &vf_size_preset, // Input struct desc
+ &vf_opts, // Output struct desc
+ vf_size_presets_defs, // The list of presets
+ ST_OFF(name) // At wich offset is the name field in the preset struct
+};
+
+/// Now the options
+#undef ST_OFF
+#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
+static m_option_t vf_opts_fields[] = {
+ {"w", ST_OFF(w), CONF_TYPE_INT, M_OPT_MIN,1 ,0, NULL},
+ {"h", ST_OFF(h), CONF_TYPE_INT, M_OPT_MIN,1 ,0, NULL},
+ {"chr-drop", ST_OFF(v_chr_drop), CONF_TYPE_INT, M_OPT_RANGE, 0, 3, NULL},
+ {"param", ST_OFF(param), CONF_TYPE_INT, M_OPT_RANGE, 0, 100, NULL},
+ // Note that here the 2 field is NULL (ie 0)
+ // As we want this option to act on the option struct itself
+ {"presize", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0, &size_preset},
+ { NULL, NULL, 0, 0, 0, 0, NULL }
+};
+
+static m_struct_t vf_opts = {
+ "scale",
+ sizeof(struct vf_priv_s),
+ &vf_priv_dflt,
+ vf_opts_fields
+};
+
vf_info_t vf_info_scale = {
"software scaling",
"scale",
"A'rpi",
"",
- open
+ open,
+ &vf_opts
};
//===========================================================================//
Index: vf_smartblur.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_smartblur.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vf_smartblur.c 23 Feb 2003 22:05:52 -0000 1.3
+++ vf_smartblur.c 15 Mar 2003 18:01:02 -0000 1.4
@@ -266,7 +266,8 @@
"smartblur",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_swapuv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_swapuv.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_swapuv.c 2 Nov 2002 17:38:15 -0000 1.2
+++ vf_swapuv.c 15 Mar 2003 18:01:02 -0000 1.3
@@ -106,7 +106,8 @@
"swapuv",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_telecine.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_telecine.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_telecine.c 20 Feb 2003 04:57:37 -0000 1.1
+++ vf_telecine.c 15 Mar 2003 18:01:02 -0000 1.2
@@ -145,7 +145,8 @@
"telecine",
"Rich Felker",
"",
- open
+ open,
+ NULL
};
Index: vf_test.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_test.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vf_test.c 10 Sep 2002 22:18:32 -0000 1.4
+++ vf_test.c 15 Mar 2003 18:01:02 -0000 1.5
@@ -325,7 +325,8 @@
"test",
"Michael Niedermayer",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_tfields.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_tfields.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_tfields.c 1 Mar 2003 05:34:43 -0000 1.1
+++ vf_tfields.c 15 Mar 2003 18:01:02 -0000 1.2
@@ -181,7 +181,8 @@
"tfields",
"Rich Felker",
"",
- open
+ open,
+ NULL
};
Index: vf_unsharp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_unsharp.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vf_unsharp.c 3 Nov 2002 15:14:31 -0000 1.3
+++ vf_unsharp.c 15 Mar 2003 18:01:02 -0000 1.4
@@ -334,7 +334,8 @@
"unsharp",
"Rémi Guyomarch",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_vo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_vo.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vf_vo.c 10 Mar 2003 00:03:46 -0000 1.22
+++ vf_vo.c 15 Mar 2003 18:01:02 -0000 1.23
@@ -143,7 +143,8 @@
"vo",
"A'rpi",
"for internal use",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_yuy2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_yuy2.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- vf_yuy2.c 10 Sep 2002 22:18:32 -0000 1.5
+++ vf_yuy2.c 15 Mar 2003 18:01:02 -0000 1.6
@@ -73,7 +73,8 @@
"yuy2",
"A'rpi",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
Index: vf_yvu9.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_yvu9.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- vf_yvu9.c 10 Sep 2002 22:18:32 -0000 1.4
+++ vf_yvu9.c 15 Mar 2003 18:01:02 -0000 1.5
@@ -81,7 +81,8 @@
"yvu9",
"alex",
"",
- open
+ open,
+ NULL
};
//===========================================================================//
- Previous message: [Mplayer-cvslog] CVS: main/loader win32.c,1.76,1.77
- Next message: [Mplayer-cvslog] CVS: main cfg-common.h,1.84,1.85 m_config.c,1.5,1.6 m_option.c,1.6,1.7 m_option.h,1.3,1.4 mplayer.c,1.684,1.685
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list