Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5827c899
Commit
5827c899
authored
Jan 14, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an option to disable stats (Refs:#473)
parent
e1935dc3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
9 deletions
+40
-9
include/main.h
include/main.h
+3
-0
src/libvlc.c
src/libvlc.c
+2
-0
src/libvlc.h
src/libvlc.h
+7
-1
src/misc/stats.c
src/misc/stats.c
+25
-5
src/playlist/playlist.c
src/playlist/playlist.c
+3
-3
No files found.
include/main.h
View file @
5827c899
...
@@ -60,6 +60,9 @@ struct libvlc_t
...
@@ -60,6 +60,9 @@ struct libvlc_t
/* The module bank */
/* The module bank */
module_bank_t
*
p_module_bank
;
module_bank_t
*
p_module_bank
;
/* Do stats ? - We keep this boolean to avoid unneeded lookups */
vlc_bool_t
b_stats
;
/* Arch-specific variables */
/* Arch-specific variables */
#if !defined( WIN32 )
#if !defined( WIN32 )
vlc_bool_t
b_daemon
;
vlc_bool_t
b_daemon
;
...
...
src/libvlc.c
View file @
5827c899
...
@@ -680,6 +680,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
...
@@ -680,6 +680,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
p_vlc
->
pf_memset
=
memset
;
p_vlc
->
pf_memset
=
memset
;
}
}
libvlc
.
b_stats
=
config_GetInt
(
p_vlc
,
"stats"
);
/*
/*
* Initialize hotkey handling
* Initialize hotkey handling
*/
*/
...
...
src/libvlc.h
View file @
5827c899
...
@@ -767,8 +767,12 @@ static char *ppsz_clock_descriptions[] =
...
@@ -767,8 +767,12 @@ static char *ppsz_clock_descriptions[] =
"This option allows you to use a plugins cache which will greatly " \
"This option allows you to use a plugins cache which will greatly " \
"improve the start time of VLC.")
"improve the start time of VLC.")
#define DAEMON_TEXT N_("
Run as daemon proces
s")
#define DAEMON_TEXT N_("
Collect statistic
s")
#define DAEMON_LONGTEXT N_( \
#define DAEMON_LONGTEXT N_( \
"This option allows you to collect miscellaneous statistics.")
#define STATS_TEXT N_("Run as daemon process")
#define STATS_LONGTEXT N_( \
"Runs VLC as a background daemon process.")
"Runs VLC as a background daemon process.")
#define ONEINSTANCE_TEXT N_("Allow only one running instance")
#define ONEINSTANCE_TEXT N_("Allow only one running instance")
...
@@ -1359,6 +1363,8 @@ vlc_module_begin();
...
@@ -1359,6 +1363,8 @@ vlc_module_begin();
add_string
(
"vlm-conf"
,
NULL
,
NULL
,
VLM_CONF_TEXT
,
add_string
(
"vlm-conf"
,
NULL
,
NULL
,
VLM_CONF_TEXT
,
VLM_CONF_LONGTEXT
,
VLC_TRUE
);
VLM_CONF_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"stats"
,
VLC_TRUE
,
NULL
,
STATS_TEXT
,
STATS_LONGTEXT
,
VLC_TRUE
);
#if !defined(WIN32)
#if !defined(WIN32)
add_bool
(
"daemon"
,
0
,
NULL
,
DAEMON_TEXT
,
DAEMON_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"daemon"
,
0
,
NULL
,
DAEMON_TEXT
,
DAEMON_LONGTEXT
,
VLC_TRUE
);
change_short
(
'd'
);
change_short
(
'd'
);
...
...
src/misc/stats.c
View file @
5827c899
...
@@ -59,7 +59,13 @@ int __stats_Create( vlc_object_t *p_this, char *psz_name, int i_type,
...
@@ -59,7 +59,13 @@ int __stats_Create( vlc_object_t *p_this, char *psz_name, int i_type,
int
i_compute_type
)
int
i_compute_type
)
{
{
counter_t
*
p_counter
;
counter_t
*
p_counter
;
stats_handler_t
*
p_handler
=
stats_HandlerGet
(
p_this
);
stats_handler_t
*
p_handler
;
if
(
p_this
->
p_libvlc
->
b_stats
==
VLC_FALSE
)
{
return
VLC_EGENERIC
;
}
p_handler
=
stats_HandlerGet
(
p_this
);
if
(
!
p_handler
)
return
VLC_ENOMEM
;
if
(
!
p_handler
)
return
VLC_ENOMEM
;
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
...
@@ -98,7 +104,12 @@ int __stats_Update( vlc_object_t *p_this, char *psz_name, vlc_value_t val )
...
@@ -98,7 +104,12 @@ int __stats_Update( vlc_object_t *p_this, char *psz_name, vlc_value_t val )
counter_t
*
p_counter
;
counter_t
*
p_counter
;
/* Get stats handler singleton */
/* Get stats handler singleton */
stats_handler_t
*
p_handler
=
stats_HandlerGet
(
p_this
);
stats_handler_t
*
p_handler
;
if
(
p_this
->
p_libvlc
->
b_stats
==
VLC_FALSE
)
{
return
VLC_EGENERIC
;
}
p_handler
=
stats_HandlerGet
(
p_this
);
if
(
!
p_handler
)
return
VLC_ENOMEM
;
if
(
!
p_handler
)
return
VLC_ENOMEM
;
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
...
@@ -132,7 +143,12 @@ int __stats_Get( vlc_object_t *p_this, int i_object_id, char *psz_name, vlc_valu
...
@@ -132,7 +143,12 @@ int __stats_Get( vlc_object_t *p_this, int i_object_id, char *psz_name, vlc_valu
counter_t
*
p_counter
;
counter_t
*
p_counter
;
/* Get stats handler singleton */
/* Get stats handler singleton */
stats_handler_t
*
p_handler
=
stats_HandlerGet
(
p_this
);
stats_handler_t
*
p_handler
;
if
(
p_this
->
p_libvlc
->
b_stats
==
VLC_FALSE
)
{
return
VLC_EGENERIC
;
}
p_handler
=
stats_HandlerGet
(
p_this
);
if
(
!
p_handler
)
return
VLC_ENOMEM
;
if
(
!
p_handler
)
return
VLC_ENOMEM
;
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
...
@@ -205,8 +221,12 @@ counter_t *__stats_CounterGet( vlc_object_t *p_this, int i_object_id,
...
@@ -205,8 +221,12 @@ counter_t *__stats_CounterGet( vlc_object_t *p_this, int i_object_id,
{
{
counter_t
*
p_counter
;
counter_t
*
p_counter
;
/* Get stats handler singleton */
stats_handler_t
*
p_handler
;
stats_handler_t
*
p_handler
=
stats_HandlerGet
(
p_this
);
if
(
p_this
->
p_libvlc
->
b_stats
==
VLC_FALSE
)
{
return
NULL
;
}
p_handler
=
stats_HandlerGet
(
p_this
);
if
(
!
p_handler
)
return
NULL
;
if
(
!
p_handler
)
return
NULL
;
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
vlc_mutex_lock
(
&
p_handler
->
object_lock
);
...
...
src/playlist/playlist.c
View file @
5827c899
...
@@ -581,7 +581,7 @@ static void RunThread ( playlist_t *p_playlist )
...
@@ -581,7 +581,7 @@ static void RunThread ( playlist_t *p_playlist )
mtime_t
i_vout_destroyed_date
=
0
;
mtime_t
i_vout_destroyed_date
=
0
;
mtime_t
i_sout_destroyed_date
=
0
;
mtime_t
i_sout_destroyed_date
=
0
;
int
i_loops
;
int
i_loops
=
0
;
playlist_item_t
*
p_autodelete_item
=
NULL
;
playlist_item_t
*
p_autodelete_item
=
NULL
;
...
@@ -625,8 +625,8 @@ static void RunThread ( playlist_t *p_playlist )
...
@@ -625,8 +625,8 @@ static void RunThread ( playlist_t *p_playlist )
{
{
stats_ComputeInputStats
(
p_playlist
->
p_input
,
stats_ComputeInputStats
(
p_playlist
->
p_input
,
p_playlist
->
p_input
->
input
.
p_item
->
p_stats
);
p_playlist
->
p_input
->
input
.
p_item
->
p_stats
);
//
stats_DumpInputStats(
//
stats_DumpInputStats(
//
p_playlist->p_input->input.p_item->p_stats );
//
p_playlist->p_input->input.p_item->p_stats );
}
}
/* This input is dead. Remove it ! */
/* This input is dead. Remove it ! */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment