[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[485] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-29 12:48:02
|
Revision: 485 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=485&view=rev Author: nickols_k Date: 2012-11-29 12:47:49 +0000 (Thu, 29 Nov 2012) Log Message: ----------- c++-ization: decrease number of typedef Modified Paths: -------------- mplayerxp/libmpcodecs/dec_video.cpp mplayerxp/libmpdemux/stheader.h mplayerxp/postproc/af.h mplayerxp/postproc/af_ao2.cpp mplayerxp/postproc/af_channels.cpp mplayerxp/postproc/af_control.h mplayerxp/postproc/af_crystality.cpp mplayerxp/postproc/af_delay.cpp mplayerxp/postproc/af_dyn.cpp mplayerxp/postproc/af_echo3d.cpp mplayerxp/postproc/af_equalizer.cpp mplayerxp/postproc/af_export.cpp mplayerxp/postproc/af_extrastereo.cpp mplayerxp/postproc/af_ffenc.cpp mplayerxp/postproc/af_format.cpp mplayerxp/postproc/af_hrtf.cpp mplayerxp/postproc/af_karaoke.cpp mplayerxp/postproc/af_lp.cpp mplayerxp/postproc/af_pan.cpp mplayerxp/postproc/af_raw.cpp mplayerxp/postproc/af_resample.cpp mplayerxp/postproc/af_scaletempo.cpp mplayerxp/postproc/af_sinesuppress.cpp mplayerxp/postproc/af_sub.cpp mplayerxp/postproc/af_surround.cpp mplayerxp/postproc/af_tools.cpp mplayerxp/postproc/af_volnorm.cpp mplayerxp/postproc/af_volume.cpp mplayerxp/postproc/aflib.h mplayerxp/postproc/mpc_info.h mplayerxp/postproc/vf.cpp mplayerxp/postproc/vf.h mplayerxp/postproc/vf_1bpp.cpp mplayerxp/postproc/vf_2xsai.cpp mplayerxp/postproc/vf_aspect.cpp mplayerxp/postproc/vf_delogo.cpp mplayerxp/postproc/vf_denoise3d.cpp mplayerxp/postproc/vf_dint.cpp mplayerxp/postproc/vf_down3dright.cpp mplayerxp/postproc/vf_eq.cpp mplayerxp/postproc/vf_expand.cpp mplayerxp/postproc/vf_flip.cpp mplayerxp/postproc/vf_format.cpp mplayerxp/postproc/vf_framestep.cpp mplayerxp/postproc/vf_il.cpp mplayerxp/postproc/vf_menu.cpp mplayerxp/postproc/vf_mirror.cpp mplayerxp/postproc/vf_noise.cpp mplayerxp/postproc/vf_ow.cpp mplayerxp/postproc/vf_palette.cpp mplayerxp/postproc/vf_panscan.cpp mplayerxp/postproc/vf_perspective.cpp mplayerxp/postproc/vf_pp.cpp mplayerxp/postproc/vf_raw.cpp mplayerxp/postproc/vf_rectangle.cpp mplayerxp/postproc/vf_rgb2bgr.cpp mplayerxp/postproc/vf_rotate.cpp mplayerxp/postproc/vf_scale.cpp mplayerxp/postproc/vf_smartblur.cpp mplayerxp/postproc/vf_softpulldown.cpp mplayerxp/postproc/vf_swapuv.cpp mplayerxp/postproc/vf_test.cpp mplayerxp/postproc/vf_unsharp.cpp mplayerxp/postproc/vf_vo.cpp mplayerxp/postproc/vf_yuvcsp.cpp mplayerxp/postproc/vf_yuy2.cpp mplayerxp/postproc/vf_yvu9.cpp Modified: mplayerxp/libmpcodecs/dec_video.cpp =================================================================== --- mplayerxp/libmpcodecs/dec_video.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/libmpcodecs/dec_video.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -584,6 +584,6 @@ } void mpcodecs_draw_slice(sh_video_t *sh, mp_image_t*mpi) { - struct vf_instance_s* vf = sh->vfilter; + vf_instance_t* vf = sh->vfilter; vf->put_slice(vf,mpi); } Modified: mplayerxp/libmpdemux/stheader.h =================================================================== --- mplayerxp/libmpdemux/stheader.h 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/libmpdemux/stheader.h 2012-11-29 12:47:49 UTC (rev 485) @@ -13,7 +13,7 @@ #endif #include "xmpcore/mp_image.h" -struct af_stream_s; +struct af_stream_t; typedef struct sh_audio_s { int aid; demux_stream_t* ds; @@ -42,7 +42,7 @@ unsigned a_buffer_size; /* filter buffer */ - struct af_stream_s* afilter; + af_stream_t* afilter; int afilter_inited; unsigned af_bps; // == samplerate*samplesize*channels (after filters bytes/sec) char* af_buffer; @@ -63,7 +63,7 @@ unsigned char* codecdata; unsigned codecdata_len; } sh_audio_t; -struct vf_instance_s; +struct vf_instance_t; typedef struct sh_video_s { int vid; demux_stream_t* ds; @@ -83,7 +83,7 @@ float aspect; unsigned int outfmtidx; // TODO: replace with out_fourcc /* vfilter chan */ - struct vf_instance_s*vfilter; + vf_instance_t* vfilter; int vfilter_inited; int vf_flags; unsigned active_slices; // used in dec_video+vd_ffmpeg only!!! Modified: mplayerxp/postproc/af.h =================================================================== --- mplayerxp/postproc/af.h 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af.h 2012-11-29 12:47:49 UTC (rev 485) @@ -8,14 +8,14 @@ #include "xmpcore/xmp_enums.h" #include "xmpcore/mp_aframe.h" -struct af_instance_s; +struct af_instance_t; // Fraction, used to calculate buffer lengths -typedef struct frac_s +struct frac_t { int n; // Numerator int d; // Denominator -} frac_t; +}; // Flags used for defining the behavior of an audio filter enum { @@ -24,45 +24,45 @@ }; /* Audio filter information not specific for current instance, but for a specific filter */ -typedef struct af_info_s +struct af_info_t { const char *info; const char *name; const char *author; const char *comment; const unsigned flags; - MPXP_Rc (* __FASTCALL__ open)(struct af_instance_s* vf); -} af_info_t; + MPXP_Rc (* __FASTCALL__ open)(af_instance_t* vf); +}; enum { AF_PIN=RND_NUMBER6+RND_CHAR6 }; -typedef struct af_conf_s { +struct af_conf_t { /*------ stream description ----------*/ unsigned rate; /* rate of audio */ unsigned nch; /* number of channels */ mpaf_format_e format;/* PCM format of audio */ -}af_conf_t; +}; // Linked list of audio filters -typedef struct af_instance_s { +struct af_instance_t { const af_info_t* info; char antiviral_hole[RND_CHAR6]; unsigned pin; // personal identification number - MPXP_Rc (* __FASTCALL__ config_af)(struct af_instance_s* af, const af_conf_t* arg); - MPXP_Rc (* __FASTCALL__ control_af)(struct af_instance_s* af, int cmd, any_t* arg); - void (* __FASTCALL__ uninit)(struct af_instance_s* af); - mp_aframe_t* (* __FASTCALL__ play)(struct af_instance_s* af,const mp_aframe_t* data); + MPXP_Rc (* __FASTCALL__ config_af)(af_instance_t* af, const af_conf_t* arg); + MPXP_Rc (* __FASTCALL__ control_af)(af_instance_t* af, int cmd, any_t* arg); + void (* __FASTCALL__ uninit)(af_instance_t* af); + mp_aframe_t* (* __FASTCALL__ play)(af_instance_t* af,const mp_aframe_t* data); any_t* setup; // setup data for this specific instance and filter af_conf_t conf; // configuration for outgoing data stream - struct af_instance_s* next; - struct af_instance_s* prev; + af_instance_t* next; + af_instance_t* prev; any_t* parent; double delay; // Delay caused by the filter [ms] frac_t mul; /* length multiplier: how much does this instance change the length of the buffer. */ -}af_instance_t __attribute__ ((packed)); +}__attribute__ ((packed)); // Initialization flags extern int* af_cpu_speed; @@ -87,14 +87,14 @@ #endif // Configuration switches -typedef struct af_cfg_s{ +struct af_cfg_t{ int force; // Initialization type char* list; /* list of names of filters that are added to filter list during first initialization of stream */ -}af_cfg_t; +}; // Current audio stream -typedef struct af_stream_s +struct af_stream_t { char antiviral_hole[RND_CHAR7]; // The first and last filter in the list @@ -106,7 +106,7 @@ // Configuration for this stream af_cfg_t cfg; any_t* parent; -}af_stream_t; +}; /********************************************* @@ -170,7 +170,7 @@ /* Helper function used to convert from sample time to ms */ MPXP_Rc __FASTCALL__ af_to_ms(int n, int* in, float* out, int rate); /* Helper function for testing the output format */ -MPXP_Rc __FASTCALL__ af_test_output(struct af_instance_s* af,const af_conf_t* out); +MPXP_Rc __FASTCALL__ af_test_output(af_instance_t* af,const af_conf_t* out); /** Print a list of all available audio filters */ void af_help(void); Modified: mplayerxp/postproc/af_ao2.cpp =================================================================== --- mplayerxp/postproc/af_ao2.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_ao2.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -58,11 +58,10 @@ return 2; } -typedef struct fmt_cvs_s -{ +struct fmt_cvt_t { unsigned base_fourcc; unsigned cvt_fourcc[20]; -}fmt_cvt_t; +}; static fmt_cvt_t cvt_list[] = { @@ -103,14 +102,14 @@ return AFMT_S16_LE; } -typedef struct af_ao2_s{ +struct af_ao2_t{ unsigned rate; unsigned nch; mpaf_format_e format; -}af_ao2_t; +}; // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af, const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af, const af_conf_t* arg) { af_ao2_t* s = reinterpret_cast<af_ao2_t*>(af->setup); /* Sanity check */ @@ -121,7 +120,7 @@ return af_test_output(af,arg); } -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_ao2_t* s = reinterpret_cast<af_ao2_t*>(af->setup); UNUSED(arg); @@ -140,13 +139,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* data) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* data) { // Do something necessary to get rid of annoying warning during compile if(!af) MSG_ERR("EEEK: Argument af == NULL in af_dummy.c play()."); Modified: mplayerxp/postproc/af_channels.cpp =================================================================== --- mplayerxp/postproc/af_channels.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_channels.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -19,12 +19,12 @@ #define FR 0 #define TO 1 -typedef struct af_channels_s{ +struct af_channels_t{ int route[AF_NCH][2]; int nr; int router; int ich; -}af_channels_t; +}; // Local function for copying data static void __FASTCALL__ af_copy(const any_t* in, any_t* out, int ins, int inos,int outs, int outos, int len, int bps) @@ -122,7 +122,7 @@ return MPXP_Ok; } -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_channels_t* s = reinterpret_cast<af_channels_t*>(af->setup); // Set default channel assignment @@ -156,7 +156,7 @@ return check_routes(s,arg->nch,af->conf.nch); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_channels_t* s = reinterpret_cast<af_channels_t*>(af->setup); switch(cmd){ @@ -244,13 +244,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { af_channels_t*s = reinterpret_cast<af_channels_t*>(af->setup); int i; Modified: mplayerxp/postproc/af_control.h =================================================================== --- mplayerxp/postproc/af_control.h 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_control.h 2012-11-29 12:47:49 UTC (rev 485) @@ -32,7 +32,7 @@ AF_CONTROL_PROP_MASK =(0xF<<5) }; -typedef struct af_control_info_s{ +struct af_control_info_t{ unsigned def; // Control enumrification const char* name; // Name of argument const char* info; // Description of what it does @@ -44,17 +44,16 @@ size_t sz; // Size of argument in bytes unsigned ch; // Channel number (for future use) any_t* arg; // Data (for future use) -}af_control_info_t; +}; - /********************************************* // Extended control_af used with arguments that operates on only one // channel at the time */ -typedef struct af_control_ext_s{ +struct af_control_ext_t{ any_t* arg; // Argument unsigned ch; // Chanel number -}af_control_ext_t; +}; /********************************************* // Control parameters @@ -137,12 +136,12 @@ /* Equalizer plugin header file defines struct used for setting or getting the gain of a specific channel and frequency */ -typedef struct equalizer_s +struct equalizer_t { float gain; // Gain in dB -15 - 15 unsigned channel;// Channel number 0 - 5 int band; // Frequency band 0 - 9 -}equalizer_t; +}; /* The different frequency bands are: nr. center frequency Modified: mplayerxp/postproc/af_crystality.cpp =================================================================== --- mplayerxp/postproc/af_crystality.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_crystality.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -79,7 +79,7 @@ /*#define SAMPLE_MAX 2147483647 - for S32LE */ /* Data for specific instances of this filter */ -typedef struct af_crystality_s +struct af_crystality_t { int bext_level; int echo_level; @@ -102,7 +102,7 @@ lowp_t lp_reverb[2]; lowp_t lp_bass[2]; float hf_div; -} af_crystality_t; +}; static void __FASTCALL__ set_defaults(af_crystality_t *s) { @@ -479,7 +479,7 @@ return out; } -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { af_crystality_t* s = reinterpret_cast<af_crystality_t*>(af->setup); unsigned i_bps,fmt; @@ -501,7 +501,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_crystality_t* s = (af_crystality_t*)af->setup; @@ -524,13 +524,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { af_crystality_t* s = reinterpret_cast<af_crystality_t*>(af->setup); mp_aframe_t* out,*tmp; Modified: mplayerxp/postproc/af_delay.cpp =================================================================== --- mplayerxp/postproc/af_delay.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_delay.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -19,16 +19,16 @@ #define UPDATEQI(qi) qi=(qi+1)&(L-1) // Data for specific instances of this filter -typedef struct af_delay_s +struct af_delay_t { any_t* q[AF_NCH]; // Circular queues used for delaying audio signal int wi[AF_NCH]; // Write index int ri; // Read index float d[AF_NCH]; // Delay [ms] -}af_delay_t; +}; // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_delay_t* s = reinterpret_cast<af_delay_t*>(af->setup); @@ -74,7 +74,7 @@ return MPXP_Unknown; } -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { af_delay_t* s = reinterpret_cast<af_delay_t*>(af->setup); unsigned i; @@ -95,7 +95,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { int i; for(i=0;i<AF_NCH;i++) @@ -106,7 +106,7 @@ } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { mp_aframe_t* c=new_mp_aframe_genome(in); mp_alloc_aframe(c); Modified: mplayerxp/postproc/af_dyn.cpp =================================================================== --- mplayerxp/postproc/af_dyn.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_dyn.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -23,12 +23,12 @@ #include "mplayerxp.h" #include "af.h" -typedef struct af_dyn_s +struct af_dyn_t { float gain; -}af_dyn_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { // Sanity check if(!arg) return MPXP_Error; @@ -42,7 +42,7 @@ // Data for specific instances of this filter // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_dyn_t* s = (af_dyn_t*)af->setup; switch(cmd){ @@ -58,13 +58,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind) { unsigned i = 0; float* in = (float*)ind->audio;// Audio data Modified: mplayerxp/postproc/af_echo3d.cpp =================================================================== --- mplayerxp/postproc/af_echo3d.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_echo3d.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -39,7 +39,7 @@ #define DELAY3 14000 /* Data for specific instances of this filter */ -typedef struct af_crystality_s +struct af_crystality_t { int echos; int echo_level; @@ -54,7 +54,7 @@ unsigned buf_size; unsigned _bufPos; unsigned bufPos[3]; -} af_crystality_t; +}; static void __FASTCALL__ set_defaults(af_crystality_t *s) { @@ -150,7 +150,7 @@ return out; } -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { af_crystality_t* s = (af_crystality_t*)af->setup; // Sanity check @@ -165,7 +165,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_crystality_t* s = (af_crystality_t*)af->setup; @@ -184,14 +184,14 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(((af_crystality_t *)af->setup)->buf) delete ((af_crystality_t *)af->setup)->buf; if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { return echo3d(reinterpret_cast<af_crystality_t*>(af->setup),in); } Modified: mplayerxp/postproc/af_equalizer.cpp =================================================================== --- mplayerxp/postproc/af_equalizer.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_equalizer.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -54,7 +54,7 @@ #define G_MIN -12.0f // Data for specific instances of this filter -typedef struct af_equalizer_s +struct af_equalizer_t { float a[KM][L]; // A weights float b[KM][L]; // B weights @@ -62,7 +62,7 @@ float g[AF_NCH][KM]; // Gain factor for each channel and band unsigned K; // Number of used eq bands unsigned channels; // Number of channels -} af_equalizer_t; +}; // 2nd order Band-pass Filter design static void __FASTCALL__ bp2(float* a, float* b, float fc, float q){ @@ -76,7 +76,7 @@ b[1] = -1.0050; } -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_equalizer_t* s = (af_equalizer_t*)af->setup; unsigned k =0; @@ -107,7 +107,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_equalizer_t* s = (af_equalizer_t*)af->setup; @@ -165,13 +165,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind) { af_equalizer_t* s = (af_equalizer_t*)af->setup; // Setup uint32_t ci = af->conf.nch; // Index for channels Modified: mplayerxp/postproc/af_export.cpp =================================================================== --- mplayerxp/postproc/af_export.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_export.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -36,7 +36,7 @@ #define SIZE_HEADER (2 * sizeof(int) + sizeof(unsigned long long)) // Data for specific instances of this filter -typedef struct af_export_s +struct af_export_t { unsigned long long count; // Used for sync uint8_t* buf[AF_NCH]; // Buffers for storing the data before it is exported @@ -45,15 +45,14 @@ int fd; // File descriptor to shared memory area char* filename; // File to export data any_t* mmap_area; // MMap shared area -} af_export_t; +}; - /* Initialization and runtime control_af af audio filter instance cmd control_af command arg argument */ -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af, const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af, const af_conf_t* arg) { af_export_t* s = reinterpret_cast<af_export_t*>(af->setup); unsigned i=0; @@ -117,7 +116,7 @@ // Use test_output to return FALSE if necessary return af_test_output(af, arg); } -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_export_t* s = reinterpret_cast<af_export_t*>(af->setup); @@ -166,7 +165,7 @@ /* Free allocated memory and clean up other stuff too. af audio filter instance */ -static void __FASTCALL__ uninit( struct af_instance_s* af ) +static void __FASTCALL__ uninit( af_instance_t* af ) { if(af->setup){ af_export_t* s = reinterpret_cast<af_export_t*>(af->setup); @@ -192,7 +191,7 @@ af audio filter instance data audio data */ -static mp_aframe_t* __FASTCALL__ play( struct af_instance_s* af,const mp_aframe_t* data) +static mp_aframe_t* __FASTCALL__ play( af_instance_t* af,const mp_aframe_t* data) { const mp_aframe_t*c = data; // Current working data af_export_t*s = reinterpret_cast<af_export_t*>(af->setup); // Setup for this instance Modified: mplayerxp/postproc/af_extrastereo.cpp =================================================================== --- mplayerxp/postproc/af_extrastereo.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_extrastereo.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -24,12 +24,12 @@ #include "pp_msg.h" // Data for specific instances of this filter -typedef struct af_extrastereo_s +struct af_extrastereo_t { float mul; -}af_extrastereo_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { // Sanity check if(!arg) return MPXP_Error; @@ -44,7 +44,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_extrastereo_t* s = (af_extrastereo_t*)af->setup; @@ -70,13 +70,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind) { af_extrastereo_t *s = reinterpret_cast<af_extrastereo_t*>(af->setup); unsigned i = 0; Modified: mplayerxp/postproc/af_ffenc.cpp =================================================================== --- mplayerxp/postproc/af_ffenc.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_ffenc.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -14,7 +14,7 @@ #define MIN_LIBAVCODEC_VERSION_INT ((51<<16)+(0<<8)+0) // Data for specific instances of this filter -typedef struct af_ffenc_s +struct af_ffenc_t { char cname[256]; unsigned brate; @@ -24,7 +24,7 @@ unsigned frame_size; uint8_t *tail; unsigned tail_size; -}af_ffenc_t; +}; static void print_encoders(void) { @@ -79,7 +79,7 @@ return 0; } -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_ffenc_t *s=reinterpret_cast<af_ffenc_t*>(af->setup); if(!s->acodec_inited) { @@ -116,7 +116,7 @@ return MPXP_Ok; } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_ffenc_t *s=reinterpret_cast<af_ffenc_t*>(af->setup); switch(cmd){ @@ -143,7 +143,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { af_ffenc_t *s=reinterpret_cast<af_ffenc_t*>(af->setup); avcodec_close(s->lavc_context); @@ -153,7 +153,7 @@ } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { unsigned tlen,ilen,olen,delta; af_ffenc_t *s=reinterpret_cast<af_ffenc_t*>(af->setup); Modified: mplayerxp/postproc/af_format.cpp =================================================================== --- mplayerxp/postproc/af_format.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_format.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -31,11 +31,11 @@ /* Functions used by play to convert the input audio to the correct format */ typedef mp_aframe_t* (*convert_audio_t)(const af_instance_t* af,const mp_aframe_t* in); -typedef struct af_format_s +struct af_format_t { mpaf_format_e fmt; std::vector<convert_audio_t> cvt_chain; -}af_format_t; +}; // Switch endianess static void endian(const mp_aframe_t* in, mp_aframe_t* out); @@ -142,7 +142,7 @@ ,out->len); } -static mp_aframe_t* change_endian(const struct af_instance_s* af,const mp_aframe_t* in) { +static mp_aframe_t* change_endian(const af_instance_t* af,const mp_aframe_t* in) { mp_aframe_t* out; out=new_mp_aframe_genome(in); mp_alloc_aframe(out); @@ -151,7 +151,7 @@ return out; } -static mp_aframe_t* convert_audio_f(const struct af_instance_s* af,const mp_aframe_t*in) { +static mp_aframe_t* convert_audio_f(const af_instance_t* af,const mp_aframe_t*in) { mp_aframe_t* out; out=new_mp_aframe_genome(in); out->len=af_lencalc(af->mul,in); @@ -168,7 +168,7 @@ return out; } -static mp_aframe_t* convert_audio_i(const struct af_instance_s* af,const mp_aframe_t*in) { +static mp_aframe_t* convert_audio_i(const af_instance_t* af,const mp_aframe_t*in) { mp_aframe_t* out; out=new_mp_aframe_genome(in); out->len=af_lencalc(af->mul,in); @@ -178,7 +178,7 @@ return out; } -static mp_aframe_t* convert_si2us(const struct af_instance_s* af,const mp_aframe_t*in) { +static mp_aframe_t* convert_si2us(const af_instance_t* af,const mp_aframe_t*in) { mp_aframe_t* out; out=new_mp_aframe_genome(in); mp_alloc_aframe(out); @@ -187,7 +187,7 @@ return out; } -static mp_aframe_t* convert_us2si(const struct af_instance_s* af,const mp_aframe_t*in) { +static mp_aframe_t* convert_us2si(const af_instance_t* af,const mp_aframe_t*in) { mp_aframe_t* out; out=new_mp_aframe_genome(in); mp_alloc_aframe(out); @@ -196,7 +196,7 @@ return out; } -static MPXP_Rc build_cvt_chain(struct af_instance_s* af,const af_conf_t* in) { +static MPXP_Rc build_cvt_chain(af_instance_t* af,const af_conf_t* in) { af_format_t* s = reinterpret_cast<af_format_t*>(af->setup); s->cvt_chain.clear(); @@ -230,7 +230,7 @@ return MPXP_Ok; } -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { af_format_t* s = reinterpret_cast<af_format_t*>(af->setup); // Make sure this filter isn't redundant @@ -247,7 +247,7 @@ return build_cvt_chain(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_format_t* s = reinterpret_cast<af_format_t*>(af->setup); char buf1[256],buf2[256]; @@ -277,7 +277,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) { af_format_t* s = reinterpret_cast<af_format_t*>(af->setup); @@ -287,7 +287,7 @@ } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af, const mp_aframe_t* data) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af, const mp_aframe_t* data) { af_format_t* s = reinterpret_cast<af_format_t*>(af->setup); mp_aframe_t* out=NULL,* in=const_cast<mp_aframe_t*>(data); Modified: mplayerxp/postproc/af_hrtf.cpp =================================================================== --- mplayerxp/postproc/af_hrtf.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_hrtf.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -22,7 +22,7 @@ typedef float real_t; -typedef struct af_hrtf_s { +struct af_hrtf_t { /* Lengths */ int dlbuflen, hrflen, basslen; /* L, C, R, Ls, Rs channels */ @@ -56,7 +56,7 @@ float adapt_lrprr_gain, adapt_lrmrr_gain; /* Cyclic position on the ring buffer */ int cyc_pos; -} af_hrtf_t; +}; /* Convolution on a ring buffer * nx: length of the ring buffer @@ -266,7 +266,7 @@ s->ba_r[k] = in[4] + in[1] + in[3]; } -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_hrtf_t *s = reinterpret_cast<af_hrtf_t*>(af->setup); MPXP_Rc test_output_res; @@ -299,7 +299,7 @@ return test_output_res; } /* Initialization and runtime control_af */ -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s *af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t *af, int cmd, any_t* arg) { af_hrtf_t *s = reinterpret_cast<af_hrtf_t*>(af->setup); char mode; @@ -354,7 +354,7 @@ } /* Deallocate memory */ -static void __FASTCALL__ uninit(struct af_instance_s *af) +static void __FASTCALL__ uninit(af_instance_t *af) { if(af->setup) { af_hrtf_t *s = reinterpret_cast<af_hrtf_t*>(af->setup); @@ -387,7 +387,7 @@ 2. A bass compensation is introduced to ensure that 0-200 Hz are not damped (without any real 3D acoustical image, however). */ -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s *af,const mp_aframe_t *ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t *af,const mp_aframe_t *ind) { af_hrtf_t* s = reinterpret_cast<af_hrtf_t*>(af->setup); real_t* in = reinterpret_cast<real_t*>(ind->audio); // Input audio data Modified: mplayerxp/postproc/af_karaoke.cpp =================================================================== --- mplayerxp/postproc/af_karaoke.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_karaoke.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -20,14 +20,14 @@ // Data for specific instances of this filter // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af->conf.rate = arg->rate; af->conf.nch = arg->nch; af->conf.format = MPAF_NE|MPAF_F|MPAF_BPS_4; return af_test_output(af,arg); } -static MPXP_Rc control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc control_af(af_instance_t* af, int cmd, any_t* arg) { UNUSED(af); UNUSED(cmd); @@ -36,13 +36,13 @@ } // Deallocate memory -static void uninit(struct af_instance_s* af) +static void uninit(af_instance_t* af) { UNUSED(af); } // Filter data through filter -static mp_aframe_t* play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* play(af_instance_t* af,const mp_aframe_t* ind) { const mp_aframe_t*c = ind; // Current working data float* in = reinterpret_cast<float*>(c->audio); // Audio data Modified: mplayerxp/postproc/af_lp.cpp =================================================================== --- mplayerxp/postproc/af_lp.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_lp.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -10,13 +10,12 @@ #include "af.h" #include "pp_msg.h" -typedef struct s_lp -{ +struct af_lp_t { unsigned fin; unsigned fake_out; -}af_lp_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_lp_t* s = (af_lp_t*)af->setup; memcpy(&af->conf,arg,sizeof(af_conf_t)); @@ -27,7 +26,7 @@ } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_lp_t* s = (af_lp_t*)af->setup; switch(cmd){ @@ -57,13 +56,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* data) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* data) { // Do something necessary to get rid of annoying warning during compile if(!af) MSG_ERR("EEEK: Argument af == NULL in af_lp.c play()."); Modified: mplayerxp/postproc/af_pan.cpp =================================================================== --- mplayerxp/postproc/af_pan.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_pan.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -25,13 +25,13 @@ #include "pp_msg.h" // Data for specific instances of this filter -typedef struct af_pan_s +struct af_pan_t { float level[AF_NCH][AF_NCH]; // Gain level for each channel -}af_pan_t; +}; // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_pan_t* s = reinterpret_cast<af_pan_t*>(af->setup); @@ -100,7 +100,7 @@ return MPXP_Unknown; } -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { // Sanity check if(!arg) return MPXP_Error; @@ -115,13 +115,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind) { const mp_aframe_t*c= ind; // Current working data af_pan_t* s = reinterpret_cast<af_pan_t*>(af->setup); // Setup for this instance Modified: mplayerxp/postproc/af_raw.cpp =================================================================== --- mplayerxp/postproc/af_raw.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_raw.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -45,20 +45,20 @@ }; // Data for specific instances of this filter -typedef struct af_raw_s +struct af_raw_t { char* filename; // File to export data int wav_mode; struct WaveHeader wavhdr; FILE *fd; -} af_raw_t; +}; /* Initialization and runtime control_af af audio filter instance cmd control_af command arg argument */ -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_raw_t* s = reinterpret_cast<af_raw_t*>(af->setup); char *pt; @@ -97,7 +97,7 @@ return MPXP_Ok; } -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_raw_t* s = reinterpret_cast<af_raw_t*>(af->setup); @@ -115,7 +115,7 @@ /* Free allocated memory and clean up other stuff too. af audio filter instance */ -static void __FASTCALL__ uninit( struct af_instance_s* af ) +static void __FASTCALL__ uninit( af_instance_t* af ) { af_raw_t* s = reinterpret_cast<af_raw_t*>(af->setup); if(s) { @@ -142,7 +142,7 @@ af audio filter instance data audio data */ -static mp_aframe_t* __FASTCALL__ play( struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play( af_instance_t* af,const mp_aframe_t* ind) { af_raw_t* s = reinterpret_cast<af_raw_t*>(af->setup); // Setup for this instance if(s->fd) fwrite(ind->audio,ind->len,1,s->fd); Modified: mplayerxp/postproc/af_resample.cpp =================================================================== --- mplayerxp/postproc/af_resample.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_resample.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -64,14 +64,14 @@ } // local data -typedef struct af_resample_s { +struct af_resample_t { struct SwrContext* ctx; unsigned irate; unsigned inch; unsigned ifmt; -} af_resample_t; +}; -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { af_resample_t* s = (af_resample_t*)af->setup; enum AVSampleFormat avfmt; @@ -117,7 +117,7 @@ return rv; } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_resample_t* s = (af_resample_t*)af->setup; switch(cmd){ @@ -140,7 +140,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { af_resample_t* s = (af_resample_t*)af->setup; if(s->ctx) swr_free(&s->ctx); @@ -149,7 +149,7 @@ } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { int rc; mp_aframe_t* out = new_mp_aframe_genome(in); Modified: mplayerxp/postproc/af_scaletempo.cpp =================================================================== --- mplayerxp/postproc/af_scaletempo.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_scaletempo.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -44,7 +44,7 @@ #include "pp_msg.h" // Data for specific instances of this filter -typedef struct af_scaletempo_s +struct af_scaletempo_t { // stride float scale; @@ -65,13 +65,13 @@ int bytes_standing; int8_t* buf_overlap; int8_t* table_blend; - void (*output_overlap)(struct af_scaletempo_s* s, int8_t* out_buf, int bytes_off); + void (*output_overlap)(af_scaletempo_t* s, int8_t* out_buf, int bytes_off); // best overlap int frames_search; int num_channels; int8_t* buf_pre_corr; int8_t* table_window; - int (*best_overlap_offset)(struct af_scaletempo_s* s); + int (*best_overlap_offset)(af_scaletempo_t* s); short shift_corr; // command line float scale_nominal; @@ -80,9 +80,9 @@ float ms_search; short speed_tempo; short speed_pitch; -} af_scaletempo_t; +}; -static int fill_queue(struct af_instance_s* af,const mp_aframe_t* data, int offset) +static int fill_queue(af_instance_t* af,const mp_aframe_t* data, int offset) { af_scaletempo_t* s = reinterpret_cast<af_scaletempo_t*>(af->setup); int bytes_in = data->len - offset; @@ -167,7 +167,7 @@ } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind) { af_scaletempo_t* s = reinterpret_cast<af_scaletempo_t*>(af->setup); unsigned offset_in; @@ -223,7 +223,7 @@ return out; } -static MPXP_Rc __FASTCALL__ af_config(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ af_config(af_instance_t* af,const af_conf_t* arg) { af_scaletempo_t* s = reinterpret_cast<af_scaletempo_t*>(af->setup); float srate = arg->rate / 1000; @@ -327,7 +327,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_scaletempo_t* s = reinterpret_cast<af_scaletempo_t*>(af->setup); switch(cmd){ @@ -409,7 +409,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { af_scaletempo_t* s = reinterpret_cast<af_scaletempo_t*>(af->setup); delete s->buf_queue; @@ -421,7 +421,7 @@ } // Allocate memory and set function pointers -static MPXP_Rc __FASTCALL__ af_open(struct af_instance_s* af){ +static MPXP_Rc __FASTCALL__ af_open(af_instance_t* af){ af_scaletempo_t* s; af->config_af = af_config; Modified: mplayerxp/postproc/af_sinesuppress.cpp =================================================================== --- mplayerxp/postproc/af_sinesuppress.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_sinesuppress.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -25,7 +25,7 @@ #include "pp_msg.h" // Data for specific instances of this filter -typedef struct af_sinesuppress_s +struct af_sinesuppress_t { double freq; double decay; @@ -33,15 +33,15 @@ double imag; double ref; double pos; -}af_sinesuppress_t; +}; -static mp_aframe_t* play_s16(struct af_instance_s* af,const mp_aframe_t* data); +static mp_aframe_t* play_s16(af_instance_t* af,const mp_aframe_t* data); #if 0 -static mp_aframe_t* play_float(struct af_instance_s* af,const mp_aframe_t* data); +static mp_aframe_t* play_float(af_instance_t* af,const mp_aframe_t* data); #endif // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { // Sanity check if(!arg) return MPXP_Error; @@ -61,7 +61,7 @@ return af_test_output(af,arg); } -static MPXP_Rc control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc control_af(af_instance_t* af, int cmd, any_t* arg) { af_sinesuppress_t* s = (af_sinesuppress_t*)af->setup; @@ -83,13 +83,13 @@ } // Deallocate memory -static void uninit(struct af_instance_s* af) +static void uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* play_s16(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* play_s16(af_instance_t* af,const mp_aframe_t* ind) { af_sinesuppress_t *s = reinterpret_cast<af_sinesuppress_t*>(af->setup); unsigned i = 0; @@ -122,7 +122,7 @@ } #if 0 -static mp_aframe_t* play_float(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* play_float(af_instance_t* af,const mp_aframe_t* ind) { af_sinesuppress_t *s = af->setup; unsigned i = 0; Modified: mplayerxp/postproc/af_sub.cpp =================================================================== --- mplayerxp/postproc/af_sub.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_sub.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -35,26 +35,26 @@ #define Q 1.0 // Analog domain biquad section -typedef struct{ +struct biquad_t{ float a[3]; // Numerator coefficients float b[3]; // Denominator coefficients -} biquad_t; +}; // S-parameters for designing 4th order Butterworth filter static biquad_t sp[2] = {{{1.0,0.0,0.0},{1.0,0.765367,1.0}}, {{1.0,0.0,0.0},{1.0,1.847759,1.0}}}; // Data for specific instances of this filter -typedef struct af_sub_s +struct af_sub_t { float w[2][4]; // Filter taps for low-pass filter float q[2][2]; // Circular queues float fc; // Cutoff frequency [Hz] for low-pass filter float k; // Filter gain; unsigned ch; // Channel number which to insert the filtered data -}af_sub_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_sub_t* s = reinterpret_cast<af_sub_t*>(af->setup); // Sanity check @@ -74,7 +74,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_sub_t* s = reinterpret_cast<af_sub_t*>(af->setup); @@ -121,13 +121,13 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind) { af_sub_t* s = reinterpret_cast<af_sub_t*>(af->setup); // Setup for this instance float* in = reinterpret_cast<float*>(ind->audio);// Audio data Modified: mplayerxp/postproc/af_surround.cpp =================================================================== --- mplayerxp/postproc/af_surround.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_surround.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -69,7 +69,7 @@ #define UPDATEQI(qi) qi=(qi+1)&(LD-1) // instance data -typedef struct af_surround_s +struct af_surround_t { float lq[2*L]; // Circular queue for filtering left rear channel float rq[2*L]; // Circular queue for filtering right rear channel @@ -80,9 +80,9 @@ int i; // Position in circular buffer int wi; // Write index for delay queue int ri; // Read index for delay queue -}af_surround_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_surround_t *s = reinterpret_cast<af_surround_t*>(af->setup); float fc; @@ -122,7 +122,7 @@ return MPXP_Ok; } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_surround_t *s = reinterpret_cast<af_surround_t*>(af->setup); switch(cmd){ @@ -146,7 +146,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } @@ -163,7 +163,7 @@ //static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0; // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* ind){ +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* ind){ af_surround_t*s = (af_surround_t*)af->setup; float* m = steering_matrix[0]; float* in = reinterpret_cast<float*>(ind->audio); // Input audio data Modified: mplayerxp/postproc/af_tools.cpp =================================================================== --- mplayerxp/postproc/af_tools.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_tools.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -70,7 +70,7 @@ } /* Helper function for testing the output format */ -MPXP_Rc __FASTCALL__ af_test_output(struct af_instance_s* af,const af_conf_t* out) +MPXP_Rc __FASTCALL__ af_test_output(af_instance_t* af,const af_conf_t* out) { if((af->conf.format != out->format) || (af->conf.rate != out->rate) || Modified: mplayerxp/postproc/af_volnorm.cpp =================================================================== --- mplayerxp/postproc/af_volnorm.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_volnorm.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -56,7 +56,7 @@ #define SMOOTH_LASTAVG 0.06 // Data for specific instances of this filter -typedef struct af_volume_s +struct af_volnorm_t { int method; // method used float mul; @@ -68,9 +68,9 @@ float avg; // average level of the sample int len; // sample size (weight) } mem[NSAMPLES]; -}af_volnorm_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { // Sanity check if(!arg) return MPXP_Error; @@ -89,7 +89,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_volnorm_t* s = (af_volnorm_t*)af->setup; @@ -111,7 +111,7 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } @@ -289,7 +289,7 @@ } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { af_volnorm_t *s = reinterpret_cast<af_volnorm_t*>(af->setup); mp_aframe_t* out; Modified: mplayerxp/postproc/af_volume.cpp =================================================================== --- mplayerxp/postproc/af_volume.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/af_volume.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -41,7 +41,7 @@ #include "pp_msg.h" // Data for specific instances of this filter -typedef struct af_volume_s +struct af_volume_t { int enable[AF_NCH]; // Enable/disable / channel float pow[AF_NCH]; // Estimated power level [dB] @@ -50,9 +50,9 @@ float time; // Forgetting factor for power estimate int soft; // Enable/disable soft clipping int fast; // Use fix-point volume control_af -}af_volume_t; +}; -static MPXP_Rc __FASTCALL__ config_af(struct af_instance_s* af,const af_conf_t* arg) +static MPXP_Rc __FASTCALL__ config_af(af_instance_t* af,const af_conf_t* arg) { af_volume_t* s = (af_volume_t*)af->setup; // Sanity check @@ -74,7 +74,7 @@ return af_test_output(af,arg); } // Initialization and runtime control_af -static MPXP_Rc __FASTCALL__ control_af(struct af_instance_s* af, int cmd, any_t* arg) +static MPXP_Rc __FASTCALL__ control_af(af_instance_t* af, int cmd, any_t* arg) { af_volume_t* s = (af_volume_t*)af->setup; @@ -131,14 +131,14 @@ } // Deallocate memory -static void __FASTCALL__ uninit(struct af_instance_s* af) +static void __FASTCALL__ uninit(af_instance_t* af) { if(af->setup) delete af->setup; } // Filter data through filter -static mp_aframe_t* __FASTCALL__ play(struct af_instance_s* af,const mp_aframe_t* in) +static mp_aframe_t* __FASTCALL__ play(af_instance_t* af,const mp_aframe_t* in) { af_volume_t*s = (af_volume_t*)af->setup; // Setup for this instance unsigned ch = 0; // Channel counter Modified: mplayerxp/postproc/aflib.h =================================================================== --- mplayerxp/postproc/aflib.h 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/aflib.h 2012-11-29 12:47:49 UTC (rev 485) @@ -86,10 +86,10 @@ ! --------------- */ -typedef struct highpstuff { +struct highp_t { double A, B; float previ, prevo; -} highp_t; +}; /* Private data for Lowpass effect -------------- @@ -97,10 +97,10 @@ ! -------------- */ -typedef struct lowpstuff { +struct lowp_t { double A, B, C; float prev, pprev; -} lowp_t; +}; /* Private data for Bandpass effect --------- @@ -108,12 +108,12 @@ ! ! ------ ------- */ -typedef struct bandstuff { +struct bandp_t { double A, B, C; double prev, pprev; int noise; /* 50 bytes of data, 52 bytes long for allocation purposes. */ -} bandp_t; +}; extern void __FASTCALL__ lowp_init(lowp_t *lp, unsigned center, unsigned rate); extern void __FASTCALL__ highp_init(highp_t *hp, unsigned center, unsigned rate); Modified: mplayerxp/postproc/mpc_info.h =================================================================== --- mplayerxp/postproc/mpc_info.h 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/mpc_info.h 2012-11-29 12:47:49 UTC (rev 485) @@ -1,7 +1,7 @@ #ifndef MP_CODEC_INFO_T #define MP_CODEC_INFO_T -typedef struct mp_codec_info_s +struct mp_codec_info_t { /* codec long name ("Autodesk FLI/FLC Animation decoder" */ const char *name; @@ -13,6 +13,6 @@ const char *author; /* any additional comments */ const char *comment; -} mp_codec_info_t; +}; #endif Modified: mplayerxp/postproc/vf.cpp =================================================================== --- mplayerxp/postproc/vf.cpp 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/vf.cpp 2012-11-29 12:47:49 UTC (rev 485) @@ -281,7 +281,7 @@ //============================================================================ // By default vf doesn't accept MPEGPES -static int __FASTCALL__ vf_default_query_format(struct vf_instance_s* vf, unsigned int fmt,unsigned w,unsigned h){ +static int __FASTCALL__ vf_default_query_format(vf_instance_t* vf, unsigned int fmt,unsigned w,unsigned h){ if(fmt == IMGFMT_MPEGPES) return 0; return 1;//vf_next_query_format(vf,fmt,w,h); } @@ -373,7 +373,7 @@ } } -int __FASTCALL__ vf_next_config(struct vf_instance_s* vf, +int __FASTCALL__ vf_next_config(vf_instance_t* vf, int width, int height, int d_width, int d_height, vo_flags_e voflags, unsigned int outfmt){ int miss; @@ -409,11 +409,11 @@ return vf->next->config_vf(vf->next,width,height,d_width,d_height,voflags,outfmt); } -MPXP_Rc __FASTCALL__ vf_next_control(struct vf_instance_s* vf, int request, any_t* data){ +MPXP_Rc __FASTCALL__ vf_next_control(vf_instance_t* vf, int request, any_t* data){ return vf->next->control_vf(vf->next,request,data); } -int __FASTCALL__ vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt,unsigned width,unsigned height){ +int __FASTCALL__ vf_next_query_format(vf_instance_t* vf, unsigned int fmt,unsigned width,unsigned height){ int flags=vf->next?vf->next->query_format(vf->next,fmt,width,height):(int)vf->default_caps; if(flags) flags|=vf->default_caps; check_pin("vfilter",vf->pin,VF_PIN); @@ -429,7 +429,7 @@ return vf->query_format(vf,fmt,width,height); } -int __FASTCALL__ vf_next_put_slice(struct vf_instance_s* vf,mp_image_t *mpi){ +int __FASTCALL__ vf_next_put_slice(vf_instance_t* vf,mp_image_t *mpi){ int rc; rc = vf->next->put_slice(vf->next,mpi); free_mp_image(mpi); @@ -541,7 +541,7 @@ return flags; } -static int __FASTCALL__ dummy_config(struct vf_instance_s* vf, +static int __FASTCALL__ dummy_config(vf_instance_t* vf, int width, int height, int d_width, int d_height, vo_flags_e voflags, unsigned int outfmt){ return 1; Modified: mplayerxp/postproc/vf.h =================================================================== --- mplayerxp/postproc/vf.h 2012-11-29 11:31:45 UTC (rev 484) +++ mplayerxp/postproc/vf.h 2012-11-29 12:47:49 UTC (rev 485) @@ -6,8 +6,8 @@ #include "libmpdemux/stheader.h" #include "libvo/video_out.h" // for vo_flags_e -struct vf_instance_s; -struct vf_priv_s; +struct vf_instance_t; +struct vf_priv_t; enum { VF_FLAGS_THREADS =0x00000001UL, /**< Thread safe plugin (requires to be applied within of threads) */ @@ -15,79 +15,79 @@ VF_FLAGS_SLICES =0x00000004UL /**< really can draw slices (requires to be applied on SMP etc) */ }; -typedef struct vf_info_s { +struct vf_info_t { const char *info; const char *name; const char *author; const char *comment; const unsigned flags; - MPXP_Rc (* __FASTCALL__ open)(struct vf_instance_s* vf,const char* args); -} vf_info_t; + MPXP_Rc (* __FASTCALL__ open)(vf_instance_t* vf,const char* args); +}; -typedef struct vf_image_context_s { +struct vf_image_context_t { unsigned char* static_planes[2]; int static_idx; -} vf_image_context_t; +}; enum { VF_PIN=RND_NUMBER7+RND_CHAR7 }; -typedef int (* __FASTCALL__ vf_config_fun_t)(struct vf_instance_s* vf, +typedef int (* __FASTCALL__ vf_config_fun_t)(vf_instance_t* vf, int width, int height, int d_width, int d_height, vo_flags_e flags, unsigned int outfmt); -typedef struct vf_instance_s { - const vf_info_t* info; +struct vf_instance_t { + const vf_info_t* info; char antiviral_hole[RND_CHAR5]; unsigned pin; // personal identification number // funcs: - int (* __FASTCALL__ config_vf)(struct vf_instance_s* vf, + int (* __FASTCALL__ config_vf)(vf_instance_t* vf, int width, int height, int d_width, int d_height, vo_flags_e flags, unsigned int outfmt); - MPXP_Rc (* __FASTCALL__ control_vf)(struct vf_instance_s* vf, + MPXP_Rc (* __FASTCALL__ control_vf)(vf_instance_t* vf, int request, any_t* data); - int (* __FASTCALL__ query_format)(struct vf_instance_s* vf, + int (* __FASTCALL__ query_format)(vf_instance_t* vf, unsigned int fmt,unsigned w,unsigned h); - void (* __FASTCALL__ get_image)(struct vf_instance_s* vf, + void (* __FASTCALL__ get_image)(vf_instance_t* vf, mp_image_t *mpi); - int (* __FASTCALL__ put_slice)(struct vf_instance_s* vf, + int (* __FASTCALL__ put_slice)(vf_instance_t* vf, mp_image_t *mpi); - void (* __FASTCALL__ start_slice)(struct vf_instance_s* vf, + void (* __FASTCALL__ start_slice)(vf_instance_t* vf, mp_image_t *mpi); - void (* __FASTCALL__ uninit)(struct vf_instance_s* vf); + void (* __FASTCALL__ uninit)(vf_instance_t* vf); // optional: maybe NULL - void (* __FASTCALL__ print_conf)(struct vf_instance_s* vf); ... [truncated message content] |