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()
syn keyword cType md5_t vlc_meta_t vlc_callback_t iso639_lang_t
" 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
syn keyword cError u8 s8 u16 s16 u32 s32 u64 s64
" don't put trailing spaces! DON'T USE TABS!!!
......
......@@ -106,7 +106,7 @@ typedef struct addons_finder_t addons_finder_t;
typedef struct addons_finder_sys_t addons_finder_sys_t;
struct addons_finder_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
int ( * pf_find )( addons_finder_t * );
int ( * pf_retrieve )( addons_finder_t *, addon_entry_t * );
......@@ -120,7 +120,7 @@ typedef struct addons_storage_t addons_storage_t;
typedef struct addons_storage_sys_t addons_storage_sys_t;
struct addons_storage_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
int ( * pf_install )( addons_storage_t *, addon_entry_t * );
int ( * pf_remove )( addons_storage_t *, addon_entry_t * );
......
......@@ -113,7 +113,7 @@
/** Audio output object */
struct audio_output
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
struct aout_sys_t *sys; /**< Private data for callbacks */
......
......@@ -44,7 +44,7 @@ typedef struct audio_volume audio_volume_t;
*/
struct audio_volume
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
vlc_fourcc_t format; /**< Audio samples format */
void (*amplify)(audio_volume_t *, block_t *, float); /**< Amplifier */
......
......@@ -54,7 +54,7 @@ typedef struct decoder_cc_desc_t decoder_cc_desc_t;
*/
struct decoder_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t * p_module;
......@@ -210,7 +210,7 @@ struct decoder_cc_desc_t
struct encoder_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t * p_module;
......
......@@ -42,7 +42,7 @@
struct demux_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t *p_module;
......@@ -108,7 +108,7 @@ struct demux_t
/* demux_meta_t is returned by "meta reader" module to the demuxer */
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 */
vlc_meta_t *p_meta; /**< meta data */
......
......@@ -47,9 +47,9 @@
* (see src/misc/variables.c).
*
* 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
* 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.
* - Libvlc can easily be based upon that.
* - Existing event are clearly declared (in include/vlc_events.h)
......@@ -57,7 +57,7 @@
*
**** 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
* {
......
......@@ -52,7 +52,7 @@ typedef struct extension_t {
/** Extensions manager object */
struct extensions_manager_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *p_module; /**< Extensions manager module */
extensions_manager_sys_t *p_sys; /**< Reserved for the module */
......
......@@ -64,7 +64,7 @@ struct vlc_mouse_t;
*/
struct filter_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t * p_module;
......
......@@ -68,7 +68,7 @@ static inline void fingerprint_request_Delete( fingerprint_request_t *p_f )
struct fingerprinter_thread_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Specific interfaces */
fingerprinter_sys_t * p_sys;
......
......@@ -40,7 +40,7 @@ enum vlc_inhibit_flags
struct vlc_inhibit
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
vlc_inhibit_sys_t *p_sys;
void (*inhibit) (vlc_inhibit_t *, unsigned flags);
......
......@@ -224,7 +224,7 @@ typedef struct input_resource_t input_resource_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;
/** Describe all interface-specific data of the interface thread */
typedef struct intf_thread_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
struct intf_thread_t *p_next; /** LibVLC interfaces book keeping */
......
......@@ -293,7 +293,7 @@ vlc_keystore_release_entry(vlc_keystore_entry *p_entry)
typedef struct vlc_keystore_sys vlc_keystore_sys;
struct vlc_keystore
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *p_module;
vlc_keystore_sys *p_sys;
......
......@@ -99,7 +99,7 @@ VLC_API const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type )
typedef struct meta_export_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
input_item_t *p_item;
const char *psz_file;
} meta_export_t;
......
......@@ -30,7 +30,7 @@ typedef enum meta_fetcher_scope_t
typedef struct meta_fetcher_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
input_item_t *p_item;
meta_fetcher_scope_t e_scope;
} meta_fetcher_t;
......
......@@ -73,11 +73,6 @@ struct vlc_common_members
vlc_object_t *parent;
};
/**
* Backward compatibility macro
*/
#define VLC_COMMON_MEMBERS struct vlc_common_members obj;
/**
* Type-safe vlc_object_t cast
*
......@@ -106,13 +101,13 @@ struct vlc_common_members
/** The main vlc_object_t structure */
struct vlc_object_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
};
/* The root object */
struct libvlc_int_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
};
/*****************************************************************************
......
......@@ -39,7 +39,7 @@ typedef struct vlc_gl_t vlc_gl_t;
struct vlc_gl_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
struct vout_window_t *surface;
module_t *module;
......
......@@ -116,7 +116,7 @@ struct intf_thread_t;
/** Helper structure to export to file part of the playlist */
typedef struct playlist_export_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
char *base_url;
FILE *p_file;
playlist_item_t *p_root;
......@@ -150,7 +150,7 @@ typedef enum
/** Structure containing information about the playlist */
struct playlist_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
playlist_item_array_t items; /**< Arrays of items */
......
......@@ -38,7 +38,7 @@ void *vlc_probe (vlc_object_t *, const char *, size_t *);
struct vlc_probe_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
void *list;
size_t count;
......
......@@ -163,7 +163,7 @@ struct vlc_renderer_discovery_owner
struct vlc_renderer_discovery_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t * p_module;
struct vlc_renderer_discovery_owner owner;
......
......@@ -53,7 +53,7 @@ struct services_discovery_owner_t
*/
struct services_discovery_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t * p_module; /**< Loaded module */
char *psz_name; /**< Main name of the SD */
......
......@@ -47,7 +47,7 @@ extern "C" {
* invalid unsynchronized access) */
struct sout_instance_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
char *psz_sout;
......@@ -72,7 +72,7 @@ typedef struct sout_stream_id_sys_t sout_stream_id_sys_t;
/** Stream output access_output */
struct sout_access_out_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *p_module;
char *psz_access;
......@@ -120,7 +120,7 @@ static inline bool sout_AccessOutCanControlPace( sout_access_out_t *p_ao )
/** Muxer structure */
struct sout_mux_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *p_module;
sout_instance_t *p_sout;
......@@ -196,7 +196,7 @@ enum sout_stream_query_e {
struct sout_stream_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *p_module;
sout_instance_t *p_sout;
......
......@@ -46,7 +46,7 @@ typedef struct spu_private_t spu_private_t;
*/
struct spu_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
spu_private_t *p;
};
......
......@@ -45,7 +45,7 @@ extern "C" {
struct stream_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties for stream filter */
module_t *p_module;
......
......@@ -48,7 +48,7 @@ extern "C" {
**/
typedef struct stream_extractor_t {
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/**
* \name Callbacks for entity extraction
......@@ -71,7 +71,7 @@ typedef struct stream_extractor_t {
} stream_extractor_t;
typedef struct stream_directory_t {
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/**
* \name Callbacks for stream directories
......
......@@ -66,7 +66,7 @@ typedef struct vlc_tls
*/
typedef struct vlc_tls_creds
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *module;
void *sys;
......
......@@ -69,7 +69,7 @@ typedef struct
*/
struct video_splitter_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t *p_module;
......
......@@ -35,7 +35,7 @@
struct vod_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t *p_module;
......
......@@ -68,7 +68,7 @@ typedef struct vout_thread_sys_t vout_thread_sys_t;
* structure.
*/
struct vout_thread_t {
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Private vout_thread data */
vout_thread_sys_t *p;
......
......@@ -254,7 +254,7 @@ struct vout_display_owner_t {
};
struct vout_display_t {
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module */
module_t *module;
......
......@@ -128,7 +128,7 @@ typedef struct vout_window_owner {
* Finally, it must support some control requests such as for fullscreen mode.
*/
struct vout_window_t {
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/**
* Window handle type
......
......@@ -35,7 +35,7 @@ extern "C" {
struct xml_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* Module properties */
module_t *p_module;
......@@ -64,7 +64,7 @@ static inline void xml_CatalogAdd( xml_t *xml, const char *type,
struct xml_reader_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
xml_reader_sys_t *p_sys;
stream_t *p_stream;
......
......@@ -38,7 +38,7 @@
struct libvlc_media_player_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
int i_refcount;
vlc_mutex_t object_lock;
......
......@@ -28,7 +28,7 @@ typedef struct aout_stream aout_stream_t;
*/
struct aout_stream
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
void *sys;
HRESULT (*time_get)(aout_stream_t *, mtime_t *);
......
......@@ -76,7 +76,7 @@ struct thread_context_t;
*****************************************************************************/
struct thread_context_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
AVCodecContext *p_context;
int (* pf_func)(AVCodecContext *c, void *arg);
......
......@@ -30,7 +30,7 @@ typedef struct vlc_va_t vlc_va_t;
typedef struct vlc_va_sys_t vlc_va_sys_t;
struct vlc_va_t {
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
vlc_va_sys_t *sys;
module_t *module;
......
......@@ -29,7 +29,7 @@
# include "config.h"
#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_playlist.h> /* playlist_t */
......
......@@ -219,7 +219,7 @@ typedef struct {
typedef struct opengl_tex_converter_t opengl_tex_converter_t;
struct opengl_tex_converter_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
module_t *p_module;
......
......@@ -43,7 +43,7 @@
/* input_source_t: gathers all information per input source */
typedef struct
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
demux_t *p_demux; /**< Demux object (most downstream) */
......
......@@ -83,7 +83,7 @@ typedef struct
struct vlm_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
vlc_mutex_t lock;
vlc_thread_t thread;
......
......@@ -45,7 +45,7 @@
struct vlc_logger_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
vlc_rwlock_t lock;
vlc_log_cb log;
void *sys;
......
......@@ -131,7 +131,7 @@ typedef struct public_key_t public_key_t;
*/
typedef struct
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
vlc_thread_t thread;
atomic_bool aborted;
......
......@@ -72,7 +72,7 @@ static void httpd_AppendData(httpd_stream_t *stream, uint8_t *p_data, int i_data
/* each host run in his own thread */
struct httpd_host_t
{
VLC_COMMON_MEMBERS
struct vlc_common_members obj;
/* ref count */
unsigned i_ref;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment