Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
a0783549
Commit
a0783549
authored
Jan 04, 2006
by
zorglub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for several message queues - please test
Initial support for registering and handling some shared stats
parent
d68a17b3
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
507 additions
and
171 deletions
+507
-171
Makefile.am
Makefile.am
+1
-0
include/vlc_common.h
include/vlc_common.h
+5
-0
include/vlc_messages.h
include/vlc_messages.h
+78
-20
include/vlc_objects.h
include/vlc_objects.h
+1
-0
include/vlc_symbols.h
include/vlc_symbols.h
+14
-6
modules/gui/beos/MessagesWindow.cpp
modules/gui/beos/MessagesWindow.cpp
+1
-1
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+1
-1
modules/gui/ncurses.c
modules/gui/ncurses.c
+1
-1
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/src/skin_main.cpp
+1
-1
modules/gui/wince/wince.cpp
modules/gui/wince/wince.cpp
+1
-1
modules/gui/wxwidgets/wxwidgets.cpp
modules/gui/wxwidgets/wxwidgets.cpp
+1
-1
modules/misc/logger.c
modules/misc/logger.c
+1
-1
src/misc/messages.c
src/misc/messages.c
+159
-135
src/misc/objects.c
src/misc/objects.c
+4
-0
src/misc/stats.c
src/misc/stats.c
+231
-0
src/network/httpd.c
src/network/httpd.c
+7
-3
No files found.
Makefile.am
View file @
a0783549
...
@@ -455,6 +455,7 @@ SOURCES_libvlc_common = \
...
@@ -455,6 +455,7 @@ SOURCES_libvlc_common = \
src/misc/block.c
\
src/misc/block.c
\
src/misc/modules.c
\
src/misc/modules.c
\
src/misc/threads.c
\
src/misc/threads.c
\
src/misc/stats.c
\
src/misc/unicode.c
\
src/misc/unicode.c
\
src/misc/cpu.c
\
src/misc/cpu.c
\
src/misc/configuration.c
\
src/misc/configuration.c
\
...
...
include/vlc_common.h
View file @
a0783549
...
@@ -205,6 +205,7 @@ typedef struct date_t date_t;
...
@@ -205,6 +205,7 @@ typedef struct date_t date_t;
/* Messages */
/* Messages */
typedef
struct
msg_bank_t
msg_bank_t
;
typedef
struct
msg_bank_t
msg_bank_t
;
typedef
struct
msg_queue_t
msg_queue_t
;
typedef
struct
msg_subscription_t
msg_subscription_t
;
typedef
struct
msg_subscription_t
msg_subscription_t
;
/* Playlist */
/* Playlist */
...
@@ -415,6 +416,10 @@ typedef struct vlm_schedule_t vlm_schedule_t;
...
@@ -415,6 +416,10 @@ typedef struct vlm_schedule_t vlm_schedule_t;
/* divers */
/* divers */
typedef
struct
vlc_meta_t
vlc_meta_t
;
typedef
struct
vlc_meta_t
vlc_meta_t
;
typedef
struct
counter_t
counter_t
;
typedef
struct
counter_sample_t
counter_sample_t
;
typedef
struct
stats_handler_t
stats_handler_t
;
/*****************************************************************************
/*****************************************************************************
* Variable callbacks
* Variable callbacks
...
...
include/vlc_messages.h
View file @
a0783549
...
@@ -45,12 +45,7 @@ typedef struct
...
@@ -45,12 +45,7 @@ typedef struct
char
*
psz_module
;
char
*
psz_module
;
char
*
psz_msg
;
/**< the message itself */
char
*
psz_msg
;
/**< the message itself */
#if 0
mtime_t
date
;
/**< Message date */
mtime_t date; /* date of the message */
char * psz_file; /* file in which the function was called */
char * psz_function; /* function from which the function was called */
int i_line; /* line at which the function was called */
#endif
}
msg_item_t
;
}
msg_item_t
;
/* Message types */
/* Message types */
...
@@ -63,14 +58,25 @@ typedef struct
...
@@ -63,14 +58,25 @@ typedef struct
/** debug messages */
/** debug messages */
#define VLC_MSG_DBG 3
#define VLC_MSG_DBG 3
#define MSG_QUEUE_NORMAL 0
#define MSG_QUEUE_HTTPD_ACCESS 1
/**
/**
* Store all data requiered by messages interfaces.
* Store all data requiered by messages interfaces.
*/
*/
struct
msg_bank_t
struct
msg_bank_t
{
{
vlc_mutex_t
lock
;
int
i_queues
;
msg_queue_t
**
pp_queues
;
};
struct
msg_queue_t
{
int
i_id
;
/** Message queue lock */
/** Message queue lock */
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
vlc_bool_t
b_configured
;
vlc_bool_t
b_overflow
;
vlc_bool_t
b_overflow
;
/* Message queue */
/* Message queue */
...
@@ -103,9 +109,9 @@ struct msg_subscription_t
...
@@ -103,9 +109,9 @@ struct msg_subscription_t
/*****************************************************************************
/*****************************************************************************
* Prototypes
* Prototypes
*****************************************************************************/
*****************************************************************************/
VLC_EXPORT
(
void
,
__msg_Generic
,
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
4
,
5
)
);
VLC_EXPORT
(
void
,
__msg_Generic
,
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
5
,
6
)
);
VLC_EXPORT
(
void
,
__msg_GenericVa
,
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
va_list
args
)
);
VLC_EXPORT
(
void
,
__msg_GenericVa
,
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
va_list
args
)
);
#define msg_GenericVa(a, b, c, d, e) __msg_GenericVa(VLC_OBJECT(a), b, c, d, e)
#define msg_GenericVa(a, b, c, d, e)
,f
__msg_GenericVa(VLC_OBJECT(a), b, c, d, e
,f
)
VLC_EXPORT
(
void
,
__msg_Info
,
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Info
,
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Err
,
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Err
,
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Warn
,
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
VLC_EXPORT
(
void
,
__msg_Warn
,
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
)
);
...
@@ -114,19 +120,19 @@ VLC_EXPORT( void, __msg_Dbg, ( vlc_object_t *, const char *, ... ) ATTRIBUTE_
...
@@ -114,19 +120,19 @@ VLC_EXPORT( void, __msg_Dbg, ( vlc_object_t *, const char *, ... ) ATTRIBUTE_
#ifdef HAVE_VARIADIC_MACROS
#ifdef HAVE_VARIADIC_MACROS
# define msg_Info( p_this, psz_format, args... ) \
# define msg_Info( p_this, psz_format, args... ) \
__msg_Generic( VLC_OBJECT(p_this), VLC_MSG_INFO, MODULE_STRING, \
__msg_Generic( VLC_OBJECT(p_this),
MSG_QUEUE_NORMAL,
VLC_MSG_INFO, MODULE_STRING, \
psz_format, ## args )
psz_format, ## args )
# define msg_Err( p_this, psz_format, args... ) \
# define msg_Err( p_this, psz_format, args... ) \
__msg_Generic( VLC_OBJECT(p_this), VLC_MSG_ERR, MODULE_STRING, \
__msg_Generic( VLC_OBJECT(p_this),
MSG_QUEUE_NORMAL,
VLC_MSG_ERR, MODULE_STRING, \
psz_format, ## args )
psz_format, ## args )
# define msg_Warn( p_this, psz_format, args... ) \
# define msg_Warn( p_this, psz_format, args... ) \
__msg_Generic( VLC_OBJECT(p_this), VLC_MSG_WARN, MODULE_STRING, \
__msg_Generic( VLC_OBJECT(p_this),
MSG_QUEUE_NORMAL,
VLC_MSG_WARN, MODULE_STRING, \
psz_format, ## args )
psz_format, ## args )
# define msg_Dbg( p_this, psz_format, args... ) \
# define msg_Dbg( p_this, psz_format, args... ) \
__msg_Generic( VLC_OBJECT(p_this), VLC_MSG_DBG, MODULE_STRING, \
__msg_Generic( VLC_OBJECT(p_this),
MSG_QUEUE_NORMAL,
VLC_MSG_DBG, MODULE_STRING, \
psz_format, ## args )
psz_format, ## args )
#elif defined(_MSC_VER)
/* To avoid warnings and even errors with c++ files */
#elif defined(_MSC_VER)
/* To avoid warnings and even errors with c++ files */
...
@@ -135,7 +141,7 @@ inline void msg_Info( void *p_this, const char *psz_format, ... )
...
@@ -135,7 +141,7 @@ inline void msg_Info( void *p_this, const char *psz_format, ... )
{
{
va_list
ap
;
va_list
ap
;
va_start
(
ap
,
psz_format
);
va_start
(
ap
,
psz_format
);
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
VLC_MSG_INFO
,
MODULE_STRING
,
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
MSG_QUEUE_NORMAL
,
VLC_MSG_INFO
,
MODULE_STRING
,
psz_format
,
ap
);
psz_format
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
}
}
...
@@ -143,7 +149,7 @@ inline void msg_Err( void *p_this, const char *psz_format, ... )
...
@@ -143,7 +149,7 @@ inline void msg_Err( void *p_this, const char *psz_format, ... )
{
{
va_list
ap
;
va_list
ap
;
va_start
(
ap
,
psz_format
);
va_start
(
ap
,
psz_format
);
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
VLC_MSG_ERR
,
MODULE_STRING
,
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
MSG_QUEUE_NORMAL
,
VLC_MSG_ERR
,
MODULE_STRING
,
psz_format
,
ap
);
psz_format
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
}
}
...
@@ -151,7 +157,7 @@ inline void msg_Warn( void *p_this, const char *psz_format, ... )
...
@@ -151,7 +157,7 @@ inline void msg_Warn( void *p_this, const char *psz_format, ... )
{
{
va_list
ap
;
va_list
ap
;
va_start
(
ap
,
psz_format
);
va_start
(
ap
,
psz_format
);
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
VLC_MSG_WARN
,
MODULE_STRING
,
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
MSG_QUEUE_NORMAL
,
VLC_MSG_WARN
,
MODULE_STRING
,
psz_format
,
ap
);
psz_format
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
}
}
...
@@ -159,7 +165,7 @@ inline void msg_Dbg( void *p_this, const char *psz_format, ... )
...
@@ -159,7 +165,7 @@ inline void msg_Dbg( void *p_this, const char *psz_format, ... )
{
{
va_list
ap
;
va_list
ap
;
va_start
(
ap
,
psz_format
);
va_start
(
ap
,
psz_format
);
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
VLC_MSG_DBG
,
MODULE_STRING
,
__msg_GenericVa
(
(
vlc_object_t
*
)
p_this
,
MSG_QUEUE_NORMAL
,
VLC_MSG_DBG
,
MODULE_STRING
,
psz_format
,
ap
);
psz_format
,
ap
);
va_end
(
ap
);
va_end
(
ap
);
}
}
...
@@ -180,12 +186,64 @@ void __msg_Create ( vlc_object_t * );
...
@@ -180,12 +186,64 @@ void __msg_Create ( vlc_object_t * );
void
__msg_Flush
(
vlc_object_t
*
);
void
__msg_Flush
(
vlc_object_t
*
);
void
__msg_Destroy
(
vlc_object_t
*
);
void
__msg_Destroy
(
vlc_object_t
*
);
#define msg_Subscribe(a) __msg_Subscribe(VLC_OBJECT(a))
#define msg_Subscribe(a
,b
) __msg_Subscribe(VLC_OBJECT(a)
,b
)
#define msg_Unsubscribe(a,b) __msg_Unsubscribe(VLC_OBJECT(a),b)
#define msg_Unsubscribe(a,b) __msg_Unsubscribe(VLC_OBJECT(a),b)
VLC_EXPORT
(
msg_subscription_t
*
,
__msg_Subscribe
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
msg_subscription_t
*
,
__msg_Subscribe
,
(
vlc_object_t
*
,
int
)
);
VLC_EXPORT
(
void
,
__msg_Unsubscribe
,
(
vlc_object_t
*
,
msg_subscription_t
*
)
);
VLC_EXPORT
(
void
,
__msg_Unsubscribe
,
(
vlc_object_t
*
,
msg_subscription_t
*
)
);
/**
/**
* @}
* @}
*/
*/
/**
* \defgroup statistics Statistics
*
* @{
*/
enum
{
STATS_LAST
,
STATS_COUNTER
,
STATS_MAX
,
STATS_MIN
,
};
struct
counter_sample_t
{
vlc_value_t
value
;
mtime_t
date
;
};
struct
counter_t
{
char
*
psz_name
;
int
i_source_object
;
int
i_compute_type
;
int
i_type
;
int
i_samples
;
counter_sample_t
**
pp_samples
;
};
struct
stats_handler_t
{
VLC_COMMON_MEMBERS
int
i_counters
;
counter_t
**
pp_counters
;
};
#define stats_Update( a,b,c) __stats_Update( VLC_OBJECT( a ), b, c )
VLC_EXPORT
(
int
,
__stats_Update
,
(
vlc_object_t
*
,
char
*
,
vlc_value_t
)
);
#define stats_Create( a,b,c,d ) __stats_Create( VLC_OBJECT(a), b, c, d )
VLC_EXPORT
(
int
,
__stats_Create
,
(
vlc_object_t
*
,
char
*
,
int
,
int
)
);
static
inline
int
__stats_UpdateInteger
(
vlc_object_t
*
p_obj
,
char
*
psz_name
,
int
i
)
{
vlc_value_t
val
;
val
.
i_int
=
i
;
return
__stats_Update
(
p_obj
,
psz_name
,
val
);
}
#define stats_UpdateInteger( a,b,c ) __stats_UpdateInteger( VLC_OBJECT(a),b,c )
include/vlc_objects.h
View file @
a0783549
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
#define VLC_OBJECT_SD (-26)
#define VLC_OBJECT_SD (-26)
#define VLC_OBJECT_XML (-27)
#define VLC_OBJECT_XML (-27)
#define VLC_OBJECT_OSDMENU (-28)
#define VLC_OBJECT_OSDMENU (-28)
#define VLC_OBJECT_STATS (-29)
#define VLC_OBJECT_GENERIC (-666)
#define VLC_OBJECT_GENERIC (-666)
...
...
include/vlc_symbols.h
View file @
a0783549
...
@@ -62,6 +62,7 @@ int playlist_ItemSetName (playlist_item_t *, char *);
...
@@ -62,6 +62,7 @@ int playlist_ItemSetName (playlist_item_t *, char *);
void
__osd_MenuShow
(
vlc_object_t
*
);
void
__osd_MenuShow
(
vlc_object_t
*
);
httpd_url_t
*
httpd_UrlNewUnique
(
httpd_host_t
*
,
const
char
*
psz_url
,
const
char
*
psz_user
,
const
char
*
psz_password
,
const
vlc_acl_t
*
p_acl
);
httpd_url_t
*
httpd_UrlNewUnique
(
httpd_host_t
*
,
const
char
*
psz_url
,
const
char
*
psz_user
,
const
char
*
psz_password
,
const
vlc_acl_t
*
p_acl
);
void
httpd_ClientModeStream
(
httpd_client_t
*
cl
);
void
httpd_ClientModeStream
(
httpd_client_t
*
cl
);
int
__stats_Create
(
vlc_object_t
*
,
char
*
,
int
,
int
);
void
httpd_RedirectDelete
(
httpd_redirect_t
*
);
void
httpd_RedirectDelete
(
httpd_redirect_t
*
);
void
__sout_CfgParse
(
vlc_object_t
*
,
char
*
psz_prefix
,
const
char
**
ppsz_options
,
sout_cfg_t
*
);
void
__sout_CfgParse
(
vlc_object_t
*
,
char
*
psz_prefix
,
const
char
**
ppsz_options
,
sout_cfg_t
*
);
vlm_media_t
*
vlm_MediaNew
(
vlm_t
*
,
const
char
*
,
int
);
vlm_media_t
*
vlm_MediaNew
(
vlm_t
*
,
const
char
*
,
int
);
...
@@ -118,6 +119,7 @@ void vlm_MessageDelete (vlm_message_t *);
...
@@ -118,6 +119,7 @@ void vlm_MessageDelete (vlm_message_t *);
void
vout_SynchroDecode
(
vout_synchro_t
*
);
void
vout_SynchroDecode
(
vout_synchro_t
*
);
int
playlist_Delete
(
playlist_t
*
,
int
);
int
playlist_Delete
(
playlist_t
*
,
int
);
void
aout_FiltersPlay
(
aout_instance_t
*
p_aout
,
aout_filter_t
**
pp_filters
,
int
i_nb_filters
,
aout_buffer_t
**
pp_input_buffer
);
void
aout_FiltersPlay
(
aout_instance_t
*
p_aout
,
aout_filter_t
**
pp_filters
,
int
i_nb_filters
,
aout_buffer_t
**
pp_input_buffer
);
int
__stats_Update
(
vlc_object_t
*
,
char
*
,
vlc_value_t
);
char
*
httpd_ClientIP
(
httpd_client_t
*
cl
,
char
*
psz_ip
);
char
*
httpd_ClientIP
(
httpd_client_t
*
cl
,
char
*
psz_ip
);
int
__intf_UserProgress
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
float
);
int
__intf_UserProgress
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
float
);
void
httpd_FileDelete
(
httpd_file_t
*
);
void
httpd_FileDelete
(
httpd_file_t
*
);
...
@@ -204,7 +206,7 @@ struct dirent * vlc_readdir_wrapper (void *);
...
@@ -204,7 +206,7 @@ struct dirent * vlc_readdir_wrapper (void *);
void
config_UnsetCallbacks
(
module_config_t
*
);
void
config_UnsetCallbacks
(
module_config_t
*
);
void
vout_SynchroRelease
(
vout_synchro_t
*
);
void
vout_SynchroRelease
(
vout_synchro_t
*
);
void
__intf_UserProgressUpdate
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
void
__intf_UserProgressUpdate
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
void
__msg_Generic
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
4
,
5
);
void
__msg_Generic
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
5
,
6
);
int
vlc_closedir_wrapper
(
void
*
);
int
vlc_closedir_wrapper
(
void
*
);
int
playlist_ServicesDiscoveryAdd
(
playlist_t
*
,
const
char
*
);
int
playlist_ServicesDiscoveryAdd
(
playlist_t
*
,
const
char
*
);
char
*
vlc_strndup
(
const
char
*
s
,
size_t
n
);
char
*
vlc_strndup
(
const
char
*
s
,
size_t
n
);
...
@@ -339,7 +341,7 @@ int intf_RunThread (intf_thread_t *);
...
@@ -339,7 +341,7 @@ int intf_RunThread (intf_thread_t *);
int
httpd_StreamSend
(
httpd_stream_t
*
,
uint8_t
*
p_data
,
int
i_data
);
int
httpd_StreamSend
(
httpd_stream_t
*
,
uint8_t
*
p_data
,
int
i_data
);
decoder_t
*
input_DecoderNew
(
input_thread_t
*
,
es_format_t
*
,
vlc_bool_t
b_force_decoder
);
decoder_t
*
input_DecoderNew
(
input_thread_t
*
,
es_format_t
*
,
vlc_bool_t
b_force_decoder
);
xml_t
*
__xml_Create
(
vlc_object_t
*
);
xml_t
*
__xml_Create
(
vlc_object_t
*
);
msg_subscription_t
*
__msg_Subscribe
(
vlc_object_t
*
);
msg_subscription_t
*
__msg_Subscribe
(
vlc_object_t
*
,
int
);
const
char
*
VLC_Version
(
void
);
const
char
*
VLC_Version
(
void
);
session_descriptor_t
*
sout_AnnounceRegisterSDP
(
sout_instance_t
*
,
const
char
*
,
const
char
*
,
announce_method_t
*
);
session_descriptor_t
*
sout_AnnounceRegisterSDP
(
sout_instance_t
*
,
const
char
*
,
const
char
*
,
announce_method_t
*
);
char
*
stream_ReadLine
(
stream_t
*
);
char
*
stream_ReadLine
(
stream_t
*
);
...
@@ -380,7 +382,7 @@ char * ToLocale (const char *);
...
@@ -380,7 +382,7 @@ char * ToLocale (const char *);
int
vlm_Load
(
vlm_t
*
,
const
char
*
);
int
vlm_Load
(
vlm_t
*
,
const
char
*
);
int
aout_FiltersCreatePipeline
(
aout_instance_t
*
p_aout
,
aout_filter_t
**
pp_filters
,
int
*
pi_nb_filters
,
const
audio_sample_format_t
*
p_input_format
,
const
audio_sample_format_t
*
p_output_format
);
int
aout_FiltersCreatePipeline
(
aout_instance_t
*
p_aout
,
aout_filter_t
**
pp_filters
,
int
*
pi_nb_filters
,
const
audio_sample_format_t
*
p_input_format
,
const
audio_sample_format_t
*
p_output_format
);
playlist_item_t
*
playlist_ChildSearchName
(
playlist_item_t
*
,
const
char
*
);
playlist_item_t
*
playlist_ChildSearchName
(
playlist_item_t
*
,
const
char
*
);
void
__msg_GenericVa
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
va_list
args
);
void
__msg_GenericVa
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
va_list
args
);
int
aout_ChannelsRestart
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
int
aout_ChannelsRestart
(
vlc_object_t
*
,
const
char
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
char
const
*
vlc_error
(
int
);
char
const
*
vlc_error
(
int
);
int
playlist_NodeGroup
(
playlist_t
*
,
int
,
playlist_item_t
*
,
playlist_item_t
**
,
int
,
int
,
int
);
int
playlist_NodeGroup
(
playlist_t
*
,
int
,
playlist_item_t
*
,
playlist_item_t
**
,
int
,
int
,
int
);
...
@@ -669,13 +671,13 @@ struct module_symbols_t
...
@@ -669,13 +671,13 @@ struct module_symbols_t
int
(
*
intf_RunThread_inner
)
(
intf_thread_t
*
);
int
(
*
intf_RunThread_inner
)
(
intf_thread_t
*
);
void
(
*
intf_StopThread_inner
)
(
intf_thread_t
*
);
void
(
*
intf_StopThread_inner
)
(
intf_thread_t
*
);
void
(
*
intf_Destroy_inner
)
(
intf_thread_t
*
);
void
(
*
intf_Destroy_inner
)
(
intf_thread_t
*
);
void
(
*
__msg_Generic_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
4
,
5
);
void
(
*
__msg_Generic_inner
)
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
5
,
6
);
void
(
*
__msg_GenericVa_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
const
char
*
,
va_list
args
);
void
(
*
__msg_GenericVa_inner
)
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
va_list
args
);
void
(
*
__msg_Info_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Info_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Err_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Err_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Warn_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Warn_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Dbg_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
void
(
*
__msg_Dbg_inner
)
(
vlc_object_t
*
,
const
char
*
,
...
)
ATTRIBUTE_FORMAT
(
2
,
3
);
msg_subscription_t
*
(
*
__msg_Subscribe_inner
)
(
vlc_object_t
*
);
msg_subscription_t
*
(
*
__msg_Subscribe_inner
)
(
vlc_object_t
*
,
int
);
void
(
*
__msg_Unsubscribe_inner
)
(
vlc_object_t
*
,
msg_subscription_t
*
);
void
(
*
__msg_Unsubscribe_inner
)
(
vlc_object_t
*
,
msg_subscription_t
*
);
void
*
(
*
__vlc_object_create_inner
)
(
vlc_object_t
*
,
int
);
void
*
(
*
__vlc_object_create_inner
)
(
vlc_object_t
*
,
int
);
void
(
*
__vlc_object_destroy_inner
)
(
vlc_object_t
*
);
void
(
*
__vlc_object_destroy_inner
)
(
vlc_object_t
*
);
...
@@ -869,6 +871,8 @@ struct module_symbols_t
...
@@ -869,6 +871,8 @@ struct module_symbols_t
int
(
*
__intf_UserProgress_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
float
);
int
(
*
__intf_UserProgress_inner
)
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
float
);
void
(
*
__intf_UserProgressUpdate_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
void
(
*
__intf_UserProgressUpdate_inner
)
(
vlc_object_t
*
,
int
,
const
char
*
,
float
);
void
(
*
__intf_UserHide_inner
)
(
vlc_object_t
*
,
int
);
void
(
*
__intf_UserHide_inner
)
(
vlc_object_t
*
,
int
);
int
(
*
__stats_Create_inner
)
(
vlc_object_t
*
,
char
*
,
int
,
int
);
int
(
*
__stats_Update_inner
)
(
vlc_object_t
*
,
char
*
,
vlc_value_t
);
};
};
# if defined (__PLUGIN__)
# if defined (__PLUGIN__)
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
# define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner
...
@@ -1289,6 +1293,8 @@ struct module_symbols_t
...
@@ -1289,6 +1293,8 @@ struct module_symbols_t
# define __intf_UserProgress (p_symbols)->__intf_UserProgress_inner
# define __intf_UserProgress (p_symbols)->__intf_UserProgress_inner
# define __intf_UserProgressUpdate (p_symbols)->__intf_UserProgressUpdate_inner
# define __intf_UserProgressUpdate (p_symbols)->__intf_UserProgressUpdate_inner
# define __intf_UserHide (p_symbols)->__intf_UserHide_inner
# define __intf_UserHide (p_symbols)->__intf_UserHide_inner
# define __stats_Create (p_symbols)->__stats_Create_inner
# define __stats_Update (p_symbols)->__stats_Update_inner
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
# elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__)
/******************************************************************
/******************************************************************
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
* STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access.
...
@@ -1712,6 +1718,8 @@ struct module_symbols_t
...
@@ -1712,6 +1718,8 @@ struct module_symbols_t
((p_symbols)->__intf_UserProgress_inner) = __intf_UserProgress; \
((p_symbols)->__intf_UserProgress_inner) = __intf_UserProgress; \
((p_symbols)->__intf_UserProgressUpdate_inner) = __intf_UserProgressUpdate; \
((p_symbols)->__intf_UserProgressUpdate_inner) = __intf_UserProgressUpdate; \
((p_symbols)->__intf_UserHide_inner) = __intf_UserHide; \
((p_symbols)->__intf_UserHide_inner) = __intf_UserHide; \
((p_symbols)->__stats_Create_inner) = __stats_Create; \
((p_symbols)->__stats_Update_inner) = __stats_Update; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
(p_symbols)->net_ConvertIPv4_deprecated = NULL; \
# endif
/* __PLUGIN__ */
# endif
/* __PLUGIN__ */
...
...
modules/gui/beos/MessagesWindow.cpp
View file @
a0783549
...
@@ -135,7 +135,7 @@ MessagesWindow::MessagesWindow( intf_thread_t * _p_intf,
...
@@ -135,7 +135,7 @@ MessagesWindow::MessagesWindow( intf_thread_t * _p_intf,
{
{
SetSizeLimits
(
400
,
2000
,
200
,
2000
);
SetSizeLimits
(
400
,
2000
,
200
,
2000
);
p_sub
=
msg_Subscribe
(
p_intf
);
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
BRect
rect
,
textRect
;
BRect
rect
,
textRect
;
...
...
modules/gui/macosx/intf.m
View file @
a0783549
...
@@ -75,7 +75,7 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
...
@@ -75,7 +75,7 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
[
NSThread
detachNewThreadSelector
:
@selector
(
self
)
toTarget
:[
NSString
string
]
withObject
:
nil
];
[
NSThread
detachNewThreadSelector
:
@selector
(
self
)
toTarget
:[
NSString
string
]
withObject
:
nil
];
p_intf
->
p_sys
->
o_sendport
=
[[
NSPort
port
]
retain
];
p_intf
->
p_sys
->
o_sendport
=
[[
NSPort
port
]
retain
];
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
p_intf
->
b_play
=
VLC_TRUE
;
p_intf
->
b_play
=
VLC_TRUE
;
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
Run
;
...
...
modules/gui/ncurses.c
View file @
a0783549
...
@@ -200,7 +200,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -200,7 +200,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_box_plidx
=
0
;
p_sys
->
i_box_plidx
=
0
;
p_sys
->
p_plnode
=
NULL
;
p_sys
->
p_plnode
=
NULL
;
p_sys
->
i_box_bidx
=
0
;
p_sys
->
i_box_bidx
=
0
;
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
/* Initialize the curses library */
/* Initialize the curses library */
p_sys
->
w
=
initscr
();
p_sys
->
w
=
initscr
();
...
...
modules/gui/skins2/src/skin_main.cpp
View file @
a0783549
...
@@ -77,7 +77,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -77,7 +77,7 @@ static int Open( vlc_object_t *p_this )
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
Run
;
// Suscribe to messages bank
// Suscribe to messages bank
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
p_intf
->
p_sys
->
p_input
=
NULL
;
p_intf
->
p_sys
->
p_input
=
NULL
;
p_intf
->
p_sys
->
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
p_intf
->
p_sys
->
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
...
...
modules/gui/wince/wince.cpp
View file @
a0783549
...
@@ -112,7 +112,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -112,7 +112,7 @@ static int Open( vlc_object_t *p_this )
}
}
// Suscribe to messages bank
// Suscribe to messages bank
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
// Misc init
// Misc init
p_intf
->
p_sys
->
p_audio_menu
=
NULL
;
p_intf
->
p_sys
->
p_audio_menu
=
NULL
;
...
...
modules/gui/wxwidgets/wxwidgets.cpp
View file @
a0783549
...
@@ -173,7 +173,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -173,7 +173,7 @@ static int Open( vlc_object_t *p_this )
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
Run
;
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
/* Initialize wxWidgets thread */
/* Initialize wxWidgets thread */
p_intf
->
p_sys
->
b_playing
=
0
;
p_intf
->
p_sys
->
b_playing
=
0
;
...
...
modules/misc/logger.c
View file @
a0783549
...
@@ -262,7 +262,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -262,7 +262,7 @@ static int Open( vlc_object_t *p_this )
#endif
#endif
}
}
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
,
MSG_QUEUE_NORMAL
);
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
Run
;
return
0
;
return
0
;
...
...
src/misc/messages.c
View file @
a0783549
...
@@ -60,115 +60,136 @@
...
@@ -60,115 +60,136 @@
/*****************************************************************************
/*****************************************************************************
* Local prototypes
* Local prototypes
*****************************************************************************/
*****************************************************************************/
static
void
QueueMsg
(
vlc_object_t
*
,
int
,
const
char
*
,
static
void
QueueMsg
(
vlc_object_t
*
,
int
,
int
,
const
char
*
,
const
char
*
,
va_list
);
const
char
*
,
va_list
);
static
void
FlushMsg
(
msg_
bank
_t
*
);
static
void
FlushMsg
(
msg_
queue
_t
*
);
static
void
PrintMsg
(
vlc_object_t
*
,
msg_item_t
*
);
static
void
PrintMsg
(
vlc_object_t
*
,
msg_item_t
*
);
static
void
CreateMsgQueue
(
vlc_object_t
*
p_this
,
int
i_queue
);
/**
/**
* Initialize messages interface
* Initialize messages queues
*
* This function initializes all message queues
* This functions has to be called before any call to other msg_* functions.
* It set up the locks and the message queue if it is used.
*/
*/
void
__msg_Create
(
vlc_object_t
*
p_this
)
void
__msg_Create
(
vlc_object_t
*
p_this
)
{
{
/* Message queue initialization */
CreateMsgQueue
(
p_this
,
MSG_QUEUE_NORMAL
);
vlc_mutex_init
(
p_this
,
&
p_this
->
p_libvlc
->
msg_bank
.
lock
);
CreateMsgQueue
(
p_this
,
MSG_QUEUE_HTTPD_ACCESS
);
p_this
->
p_libvlc
->
msg_bank
.
b_configured
=
VLC_FALSE
;
p_this
->
p_libvlc
->
msg_bank
.
b_overflow
=
VLC_FALSE
;
p_this
->
p_libvlc
->
msg_bank
.
i_start
=
0
;
p_this
->
p_libvlc
->
msg_bank
.
i_stop
=
0
;
p_this
->
p_libvlc
->
msg_bank
.
i_sub
=
0
;
p_this
->
p_libvlc
->
msg_bank
.
pp_sub
=
NULL
;
#ifdef UNDER_CE
#ifdef UNDER_CE
p_this
->
p_libvlc
->
msg_bank
.
logfile
=
p_this
->
p_libvlc
->
msg_bank
.
pp_queues
[
MSG_QUEUE_NORMAL
]
->
logfile
=
CreateFile
(
L"vlc-log.txt"
,
GENERIC_WRITE
,
CreateFile
(
L"vlc-log.txt"
,
GENERIC_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
CREATE_ALWAYS
,
0
,
NULL
);
SetFilePointer
(
p_this
->
p_libvlc
->
msg_bank
.
logfile
,
0
,
NULL
,
FILE_END
);
SetFilePointer
(
p_this
->
p_libvlc
->
msg_bank
.
pp_queues
[
MSG_QUEUE_NORMAL
]
->
logfile
,
0
,
NULL
,
FILE_END
);
#endif
#endif
}
static
void
CreateMsgQueue
(
vlc_object_t
*
p_this
,
int
i_queue
)
{
msg_queue_t
*
p_queue
=
(
msg_queue_t
*
)
malloc
(
sizeof
(
msg_queue_t
)
);
vlc_mutex_init
(
p_this
,
&
p_queue
->
lock
);
p_queue
->
b_overflow
=
VLC_FALSE
;
p_queue
->
i_id
=
i_queue
;
p_queue
->
i_start
=
0
;
p_queue
->
i_stop
=
0
;
p_queue
->
i_sub
=
0
;
p_queue
->
pp_sub
=
NULL
;
INSERT_ELEM
(
p_this
->
p_libvlc
->
msg_bank
.
pp_queues
,
p_this
->
p_libvlc
->
msg_bank
.
i_queues
,
i_queue
,
p_queue
);
}
}
/**
/**