Commit c3dea95c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Expand VLC_COMMON_MEMBERS

This is now a one-liner. Expansion helps readability/high-lighting.
parent 2eff4fa1
...@@ -103,7 +103,7 @@ function VlcSyntax() ...@@ -103,7 +103,7 @@ function VlcSyntax()
syn keyword cType md5_t vlc_meta_t vlc_callback_t iso639_lang_t syn keyword cType md5_t vlc_meta_t vlc_callback_t iso639_lang_t
" misc macros " misc macros
syn keyword cOperator VLC_OBJECT VLC_EXPORT VLC_COMMON_MEMBERS syn keyword cOperator VLC_OBJECT VLC_EXPORT
" don't use these any more, please " don't use these any more, please
syn keyword cError u8 s8 u16 s16 u32 s32 u64 s64 syn keyword cError u8 s8 u16 s16 u32 s32 u64 s64
" don't put trailing spaces! DON'T USE TABS!!! " don't put trailing spaces! DON'T USE TABS!!!
......
...@@ -106,7 +106,7 @@ typedef struct addons_finder_t addons_finder_t; ...@@ -106,7 +106,7 @@ typedef struct addons_finder_t addons_finder_t;
typedef struct addons_finder_sys_t addons_finder_sys_t; typedef struct addons_finder_sys_t addons_finder_sys_t;
struct addons_finder_t struct addons_finder_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
int ( * pf_find )( addons_finder_t * ); int ( * pf_find )( addons_finder_t * );
int ( * pf_retrieve )( addons_finder_t *, addon_entry_t * ); int ( * pf_retrieve )( addons_finder_t *, addon_entry_t * );
...@@ -120,7 +120,7 @@ typedef struct addons_storage_t addons_storage_t; ...@@ -120,7 +120,7 @@ typedef struct addons_storage_t addons_storage_t;
typedef struct addons_storage_sys_t addons_storage_sys_t; typedef struct addons_storage_sys_t addons_storage_sys_t;
struct addons_storage_t struct addons_storage_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
int ( * pf_install )( addons_storage_t *, addon_entry_t * ); int ( * pf_install )( addons_storage_t *, addon_entry_t * );
int ( * pf_remove )( addons_storage_t *, addon_entry_t * ); int ( * pf_remove )( addons_storage_t *, addon_entry_t * );
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
/** Audio output object */ /** Audio output object */
struct audio_output struct audio_output
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
struct aout_sys_t *sys; /**< Private data for callbacks */ struct aout_sys_t *sys; /**< Private data for callbacks */
......
...@@ -44,7 +44,7 @@ typedef struct audio_volume audio_volume_t; ...@@ -44,7 +44,7 @@ typedef struct audio_volume audio_volume_t;
*/ */
struct audio_volume struct audio_volume
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
vlc_fourcc_t format; /**< Audio samples format */ vlc_fourcc_t format; /**< Audio samples format */
void (*amplify)(audio_volume_t *, block_t *, float); /**< Amplifier */ void (*amplify)(audio_volume_t *, block_t *, float); /**< Amplifier */
......
...@@ -54,7 +54,7 @@ typedef struct decoder_cc_desc_t decoder_cc_desc_t; ...@@ -54,7 +54,7 @@ typedef struct decoder_cc_desc_t decoder_cc_desc_t;
*/ */
struct decoder_t struct decoder_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t * p_module; module_t * p_module;
...@@ -210,7 +210,7 @@ struct decoder_cc_desc_t ...@@ -210,7 +210,7 @@ struct decoder_cc_desc_t
struct encoder_t struct encoder_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t * p_module; module_t * p_module;
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
struct demux_t struct demux_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t *p_module; module_t *p_module;
...@@ -108,7 +108,7 @@ struct demux_t ...@@ -108,7 +108,7 @@ struct demux_t
/* demux_meta_t is returned by "meta reader" module to the demuxer */ /* demux_meta_t is returned by "meta reader" module to the demuxer */
typedef struct demux_meta_t typedef struct demux_meta_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
input_item_t *p_item; /***< the input item that is being read */ input_item_t *p_item; /***< the input item that is being read */
vlc_meta_t *p_meta; /**< meta data */ vlc_meta_t *p_meta; /**< meta data */
......
...@@ -47,9 +47,9 @@ ...@@ -47,9 +47,9 @@
* (see src/misc/variables.c). * (see src/misc/variables.c).
* *
* It has the following advantages over Variable based Callback: * It has the following advantages over Variable based Callback:
* - No need to implement the whole VLC_COMMON_MEMBERS in the object, * - No need to implement the whole vlc_common_members in the object,
* thus it reduce it size. This is especially true for input_item_t which * thus it reduce it size. This is especially true for input_item_t which
* doesn't have VLC_COMMON_MEMBERS. This is the first reason of existence of * doesn't have vlc_common_members. This is the first reason of existence of
* this implementation. * this implementation.
* - Libvlc can easily be based upon that. * - Libvlc can easily be based upon that.
* - Existing event are clearly declared (in include/vlc_events.h) * - Existing event are clearly declared (in include/vlc_events.h)
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
* *
**** Example usage **** Example usage
* *
* (vlc_cool_object_t doesn't need to have the VLC_COMMON_MEMBERS.) * (vlc_cool_object_t doesn't need to have the vlc_common_members.)
* *
* struct vlc_cool_object_t * struct vlc_cool_object_t
* { * {
......
...@@ -52,7 +52,7 @@ typedef struct extension_t { ...@@ -52,7 +52,7 @@ typedef struct extension_t {
/** Extensions manager object */ /** Extensions manager object */
struct extensions_manager_t struct extensions_manager_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *p_module; /**< Extensions manager module */ module_t *p_module; /**< Extensions manager module */
extensions_manager_sys_t *p_sys; /**< Reserved for the module */ extensions_manager_sys_t *p_sys; /**< Reserved for the module */
......
...@@ -64,7 +64,7 @@ struct vlc_mouse_t; ...@@ -64,7 +64,7 @@ struct vlc_mouse_t;
*/ */
struct filter_t struct filter_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t * p_module; module_t * p_module;
......
...@@ -68,7 +68,7 @@ static inline void fingerprint_request_Delete( fingerprint_request_t *p_f ) ...@@ -68,7 +68,7 @@ static inline void fingerprint_request_Delete( fingerprint_request_t *p_f )
struct fingerprinter_thread_t struct fingerprinter_thread_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Specific interfaces */ /* Specific interfaces */
fingerprinter_sys_t * p_sys; fingerprinter_sys_t * p_sys;
......
...@@ -40,7 +40,7 @@ enum vlc_inhibit_flags ...@@ -40,7 +40,7 @@ enum vlc_inhibit_flags
struct vlc_inhibit struct vlc_inhibit
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
vlc_inhibit_sys_t *p_sys; vlc_inhibit_sys_t *p_sys;
void (*inhibit) (vlc_inhibit_t *, unsigned flags); void (*inhibit) (vlc_inhibit_t *, unsigned flags);
......
...@@ -224,7 +224,7 @@ typedef struct input_resource_t input_resource_t; ...@@ -224,7 +224,7 @@ typedef struct input_resource_t input_resource_t;
*/ */
struct input_thread_t struct input_thread_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
}; };
/** /**
......
...@@ -45,7 +45,7 @@ typedef struct intf_sys_t intf_sys_t; ...@@ -45,7 +45,7 @@ typedef struct intf_sys_t intf_sys_t;
/** Describe all interface-specific data of the interface thread */ /** Describe all interface-specific data of the interface thread */
typedef struct intf_thread_t typedef struct intf_thread_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
struct intf_thread_t *p_next; /** LibVLC interfaces book keeping */ struct intf_thread_t *p_next; /** LibVLC interfaces book keeping */
......
...@@ -293,7 +293,7 @@ vlc_keystore_release_entry(vlc_keystore_entry *p_entry) ...@@ -293,7 +293,7 @@ vlc_keystore_release_entry(vlc_keystore_entry *p_entry)
typedef struct vlc_keystore_sys vlc_keystore_sys; typedef struct vlc_keystore_sys vlc_keystore_sys;
struct vlc_keystore struct vlc_keystore
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *p_module; module_t *p_module;
vlc_keystore_sys *p_sys; vlc_keystore_sys *p_sys;
......
...@@ -99,7 +99,7 @@ VLC_API const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type ) ...@@ -99,7 +99,7 @@ VLC_API const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type )
typedef struct meta_export_t typedef struct meta_export_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
input_item_t *p_item; input_item_t *p_item;
const char *psz_file; const char *psz_file;
} meta_export_t; } meta_export_t;
......
...@@ -30,7 +30,7 @@ typedef enum meta_fetcher_scope_t ...@@ -30,7 +30,7 @@ typedef enum meta_fetcher_scope_t
typedef struct meta_fetcher_t typedef struct meta_fetcher_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
input_item_t *p_item; input_item_t *p_item;
meta_fetcher_scope_t e_scope; meta_fetcher_scope_t e_scope;
} meta_fetcher_t; } meta_fetcher_t;
......
...@@ -73,11 +73,6 @@ struct vlc_common_members ...@@ -73,11 +73,6 @@ struct vlc_common_members
vlc_object_t *parent; vlc_object_t *parent;
}; };
/**
* Backward compatibility macro
*/
#define VLC_COMMON_MEMBERS struct vlc_common_members obj;
/** /**
* Type-safe vlc_object_t cast * Type-safe vlc_object_t cast
* *
...@@ -106,13 +101,13 @@ struct vlc_common_members ...@@ -106,13 +101,13 @@ struct vlc_common_members
/** The main vlc_object_t structure */ /** The main vlc_object_t structure */
struct vlc_object_t struct vlc_object_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
}; };
/* The root object */ /* The root object */
struct libvlc_int_t struct libvlc_int_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -39,7 +39,7 @@ typedef struct vlc_gl_t vlc_gl_t; ...@@ -39,7 +39,7 @@ typedef struct vlc_gl_t vlc_gl_t;
struct vlc_gl_t struct vlc_gl_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
struct vout_window_t *surface; struct vout_window_t *surface;
module_t *module; module_t *module;
......
...@@ -116,7 +116,7 @@ struct intf_thread_t; ...@@ -116,7 +116,7 @@ struct intf_thread_t;
/** Helper structure to export to file part of the playlist */ /** Helper structure to export to file part of the playlist */
typedef struct playlist_export_t typedef struct playlist_export_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
char *base_url; char *base_url;
FILE *p_file; FILE *p_file;
playlist_item_t *p_root; playlist_item_t *p_root;
...@@ -150,7 +150,7 @@ typedef enum ...@@ -150,7 +150,7 @@ typedef enum
/** Structure containing information about the playlist */ /** Structure containing information about the playlist */
struct playlist_t struct playlist_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
playlist_item_array_t items; /**< Arrays of items */ playlist_item_array_t items; /**< Arrays of items */
......
...@@ -38,7 +38,7 @@ void *vlc_probe (vlc_object_t *, const char *, size_t *); ...@@ -38,7 +38,7 @@ void *vlc_probe (vlc_object_t *, const char *, size_t *);
struct vlc_probe_t struct vlc_probe_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
void *list; void *list;
size_t count; size_t count;
......
...@@ -163,7 +163,7 @@ struct vlc_renderer_discovery_owner ...@@ -163,7 +163,7 @@ struct vlc_renderer_discovery_owner
struct vlc_renderer_discovery_t struct vlc_renderer_discovery_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t * p_module; module_t * p_module;
struct vlc_renderer_discovery_owner owner; struct vlc_renderer_discovery_owner owner;
......
...@@ -53,7 +53,7 @@ struct services_discovery_owner_t ...@@ -53,7 +53,7 @@ struct services_discovery_owner_t
*/ */
struct services_discovery_t struct services_discovery_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t * p_module; /**< Loaded module */ module_t * p_module; /**< Loaded module */
char *psz_name; /**< Main name of the SD */ char *psz_name; /**< Main name of the SD */
......
...@@ -47,7 +47,7 @@ extern "C" { ...@@ -47,7 +47,7 @@ extern "C" {
* invalid unsynchronized access) */ * invalid unsynchronized access) */
struct sout_instance_t struct sout_instance_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
char *psz_sout; char *psz_sout;
...@@ -72,7 +72,7 @@ typedef struct sout_stream_id_sys_t sout_stream_id_sys_t; ...@@ -72,7 +72,7 @@ typedef struct sout_stream_id_sys_t sout_stream_id_sys_t;
/** Stream output access_output */ /** Stream output access_output */
struct sout_access_out_t struct sout_access_out_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *p_module; module_t *p_module;
char *psz_access; char *psz_access;
...@@ -120,7 +120,7 @@ static inline bool sout_AccessOutCanControlPace( sout_access_out_t *p_ao ) ...@@ -120,7 +120,7 @@ static inline bool sout_AccessOutCanControlPace( sout_access_out_t *p_ao )
/** Muxer structure */ /** Muxer structure */
struct sout_mux_t struct sout_mux_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *p_module; module_t *p_module;
sout_instance_t *p_sout; sout_instance_t *p_sout;
...@@ -196,7 +196,7 @@ enum sout_stream_query_e { ...@@ -196,7 +196,7 @@ enum sout_stream_query_e {
struct sout_stream_t struct sout_stream_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *p_module; module_t *p_module;
sout_instance_t *p_sout; sout_instance_t *p_sout;
......
...@@ -46,7 +46,7 @@ typedef struct spu_private_t spu_private_t; ...@@ -46,7 +46,7 @@ typedef struct spu_private_t spu_private_t;
*/ */
struct spu_t struct spu_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
spu_private_t *p; spu_private_t *p;
}; };
......
...@@ -45,7 +45,7 @@ extern "C" { ...@@ -45,7 +45,7 @@ extern "C" {
struct stream_t struct stream_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties for stream filter */ /* Module properties for stream filter */
module_t *p_module; module_t *p_module;
......
...@@ -48,7 +48,7 @@ extern "C" { ...@@ -48,7 +48,7 @@ extern "C" {
**/ **/
typedef struct stream_extractor_t { typedef struct stream_extractor_t {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/** /**
* \name Callbacks for entity extraction * \name Callbacks for entity extraction
...@@ -71,7 +71,7 @@ typedef struct stream_extractor_t { ...@@ -71,7 +71,7 @@ typedef struct stream_extractor_t {
} stream_extractor_t; } stream_extractor_t;
typedef struct stream_directory_t { typedef struct stream_directory_t {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/** /**
* \name Callbacks for stream directories * \name Callbacks for stream directories
......
...@@ -66,7 +66,7 @@ typedef struct vlc_tls ...@@ -66,7 +66,7 @@ typedef struct vlc_tls
*/ */
typedef struct vlc_tls_creds typedef struct vlc_tls_creds
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *module; module_t *module;
void *sys; void *sys;
......
...@@ -69,7 +69,7 @@ typedef struct ...@@ -69,7 +69,7 @@ typedef struct
*/ */
struct video_splitter_t struct video_splitter_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t *p_module; module_t *p_module;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
struct vod_t struct vod_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t *p_module; module_t *p_module;
......
...@@ -68,7 +68,7 @@ typedef struct vout_thread_sys_t vout_thread_sys_t; ...@@ -68,7 +68,7 @@ typedef struct vout_thread_sys_t vout_thread_sys_t;
* structure. * structure.
*/ */
struct vout_thread_t { struct vout_thread_t {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Private vout_thread data */ /* Private vout_thread data */
vout_thread_sys_t *p; vout_thread_sys_t *p;
......
...@@ -254,7 +254,7 @@ struct vout_display_owner_t { ...@@ -254,7 +254,7 @@ struct vout_display_owner_t {
}; };
struct vout_display_t { struct vout_display_t {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module */ /* Module */
module_t *module; module_t *module;
......
...@@ -128,7 +128,7 @@ typedef struct vout_window_owner { ...@@ -128,7 +128,7 @@ typedef struct vout_window_owner {
* Finally, it must support some control requests such as for fullscreen mode. * Finally, it must support some control requests such as for fullscreen mode.
*/ */
struct vout_window_t { struct vout_window_t {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/** /**
* Window handle type * Window handle type
......
...@@ -35,7 +35,7 @@ extern "C" { ...@@ -35,7 +35,7 @@ extern "C" {
struct xml_t struct xml_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
/* Module properties */ /* Module properties */
module_t *p_module; module_t *p_module;
...@@ -64,7 +64,7 @@ static inline void xml_CatalogAdd( xml_t *xml, const char *type, ...@@ -64,7 +64,7 @@ static inline void xml_CatalogAdd( xml_t *xml, const char *type,
struct xml_reader_t struct xml_reader_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
xml_reader_sys_t *p_sys; xml_reader_sys_t *p_sys;
stream_t *p_stream; stream_t *p_stream;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
struct libvlc_media_player_t struct libvlc_media_player_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
int i_refcount; int i_refcount;
vlc_mutex_t object_lock; vlc_mutex_t object_lock;
......
...@@ -28,7 +28,7 @@ typedef struct aout_stream aout_stream_t; ...@@ -28,7 +28,7 @@ typedef struct aout_stream aout_stream_t;
*/ */
struct aout_stream struct aout_stream
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
void *sys; void *sys;
HRESULT (*time_get)(aout_stream_t *, mtime_t *); HRESULT (*time_get)(aout_stream_t *, mtime_t *);
......
...@@ -76,7 +76,7 @@ struct thread_context_t; ...@@ -76,7 +76,7 @@ struct thread_context_t;
*****************************************************************************/ *****************************************************************************/
struct thread_context_t struct thread_context_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
AVCodecContext *p_context; AVCodecContext *p_context;
int (* pf_func)(AVCodecContext *c, void *arg); int (* pf_func)(AVCodecContext *c, void *arg);
......
...@@ -30,7 +30,7 @@ typedef struct vlc_va_t vlc_va_t; ...@@ -30,7 +30,7 @@ typedef struct vlc_va_t vlc_va_t;
typedef struct vlc_va_sys_t vlc_va_sys_t; typedef struct vlc_va_sys_t vlc_va_sys_t;
struct vlc_va_t { struct vlc_va_t {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
vlc_va_sys_t *sys; vlc_va_sys_t *sys;
module_t *module; module_t *module;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
# include "config.h" # include "config.h"
#endif #endif
#include <vlc_common.h> /* VLC_COMMON_MEMBERS for vlc_interface.h */ #include <vlc_common.h>
#include <vlc_interface.h> /* intf_thread_t */ #include <vlc_interface.h> /* intf_thread_t */
#include <vlc_playlist.h> /* playlist_t */ #include <vlc_playlist.h> /* playlist_t */
......
...@@ -219,7 +219,7 @@ typedef struct { ...@@ -219,7 +219,7 @@ typedef struct {
typedef struct opengl_tex_converter_t opengl_tex_converter_t; typedef struct opengl_tex_converter_t opengl_tex_converter_t;
struct opengl_tex_converter_t struct opengl_tex_converter_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
module_t *p_module; module_t *p_module;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
/* input_source_t: gathers all information per input source */ /* input_source_t: gathers all information per input source */
typedef struct typedef struct
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
demux_t *p_demux; /**< Demux object (most downstream) */ demux_t *p_demux; /**< Demux object (most downstream) */
......
...@@ -83,7 +83,7 @@ typedef struct ...@@ -83,7 +83,7 @@ typedef struct
struct vlm_t struct vlm_t
{ {
VLC_COMMON_MEMBERS struct vlc_common_members obj;
vlc_mutex_t lock; vlc_mutex_t lock;
vlc_thread_t thread; vlc_thread_t thread;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@