[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[559] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-12-13 14:55:28
|
Revision: 559 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=559&view=rev Author: nickols_k Date: 2012-12-13 14:55:16 +0000 (Thu, 13 Dec 2012) Log Message: ----------- c++ way: decrease number of typedef Modified Paths: -------------- mplayerxp/libao2/audio_out.h mplayerxp/libmpcodecs/ad.h mplayerxp/libmpcodecs/vd.h mplayerxp/libmpconf/cfgparser.h mplayerxp/libmpconf/m_option.h mplayerxp/libmpconf/m_property.h mplayerxp/libmpconf/m_struct.h mplayerxp/libmpconf/subopt-helper.h mplayerxp/libmpdemux/demuxer.h mplayerxp/libmpdemux/demuxer_r.h mplayerxp/libmpdemux/matroska.h mplayerxp/libmpdemux/mpeg_hdr.h mplayerxp/libmpdemux/mpxpav64.h mplayerxp/libmpdemux/muxer.h mplayerxp/libmpsub/spudec.cpp mplayerxp/libmpsub/subreader.h mplayerxp/libmpsub/vobsub.cpp mplayerxp/libplaytree/playtree.h mplayerxp/libplaytree/playtreeparser.cpp mplayerxp/libplaytree/playtreeparser.h mplayerxp/libvo2/dri_vo.h mplayerxp/libvo2/font_load.h mplayerxp/libvo2/img_format.h mplayerxp/libvo2/jpeg_enc.h mplayerxp/libvo2/sub.h mplayerxp/libvo2/video_out.h mplayerxp/libvo2/x11_system.h mplayerxp/mp_msg.cpp mplayerxp/mplayerxp.h mplayerxp/osdep/cpudetect.h mplayerxp/osdep/vbelib.h mplayerxp/xmpcore/mp_aframe.h mplayerxp/xmpcore/mp_image.h Modified: mplayerxp/libao2/audio_out.h =================================================================== --- mplayerxp/libao2/audio_out.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libao2/audio_out.h 2012-12-13 14:55:16 UTC (rev 559) @@ -4,16 +4,16 @@ #include "xmpcore/xmp_enums.h" /** Text description of AO-driver */ -typedef struct ao_info_s +struct ao_info_t { const char *name; /**< driver name ("alsa driver") */ const char *short_name; /**< short name (for config strings) ("alsa") */ const char *author; /**< author ("Aaron Holtzman <aho...@es...>") */ const char *comment;/**< any additional comments */ -} ao_info_t; +}; /** Global data used by mplayerxp and plugins */ -typedef struct ao_data_s +struct ao_data_t { char* subdevice; char antiviral_hole[RND_CHAR2]; @@ -26,10 +26,10 @@ float pts; /**< PTS of audio buffer */ any_t* opaque; /**< for internal use */ any_t* priv; -} ao_data_t; +}; /** AO-driver interface */ -typedef struct ao_functions_s +struct ao_functions_t { const ao_info_t *info; /**< text-info about this driver */ @@ -80,7 +80,7 @@ /** Resumes playing, after audio_pause() */ void (* __FASTCALL__ resume)(ao_data_t*); -} ao_functions_t; +}; enum { AOCONTROL_SET_DEVICE =1, /**< Sets new audio device (example: /dev/dsp2) */ @@ -91,10 +91,11 @@ AOCONTROL_GET_VOLUME =6, /**< Query volume level */ AOCONTROL_SET_VOLUME =7 /**< Sets new volume level */ }; -typedef struct ao_control_vol_s { + +struct ao_control_vol_t { float left; float right; -} ao_control_vol_t; +}; /* prototypes */ extern const char * __FASTCALL__ ao_format_name(int format); Modified: mplayerxp/libmpcodecs/ad.h =================================================================== --- mplayerxp/libmpcodecs/ad.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpcodecs/ad.h 2012-12-13 14:55:16 UTC (rev 559) @@ -8,13 +8,12 @@ #include "xmpcore/xmp_enums.h" #include "libao2/afmt.h" -typedef struct ad_info_s -{ +struct ad_info_t { const char *descr; /* driver description ("Autodesk FLI/FLC Animation decoder" */ const char *driver_name; /* driver name ("dshow") */ const char *author; /* interface author/maintainer */ const char *url; /* URL of homepage */ -} ad_info_t; +}; enum { ADCTRL_RESYNC_STREAM=0, @@ -32,13 +31,13 @@ ACodecStatus_NotWorking =0, }acodec_status_e; -typedef struct audio_probe_s { +struct audio_probe_t { const char* driver; const char* codec_dll; uint32_t wtag; acodec_status_e status; unsigned sample_fmt[Audio_MaxOutSample]; -}audio_probe_t; +}; struct audio_filter_info_t { af_stream_t* afilter; @@ -47,7 +46,7 @@ /* interface of video decoder drivers */ struct ad_private_t; -typedef struct ad_functions_s +struct ad_functions_t { const ad_info_t* info; const config_t* options;/**< Optional: MPlayerXP's option related */ @@ -57,7 +56,7 @@ void (* __FASTCALL__ uninit)(ad_private_t *ctx); MPXP_Rc (*control_ad)(ad_private_t *ctx,int cmd,any_t* arg, ...); unsigned (* __FASTCALL__ decode)(ad_private_t *ctx,unsigned char *buf,unsigned minlen,unsigned maxlen,float *pts); -} ad_functions_t; +}; extern const ad_functions_t* afm_find_driver(const char *name); extern const audio_probe_t* afm_probe_driver(ad_private_t*ctx,sh_audio_t*sh,audio_filter_info_t* afi); Modified: mplayerxp/libmpcodecs/vd.h =================================================================== --- mplayerxp/libmpcodecs/vd.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpcodecs/vd.h 2012-12-13 14:55:16 UTC (rev 559) @@ -30,22 +30,21 @@ VCodecStatus_NotWorking =0, }vcodec_status_e; -typedef struct video_probe_s { +struct video_probe_t { const char* driver; const char* codec_dll; uint32_t fourcc; vcodec_status_e status; uint32_t pix_fmt[Video_MaxOutFmt]; video_flags_e flags[Video_MaxOutFmt]; -}video_probe_t; +}; -typedef struct vd_info_s -{ +struct vd_info_t { const char *descr; /* driver description ("Autodesk FLI/FLC Animation decoder" */ const char *driver_name; /* driver name ("dshow") */ const char *author; /* interface author/maintainer */ const char *url; /* URL of homepage */ -} vd_info_t; +}; struct put_slice_info_t { int vf_flags; @@ -53,8 +52,7 @@ }; /* interface of video decoder drivers */ struct vd_private_t; -typedef struct vd_functions_s -{ +struct vd_functions_t { const vd_info_t* info; const config_t* options;/**< Optional: MPlayerXP's option related */ const video_probe_t*(*__FASTCALL__ probe)(uint32_t fourcc); @@ -63,7 +61,7 @@ void (*__FASTCALL__ uninit)(vd_private_t *ctx); MPXP_Rc (*control_vd)(vd_private_t *ctx,int cmd,any_t* arg, ...); mp_image_t* (*__FASTCALL__ decode)(vd_private_t *ctx,const enc_frame_t* frame); -} vd_functions_t; +}; extern const vd_functions_t* vfm_find_driver(const char *name); extern const video_probe_t* vfm_driver_probe(vd_private_t*ctx,sh_video_t *sh,put_slice_info_t* psi); Modified: mplayerxp/libmpconf/cfgparser.h =================================================================== --- mplayerxp/libmpconf/cfgparser.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpconf/cfgparser.h 2012-12-13 14:55:16 UTC (rev 559) @@ -37,8 +37,6 @@ CONF_GLOBAL =(1<<4), CONF_NOSAVE =(1<<5) }; -typedef struct m_config m_config_t; -typedef struct config_save config_save_t; struct config_t { const char *name; @@ -50,9 +48,10 @@ }; typedef void (*cfg_default_func_t)(config_t*,const char*); -struct m_config { - m_config(libinput_t& _libinput):libinput(_libinput) {} - ~m_config() {} +struct config_save_t; +struct m_config_t { + m_config_t(libinput_t& _libinput):libinput(_libinput) {} + ~m_config_t() {} const config_t** opt_list; config_save_t** config_stack; @@ -69,7 +68,7 @@ libinput_t& libinput; }; -struct config_save { +struct config_save_t { const config_t* opt; union { int as_int; Modified: mplayerxp/libmpconf/m_option.h =================================================================== --- mplayerxp/libmpconf/m_option.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpconf/m_option.h 2012-12-13 14:55:16 UTC (rev 559) @@ -10,8 +10,8 @@ /// \file m_option.h /// \ingroup OptionTypes -typedef struct m_option_type m_option_type_t; -typedef struct m_option m_option_t; +struct m_option_type_t; +struct m_option_t; struct m_struct_t; /// \defgroup OptionTypes Options types @@ -46,24 +46,25 @@ END_AT_TIME=1, END_AT_SIZE=2 }; -typedef struct { + +struct m_time_size_t { double pos; int type; -} m_time_size_t; +}; /// Extra definition needed for \ref m_option_type_obj_settings_list options. -typedef struct { +struct m_obj_list_t { any_t** list; /// Pointer to an array of pointer to some object type description struct. any_t* name_off; /// Offset of the object type name (char*) in the description struct. any_t* info_off; /// Offset of the object type info string (char*) in the description struct. any_t* desc_off; /// \brief Offset of the object type parameter description (\ref m_struct_st) in the description struct. -} m_obj_list_t; +}; /// The data type used by \ref m_option_type_obj_settings_list. -typedef struct m_obj_settings { +struct m_obj_settings_t { const char* name; /// Type of the object. char** attribs; /// NULL terminated array of parameter/value pairs. -} m_obj_settings_t; +}; /// A parser to set up a list of objects. /** It creates a NULL terminated array \ref m_obj_settings. The option priv @@ -73,12 +74,12 @@ extern const m_option_type_t m_option_type_obj_settings_list; /// Extra definition needed for \ref m_option_type_obj_presets options. -typedef struct { +struct m_obj_presets_t { struct m_struct_t* in_desc; /// Description of the struct holding the presets. struct m_struct_t* out_desc; /// Description of the struct that should be set by the presets. any_t* presets; /// Pointer to an array of structs defining the various presets. any_t* name_off; /// Offset of the preset's name inside the in_struct. -} m_obj_presets_t; +}; /// Set several fields in a struct at once. /** For this two struct descriptions are used. One for the struct holding the @@ -97,10 +98,10 @@ extern const m_option_type_t m_option_type_custom_url; #endif /// Extra definition needed for \ref m_option_type_obj_params options. -typedef struct { +struct m_obj_params_t { const struct m_struct_t* desc; /// Field descriptions. char separator; /// Field separator to use. -} m_obj_params_t; +}; /// Parse a set of parameters. /** Parameters are separated by the given separator and each one @@ -109,10 +110,10 @@ */ extern const m_option_type_t m_option_type_obj_params; -typedef struct { +struct m_span_t { int start; int end; -} m_span_t; +}; /// Ready made settings to parse a \ref m_span_t with a start-end syntax. extern const m_obj_params_t m_span_params_def; @@ -143,7 +144,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////// /// Option type description -struct m_option_type { +struct m_option_type_t { const char* name; const char* comments; /// Syntax description, etc unsigned int size; /// Size needed for the data. @@ -214,7 +215,7 @@ /// Option description /** \ingroup Options */ -struct m_option { +struct m_option_t { const char *name; /// Option name. /** The suboption parser and func types do use it. They should instead * use the priv field but this was inherited from older versions of the Modified: mplayerxp/libmpconf/m_property.h =================================================================== --- mplayerxp/libmpconf/m_property.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpconf/m_property.h 2012-12-13 14:55:16 UTC (rev 559) @@ -52,11 +52,11 @@ ///@{ /// Argument for \ref M_PROPERTY_KEY_ACTION -typedef struct { +struct m_property_action_t { const char* key; int action; const any_t* arg; -} m_property_action_t; +}; ///@} Modified: mplayerxp/libmpconf/m_struct.h =================================================================== --- mplayerxp/libmpconf/m_struct.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpconf/m_struct.h 2012-12-13 14:55:16 UTC (rev 559) @@ -8,7 +8,7 @@ /// \file m_struct.h -struct m_option; +struct m_option_t; /// Struct definition struct m_struct_t { @@ -19,7 +19,7 @@ /** The p field of the \ref m_option struct must contain the offset * of the member in the struct (use M_ST_OFF macro for this). */ - const struct m_option* fields; + const struct m_option_t* fields; }; @@ -97,7 +97,7 @@ * \param f Name of the field. * \return The \ref m_option struct describing the field or NULL if not found. */ -const struct m_option* +const struct m_option_t* m_struct_get_field(const m_struct_t* st,const char* f); ///@} Modified: mplayerxp/libmpconf/subopt-helper.h =================================================================== --- mplayerxp/libmpconf/subopt-helper.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpconf/subopt-helper.h 2012-12-13 14:55:16 UTC (rev 559) @@ -19,26 +19,23 @@ typedef int (*opt_test_f)(any_t*); /** simple structure for defining the option name, type and storage location */ -typedef struct opt_s -{ +struct opt_t { const char * name; ///< string that identifies the option int type; ///< option type as defined in subopt-helper.h any_t* valp; ///< pointer to the mem where the value should be stored opt_test_f test; ///< argument test func ( optional ) -} opt_t; +}; /** parses the string for the options specified in opt */ int subopt_parse( char const * const str, const opt_t * opts ); /*------------------ arg specific types and declaration -------------------*/ -typedef struct strarg_s -{ +typedef struct strarg_t { int len; ///< length of the string determined by the parser char const * str; ///< pointer to position inside the parse string -} strarg_t; +}; - int int_non_neg( int * i ); int int_pos( int * i ); Modified: mplayerxp/libmpdemux/demuxer.h =================================================================== --- mplayerxp/libmpdemux/demuxer.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpdemux/demuxer.h 2012-12-13 14:55:16 UTC (rev 559) @@ -37,10 +37,10 @@ DEMUX_SEEK_PERCENTS =0x02 }; - typedef struct seek_args_s { + struct seek_args_t { float secs; unsigned flags; - }seek_args_t; + }; struct sh_audio_t; struct sh_video_t; Modified: mplayerxp/libmpdemux/demuxer_r.h =================================================================== --- mplayerxp/libmpdemux/demuxer_r.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpdemux/demuxer_r.h 2012-12-13 14:55:16 UTC (rev 559) @@ -12,14 +12,14 @@ VideoFrame=RND_NUMBER1 }enc_frame_type_e; -typedef struct enc_frame_s { +struct enc_frame_t { enc_frame_type_e type; float pts; float duration; unsigned len; uint8_t* data; unsigned flags; // codec specific flags. filled by video_decode -}enc_frame_t; +}; extern enc_frame_t* new_enc_frame(enc_frame_type_e type,unsigned len,float pts,float duration); extern void free_enc_frame(enc_frame_t* frame); Modified: mplayerxp/libmpdemux/matroska.h =================================================================== --- mplayerxp/libmpdemux/matroska.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpdemux/matroska.h 2012-12-13 14:55:16 UTC (rev 559) @@ -154,7 +154,7 @@ MATROSKA_SUBTYPE_VOBSUB =3 }; -typedef struct { +struct mkv_sh_sub_t { char type; // t = text, v = VobSub int has_palette; // If we have a valid palette unsigned int palette[16]; // for VobSubs @@ -162,7 +162,7 @@ int custom_colors; unsigned int colors[4]; int forced_subs_only; -} mkv_sh_sub_t; +}; #if 0 int demux_mkv_num_subs(demuxer_t *demuxer); Modified: mplayerxp/libmpdemux/mpeg_hdr.h =================================================================== --- mplayerxp/libmpdemux/mpeg_hdr.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpdemux/mpeg_hdr.h 2012-12-13 14:55:16 UTC (rev 559) @@ -1,5 +1,5 @@ -typedef struct { +struct mp_mpeg_header_t { // video info: int mpeg1; // 0=mpeg2 1=mpeg1 int display_picture_width; @@ -18,7 +18,7 @@ //the following are for mpeg4 int timeinc_resolution, timeinc_bits, timeinc_unit; int picture_type; -} mp_mpeg_header_t; +}; int mp_header_process_sequence_header (mp_mpeg_header_t * picture, unsigned char * buffer); int mp_header_process_extension (mp_mpeg_header_t * picture, unsigned char * buffer); Modified: mplayerxp/libmpdemux/mpxpav64.h =================================================================== --- mplayerxp/libmpdemux/mpxpav64.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpdemux/mpxpav64.h 2012-12-13 14:55:16 UTC (rev 559) @@ -8,7 +8,7 @@ MPXPAV64_FP_FCNT_UTF16 =0x00000002ULL, MPXPAV64_FP_FCNT_UTF32 =0x00000003ULL }; -typedef struct __attribute__((__packed__)) mpxpav64FileProperties_s /* FPRP */ +struct __attribute__((__packed__)) mpxpav64FileProperties_t /* FPRP */ { uint64_t num_packets; //Number of 'DATx' packets uint64_t num_bytes; //Number of 'DATx' bytes @@ -18,19 +18,19 @@ uint32_t MaxBitrate; //Maximum bitrate of the media (sum of all the stream) uint32_t AveBitrate; //Average bitrate of the media (sum of all the stream) uint16_t StreamCount; //Number of StreamProp Objects -}mpxpav64FileProperties_t; -#define le2me_mpxpav64FileProperties(h) { \ - (h)->num_packets = le2me_64((h)->num_packets); \ - (h)->num_bytes = le2me_64((h)->num_bytes); \ - (h)->flags = le2me_64((h)->flags); \ - (h)->PlayDuration = le2me_64((h)->PlayDuration); \ - (h)->Preroll = le2me_32((h)->Preroll); \ - (h)->MaxBitrate = le2me_32((h)->MaxBitrate); \ - (h)->AveBitrate = le2me_32((h)->AveBitrate); \ - (h)->StreamCount = le2me_16((h)->StreamCount); \ +}; +inline void le2me_mpxpav64FileProperties(mpxpav64FileProperties_t* h) { + h->num_packets = le2me_64(h->num_packets); + h->num_bytes = le2me_64(h->num_bytes); + h->flags = le2me_64(h->flags); + h->PlayDuration = le2me_64(h->PlayDuration); + h->Preroll = le2me_32(h->Preroll); + h->MaxBitrate = le2me_32(h->MaxBitrate); + h->AveBitrate = le2me_32(h->AveBitrate); + h->StreamCount = le2me_16(h->StreamCount); } -typedef struct __attribute__((__packed__)) mpxpav64StreamProperties_s +struct __attribute__((__packed__)) mpxpav64StreamProperties_t { uint64_t num_packets; //Number of 'DATx' packets of this stream type uint64_t num_bytes; //Number of 'DATx' bytes of this stream type @@ -50,24 +50,24 @@ uint64_t size_scaler; //Numerator of SIZE fields to get size in bytes (default: 1) uint8_t mimetype_len; //length of mime-type uint8_t ascii[0];//mime-type: video/x-video audio/x-audio text/x-text -}mpxpav64StreamProperties_t; -#define le2me_mpxpav64StreamProperties(h) { \ - (h)->num_packets = le2me_64((h)->num_packets); \ - (h)->num_bytes = le2me_64((h)->num_bytes); \ - (h)->flags = le2me_64((h)->flags); \ - (h)->PlayDuration = le2me_64((h)->PlayDuration); \ - (h)->Preroll = le2me_32((h)->Preroll); \ - (h)->MaxPacketSize = le2me_32((h)->MaxPacketSize); \ - (h)->AvePacketSize = le2me_32((h)->AvePacketSize); \ - (h)->MinPacketSize = le2me_32((h)->MinPacketSize); \ - (h)->MaxFrameDuration = le2me_32((h)->MaxFrameDuration); \ - (h)->AveFrameDuration = le2me_32((h)->AveFrameDuration); \ - (h)->MinFrameDuration = le2me_32((h)->MinFrameDuration); \ - (h)->MaxBitrate = le2me_32((h)->MaxBitrate); \ - (h)->AveBitrate = le2me_32((h)->AveBitrate); \ - (h)->MinBitrate = le2me_32((h)->MinBitrate); \ - (h)->pts_rate = le2me_64((h)->pts_rate); \ - (h)->size_scaler = le2me_64((h)->size_scaler); \ +}; +static void le2me_mpxpav64StreamProperties(mpxpav64StreamProperties_t *h) { + h->num_packets = le2me_64(h->num_packets); + h->num_bytes = le2me_64(h->num_bytes); + h->flags = le2me_64(h->flags); + h->PlayDuration = le2me_64(h->PlayDuration); + h->Preroll = le2me_32(h->Preroll); + h->MaxPacketSize = le2me_32(h->MaxPacketSize); + h->AvePacketSize = le2me_32(h->AvePacketSize); + h->MinPacketSize = le2me_32(h->MinPacketSize); + h->MaxFrameDuration = le2me_32(h->MaxFrameDuration); + h->AveFrameDuration = le2me_32(h->AveFrameDuration); + h->MinFrameDuration = le2me_32(h->MinFrameDuration); + h->MaxBitrate = le2me_32(h->MaxBitrate); + h->AveBitrate = le2me_32(h->AveBitrate); + h->MinBitrate = le2me_32(h->MinBitrate); + h->pts_rate = le2me_64(h->pts_rate); + h->size_scaler = le2me_64(h->size_scaler); } #endif Modified: mplayerxp/libmpdemux/muxer.h =================================================================== --- mplayerxp/libmpdemux/muxer.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpdemux/muxer.h 2012-12-13 14:55:16 UTC (rev 559) @@ -16,18 +16,18 @@ }; #include "demuxer_r.h" -typedef struct muxer_packet_s{ +struct muxer_packet_t { float pts; any_t*data; unsigned length; unsigned flags; - struct muxer_packet_s *next; -}muxer_packet_t; + muxer_packet_t *next; +}; muxer_packet_t* new_muxer_packet(float pts,any_t*data,unsigned length,unsigned flags); void free_muxer_packet(muxer_packet_t *packet); -typedef struct { +struct muxer_stream_t { // muxer data: int type; // audio or video int id; // stream no @@ -54,14 +54,14 @@ muxer_packet_t *first; muxer_packet_t *last; any_t*priv; -} muxer_stream_t; +}; -typedef struct { +struct muxer_info_t { uint32_t id; const char *text; -} muxer_info_t; +}; -typedef struct muxer_t{ +struct muxer_t { // encoding: MainAVIHeader avih; muxer_stream_t* def_v; // default video stream (for general headers) @@ -73,7 +73,7 @@ muxer_stream_t* (*cont_new_stream)(struct muxer_t *,int); FILE* file; any_t*priv; -} muxer_t; +}; muxer_t *muxer_new_muxer(const char *type,const char *subtype,FILE *f); #define muxer_new_stream(muxer,a) muxer->cont_new_stream(muxer,a) Modified: mplayerxp/libmpsub/spudec.cpp =================================================================== --- mplayerxp/libmpsub/spudec.cpp 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpsub/spudec.cpp 2012-12-13 14:55:16 UTC (rev 559) @@ -42,7 +42,6 @@ int spu_alignment = -1; float spu_gaussvar = 1.0; -typedef struct packet_t packet_t; struct packet_t { unsigned char *packet; unsigned int palette[4]; @@ -59,7 +58,7 @@ packet_t *next; }; -typedef struct { +struct spudec_handle_t { packet_t *queue_head; packet_t *queue_tail; unsigned int global_palette[16]; @@ -92,7 +91,7 @@ int spu_changed; unsigned int forced_subs_only; /* flag: 0=display all subtitle, !0 display only forced subtitles */ unsigned int is_forced_sub; /* true if current subtitle is a forced subtitle */ -} spudec_handle_t; +}; static void __FASTCALL__ spudec_queue_packet(spudec_handle_t *self, packet_t *packet) { @@ -670,13 +669,12 @@ return alpha ? 256 - alpha : 0; } -typedef struct { +struct scale_pixel { unsigned position; unsigned left_up; unsigned right_down; -}scale_pixel; +}; - static void __FASTCALL__ scale_table(unsigned int start_src, unsigned int start_tar, unsigned int end_src, unsigned int end_tar, scale_pixel * table) { unsigned int t; Modified: mplayerxp/libmpsub/subreader.h =================================================================== --- mplayerxp/libmpsub/subreader.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpsub/subreader.h 2012-12-13 14:55:16 UTC (rev 559) @@ -27,15 +27,14 @@ SUB_MAX_TEXT =5 }; -typedef struct { - +struct subtitle { int lines; unsigned long start; unsigned long end; char *text[SUB_MAX_TEXT]; -} subtitle; +}; extern subtitle* sub_read_file (const char *filename, float pts); extern char * sub_filename(const char *path,const char *fname); Modified: mplayerxp/libmpsub/vobsub.cpp =================================================================== --- mplayerxp/libmpsub/vobsub.cpp 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libmpsub/vobsub.cpp 2012-12-13 14:55:16 UTC (rev 559) @@ -73,7 +73,7 @@ * MPEG parsing **********************************************************************/ -typedef struct { +struct mpeg_t { Stream *stream; unsigned int pts; int aid; @@ -81,7 +81,7 @@ unsigned int packet_reserve; unsigned int packet_size; int fd; -} mpeg_t; +}; static mpeg_t * __FASTCALL__ mpeg_open(const char *filename) { @@ -290,20 +290,20 @@ * Packet queue **********************************************************************/ -typedef struct { +struct packet_t { unsigned int pts100; off_t filepos; unsigned int size; unsigned char *data; -} packet_t; +}; -typedef struct { +struct packet_queue_t { char *id; packet_t *packets; unsigned int packets_reserve; unsigned int packets_size; unsigned int current_index; -} packet_queue_t; +}; static void __FASTCALL__ packet_construct(packet_t *pkt) { @@ -397,7 +397,7 @@ * Vosub **********************************************************************/ -typedef struct { +struct vobsub_t { unsigned int palette[16]; unsigned int cuspal[4]; int delay; @@ -410,7 +410,7 @@ packet_queue_t *spu_streams; unsigned int spu_streams_size; unsigned int spu_streams_current; -} vobsub_t; +}; /* Make sure that the spu stream idx exists. */ static int __FASTCALL__ vobsub_ensure_spu_stream(vobsub_t *vob, unsigned int _index) Modified: mplayerxp/libplaytree/playtree.h =================================================================== --- mplayerxp/libplaytree/playtree.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libplaytree/playtree.h 2012-12-13 14:55:16 UTC (rev 559) @@ -1,8 +1,10 @@ #ifndef __PLAYTREE_H #define __PLAYTREE_H +struct m_config_t; namespace mpxp { struct Stream; + struct libinput_t; } enum { @@ -37,20 +39,6 @@ /// \defgroup Playtree ///@{ -#include "libmpconf/cfgparser.h" - -#if 0 -typedef struct play_tree_info play_tree_info_t; -// TODO : a attrib,val pair system and not something hardcoded -struct play_tree_info { - char* title; - char* author; - char* copyright; - char* abstract; - // Some more ?? -} -#endif - struct play_tree_param_t { char* name; char* value; Modified: mplayerxp/libplaytree/playtreeparser.cpp =================================================================== --- mplayerxp/libplaytree/playtreeparser.cpp 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libplaytree/playtreeparser.cpp 2012-12-13 14:55:16 UTC (rev 559) @@ -192,11 +192,11 @@ return i+1; } -typedef struct pls_entry { +struct pls_entry_t { char* file; char* title; char* length; -} pls_entry_t; +}; static int __FASTCALL__ pls_read_entry(char* line,pls_entry_t** _e,int* _max_entry,char** val) { int num,max_entry = (*_max_entry); Modified: mplayerxp/libplaytree/playtreeparser.h =================================================================== --- mplayerxp/libplaytree/playtreeparser.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libplaytree/playtreeparser.h 2012-12-13 14:55:16 UTC (rev 559) @@ -3,14 +3,13 @@ #include "playtree.h" -typedef struct play_tree_parser { +struct play_tree_parser_t { Stream* stream; char *buffer,*iter,*line; int buffer_size , buffer_end; int deep,keep; -} play_tree_parser_t; +}; - play_tree_parser_t* play_tree_parser_new(Stream * stream,int deep); void play_tree_parser_free(play_tree_parser_t* p); Modified: mplayerxp/libvo2/dri_vo.h =================================================================== --- mplayerxp/libvo2/dri_vo.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/dri_vo.h 2012-12-13 14:55:16 UTC (rev 559) @@ -22,22 +22,20 @@ DRI_CAP_HWOSD =0x00000100UL,/**< Driver supports OSD painting */ DRI_CAP_BUSMASTERING=0x80000000UL /**< Means: final video buffer but allocated in RAM */ }; -typedef struct dri_surface_cap_s -{ +struct dri_surface_cap_t { unsigned caps; /**< Capabilities of surface (see DRI_CAP_* for detail) */ unsigned fourcc; /**< real fourcc of vo2 surface */ unsigned width,height; /**< specify total dimension of surface */ unsigned x,y,w,h; /**< specify movie position within surface */ unsigned strides[4]; /**< drv->app:specify strides of each plane */ -}dri_surface_cap_t; +}; enum { MAX_DRI_BUFFERS=1024 /**< Maximal number of surfaces */ }; /** Contains surface address */ -typedef struct dri_surface_s -{ +struct dri_surface_t { unsigned idx; /**< app->drv:specify number of surface (0 default for single buffering) */ uint8_t* planes[4]; /**< drv->app:specify planes (include alpha channel) */ -}dri_surface_t; +}; #endif Modified: mplayerxp/libvo2/font_load.h =================================================================== --- mplayerxp/libvo2/font_load.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/font_load.h 2012-12-13 14:55:16 UTC (rev 559) @@ -1,13 +1,13 @@ #ifndef __FONT_LOAD_H #define __FONT_LOAD_H 1 -typedef struct { +struct raw_file { unsigned char *bmp; unsigned char *pal; int w,h,c; -} raw_file; +}; -typedef struct { +struct font_desc_t { char *name; char *fpath; int spacewidth; @@ -20,7 +20,7 @@ short font[65536]; int start[65536]; short width[65536]; -} font_desc_t; +}; raw_file* load_raw(const char *name,int verbose); font_desc_t* read_font_desc(const char* fname,float factor,int verbose); Modified: mplayerxp/libvo2/img_format.h =================================================================== --- mplayerxp/libvo2/img_format.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/img_format.h 2012-12-13 14:55:16 UTC (rev 559) @@ -142,12 +142,12 @@ static inline int IMGFMT_IS_XVMC(uint32_t fmt) { return ((fmt)&IMGFMT_XVMC_MASK)==IMGFMT_XVMC; } static inline int IMGFMT_IS_VDPAU(uint32_t fmt) { return ((fmt)&IMGFMT_VDPAU_MASK)==IMGFMT_VDPAU; } -typedef struct { +struct vo_mpegpes_t { any_t* data; int size; int id; // stream id. usually 0x1E0 int timestamp; // pts, 90000 Hz counter based -} vo_mpegpes_t; +}; /** Returns human-readable fourcc description * @param format fourcc of image Modified: mplayerxp/libvo2/jpeg_enc.h =================================================================== --- mplayerxp/libvo2/jpeg_enc.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/jpeg_enc.h 2012-12-13 14:55:16 UTC (rev 559) @@ -23,7 +23,7 @@ */ -typedef struct { +struct jpeg_enc_t { struct MpegEncContext *s; int cheap_upsample; int bw; @@ -33,7 +33,7 @@ int y_rs; int u_rs; int v_rs; -} jpeg_enc_t; +}; jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize, int u_psize, int u_rsize, int v_psize, int v_rsize, Modified: mplayerxp/libvo2/sub.h =================================================================== --- mplayerxp/libvo2/sub.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/sub.h 2012-12-13 14:55:16 UTC (rev 559) @@ -4,9 +4,9 @@ #include "osd_render.h" namespace mpxp { - typedef struct mp_osd_bbox_s { + struct mp_osd_bbox_t { int x1,y1,x2,y2; - } mp_osd_bbox_t; + }; enum { OSDTYPE_OSD =1, @@ -31,8 +31,8 @@ MAX_UCSLINES =16 }; - typedef struct mp_osd_obj_s { - struct mp_osd_obj_s* next; + struct mp_osd_obj_t { + mp_osd_obj_t* next; unsigned char type; unsigned char alignment; // 2 bits: x;y percents, 2 bits: x;y relative to parent; 2 bits: alignment left/right/center unsigned short flags; @@ -56,7 +56,7 @@ int allocated; unsigned char *alpha_buffer; unsigned char *bitmap_buffer; - } mp_osd_obj_t; + }; enum { OSD_PLAY =0x01, @@ -78,14 +78,14 @@ OSD_PB_1 =0x13 }; - typedef struct sub_data_s { + struct sub_data_t { char * cp; int unicode; int utf8; int pos; int bg_color; /* subtitles background color */ int bg_alpha; - }sub_data_t; + }; extern sub_data_t sub_data; class Video_Output; Modified: mplayerxp/libvo2/video_out.h =================================================================== --- mplayerxp/libvo2/video_out.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/video_out.h 2012-12-13 14:55:16 UTC (rev 559) @@ -75,14 +75,14 @@ inline vo_flags_e operator^=(vo_flags_e a, vo_flags_e b) { return (a=static_cast<vo_flags_e>(static_cast<unsigned>(a)^static_cast<unsigned>(b))); } /** Request for supported FOURCC by VO-driver */ - typedef struct vo_query_fourcc_s { + struct vo_query_fourcc_t { uint32_t fourcc; /**< Fourcc of decoded image */ unsigned w,h; /**< Width and height of decoded image */ unsigned flags; /**< Flags for this fourcc VOCAP_* */ - }vo_query_fourcc_t; + }; /** Named video equalizer */ - typedef struct vo_videq_s { + struct vo_videq_t { #define VO_EC_BRIGHTNESS "Brightness" #define VO_EC_CONTRAST "Contrast" #define VO_EC_GAMMA "Gamma" @@ -93,9 +93,9 @@ #define VO_EC_BLUE_INTENSITY "BlueIntensity" const char *name; /**< name of equalizer control */ int value; /**< value of equalizer control in range -1000 +1000 */ - }vo_videq_t; + }; - typedef struct vo_gamma_s{ + struct vo_gamma_t{ int brightness; int saturation; int contrast; @@ -103,11 +103,11 @@ int red_intensity; int green_intensity; int blue_intensity; - }vo_gamma_t; + }; - typedef struct vo_rect_s { + struct vo_rect_t { unsigned x,y,w,h; - }vo_rect_t; + }; struct vo_rect2 { int left, right, top, bottom, width, height; @@ -242,12 +242,12 @@ vo_adjust_size_t adjust_size; }; /** Contains geometry of fourcc */ - typedef struct s_vo_format_desc { + struct vo_format_desc { unsigned bpp; /* in some strange fourccs (NV12) horz period != vert period of UV */ unsigned x_mul[4],x_div[4]; unsigned y_mul[4],y_div[4]; - }vo_format_desc; + }; extern int __FASTCALL__ vo_describe_fourcc(uint32_t fourcc,vo_format_desc *vd); } // namespace mpxp #endif Modified: mplayerxp/libvo2/x11_system.h =================================================================== --- mplayerxp/libvo2/x11_system.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/libvo2/x11_system.h 2012-12-13 14:55:16 UTC (rev 559) @@ -21,13 +21,13 @@ #include "dri_vo.h" namespace mpxp { - typedef struct { + struct MotifWmHints_t { long flags; long functions; long decorations; long input_mode; long state; - }MotifWmHints_t; + }; class X11_System { public: Modified: mplayerxp/mp_msg.cpp =================================================================== --- mplayerxp/mp_msg.cpp 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/mp_msg.cpp 2012-12-13 14:55:16 UTC (rev 559) @@ -13,14 +13,14 @@ #include "mp_msg.h" namespace mpxp { -#define _bg(x) ((x) >> 4) -#define _fg(x) ((x) & 0x0f) -typedef struct priv_s { +inline int _bg(int x) { return x >> 4; } +inline int _fg(int x) { return x & 0x0f; } +struct priv_t { int _color[8]; char vtmp[100]; char scol[9][20]; pthread_mutex_t mp_msg_mutex; -}priv_t; +}; const char hl[9] = { 0xC, 0x4, 0xE, 0xA, 0xB, 0x7, 0x9, 0x3, 0x7 }; static char *_2ansi(unsigned char attr) Modified: mplayerxp/mplayerxp.h =================================================================== --- mplayerxp/mplayerxp.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/mplayerxp.h 2012-12-13 14:55:16 UTC (rev 559) @@ -125,7 +125,7 @@ extern MP_Config mp_conf; /* Benchmarking */ - typedef struct time_usage_s { + struct time_usage_t { double video; double vout; double audio_decode_correction; @@ -146,7 +146,7 @@ double cur_vout; double min_vout; double total_start; - }time_usage_t; + }; struct MPXPSystem; struct xp_core_t; Modified: mplayerxp/osdep/cpudetect.h =================================================================== --- mplayerxp/osdep/cpudetect.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/osdep/cpudetect.h 2012-12-13 14:55:16 UTC (rev 559) @@ -38,7 +38,7 @@ CPUTYPE_I686=6 }; - typedef struct cpucaps_s { + struct CpuCaps { int cpuType; int cpuStepping; int hasMMX; @@ -56,7 +56,7 @@ int hasAVX; int isX86; unsigned cl_size; /* size of cache line */ - } CpuCaps; + }; extern CpuCaps gCpuCaps; Modified: mplayerxp/osdep/vbelib.h =================================================================== --- mplayerxp/osdep/vbelib.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/osdep/vbelib.h 2012-12-13 14:55:16 UTC (rev 559) @@ -13,10 +13,10 @@ /* Note: every pointer within structures is 32-bit protected mode pointer. So you don't need to convert it from real mode. */ - typedef struct tagFarPtr { + struct FarPtr { unsigned short off; unsigned short seg; - }FarPtr; + }; enum { VBE_DAC_8BIT =(1 << 0), Modified: mplayerxp/xmpcore/mp_aframe.h =================================================================== --- mplayerxp/xmpcore/mp_aframe.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/xmpcore/mp_aframe.h 2012-12-13 14:55:16 UTC (rev 559) @@ -62,7 +62,7 @@ MP_AFLG_FINALIZED =0x80000000 }; - typedef struct mp_audio_frame_s { + struct mp_aframe_t { unsigned flags; /* currently unused */ float pts; /* PTS if this frame */ unsigned xp_idx;/* index in ring buffer */ @@ -72,7 +72,7 @@ unsigned rate; /* rate of audio */ unsigned nch; /* number of channels */ mpaf_format_e format;/* PCM format of audio */ - }mp_aframe_t; + }; mp_aframe_t* new_mp_aframe(unsigned rate,unsigned nch,mpaf_format_e format,unsigned xp_idx); mp_aframe_t* new_mp_aframe_genome(const mp_aframe_t* in); Modified: mplayerxp/xmpcore/mp_image.h =================================================================== --- mplayerxp/xmpcore/mp_image.h 2012-12-13 13:52:35 UTC (rev 558) +++ mplayerxp/xmpcore/mp_image.h 2012-12-13 14:55:16 UTC (rev 559) @@ -65,7 +65,7 @@ }; enum { XP_IDX_INVALID=UINT_MAX }; - typedef struct mp_image_s { + struct mp_image_t { unsigned xp_idx; /* index of xp_frame associated with this image */ unsigned int flags; unsigned char type; @@ -87,7 +87,7 @@ int chroma_x_shift; // horizontal int chroma_y_shift; // vertical any_t* priv; /* for private use by filter or vo driver (to store buffer id or dmpi) */ - } mp_image_t; + }; void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt); mp_image_t* new_mp_image(unsigned w,unsigned h,unsigned xp_idx); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |