Changeset 5827c899e99ce566ade8d4b149b7c02a0a75278f
- Timestamp:
- 14/01/06 11:57:44
(3 years ago)
- Author:
- Clément Stenac <zorglub@videolan.org>
- git-committer:
- Clément Stenac <zorglub@videolan.org> 1137236264 +0000
- git-parent:
[e1935dc3b8ba57fa26f7b32221d051443424526d]
- git-author:
- Clément Stenac <zorglub@videolan.org> 1137236264 +0000
- Message:
Add an option to disable stats (Refs:#473)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2cb472d |
r5827c89 |
|
| 60 | 60 | /* The module bank */ |
|---|
| 61 | 61 | module_bank_t * p_module_bank; |
|---|
| | 62 | |
|---|
| | 63 | /* Do stats ? - We keep this boolean to avoid unneeded lookups */ |
|---|
| | 64 | vlc_bool_t b_stats; |
|---|
| 62 | 65 | |
|---|
| 63 | 66 | /* Arch-specific variables */ |
|---|
| r2cb472d |
r5827c89 |
|
| 680 | 680 | p_vlc->pf_memset = memset; |
|---|
| 681 | 681 | } |
|---|
| | 682 | |
|---|
| | 683 | libvlc.b_stats = config_GetInt( p_vlc, "stats" ); |
|---|
| 682 | 684 | |
|---|
| 683 | 685 | /* |
|---|
| r2cb472d |
r5827c89 |
|
| 768 | 768 | "improve the start time of VLC.") |
|---|
| 769 | 769 | |
|---|
| 770 | | #define DAEMON_TEXT N_("Run as daemon process") |
|---|
| | 770 | #define DAEMON_TEXT N_("Collect statistics") |
|---|
| 771 | 771 | #define DAEMON_LONGTEXT N_( \ |
|---|
| | 772 | "This option allows you to collect miscellaneous statistics.") |
|---|
| | 773 | |
|---|
| | 774 | #define STATS_TEXT N_("Run as daemon process") |
|---|
| | 775 | #define STATS_LONGTEXT N_( \ |
|---|
| 772 | 776 | "Runs VLC as a background daemon process.") |
|---|
| 773 | 777 | |
|---|
| … | … | |
| 1359 | 1363 | add_string( "vlm-conf", NULL, NULL, VLM_CONF_TEXT, |
|---|
| 1360 | 1364 | VLM_CONF_LONGTEXT, VLC_TRUE ); |
|---|
| | 1365 | |
|---|
| | 1366 | add_bool ( "stats", VLC_TRUE, NULL, STATS_TEXT, STATS_LONGTEXT, VLC_TRUE ); |
|---|
| 1361 | 1367 | |
|---|
| 1362 | 1368 | #if !defined(WIN32) |
|---|
| r60c51db |
r5827c89 |
|
| 60 | 60 | { |
|---|
| 61 | 61 | counter_t *p_counter; |
|---|
| 62 | | stats_handler_t *p_handler = stats_HandlerGet( p_this ); |
|---|
| | 62 | stats_handler_t *p_handler; |
|---|
| | 63 | |
|---|
| | 64 | if( p_this->p_libvlc->b_stats == VLC_FALSE ) |
|---|
| | 65 | { |
|---|
| | 66 | return VLC_EGENERIC; |
|---|
| | 67 | } |
|---|
| | 68 | p_handler = stats_HandlerGet( p_this ); |
|---|
| 63 | 69 | if( !p_handler ) return VLC_ENOMEM; |
|---|
| 64 | 70 | |
|---|
| … | … | |
| 99 | 105 | |
|---|
| 100 | 106 | /* Get stats handler singleton */ |
|---|
| 101 | | stats_handler_t *p_handler = stats_HandlerGet( p_this ); |
|---|
| | 107 | stats_handler_t *p_handler; |
|---|
| | 108 | if( p_this->p_libvlc->b_stats == VLC_FALSE ) |
|---|
| | 109 | { |
|---|
| | 110 | return VLC_EGENERIC; |
|---|
| | 111 | } |
|---|
| | 112 | p_handler = stats_HandlerGet( p_this ); |
|---|
| 102 | 113 | if( !p_handler ) return VLC_ENOMEM; |
|---|
| 103 | 114 | |
|---|
| … | … | |
| 133 | 144 | |
|---|
| 134 | 145 | /* Get stats handler singleton */ |
|---|
| 135 | | stats_handler_t *p_handler = stats_HandlerGet( p_this ); |
|---|
| | 146 | stats_handler_t *p_handler; |
|---|
| | 147 | if( p_this->p_libvlc->b_stats == VLC_FALSE ) |
|---|
| | 148 | { |
|---|
| | 149 | return VLC_EGENERIC; |
|---|
| | 150 | } |
|---|
| | 151 | p_handler = stats_HandlerGet( p_this ); |
|---|
| 136 | 152 | if( !p_handler ) return VLC_ENOMEM; |
|---|
| 137 | 153 | vlc_mutex_lock( &p_handler->object_lock ); |
|---|
| … | … | |
| 206 | 222 | counter_t *p_counter; |
|---|
| 207 | 223 | |
|---|
| 208 | | /* Get stats handler singleton */ |
|---|
| 209 | | stats_handler_t *p_handler = stats_HandlerGet( p_this ); |
|---|
| | 224 | stats_handler_t *p_handler; |
|---|
| | 225 | if( p_this->p_libvlc->b_stats == VLC_FALSE ) |
|---|
| | 226 | { |
|---|
| | 227 | return NULL; |
|---|
| | 228 | } |
|---|
| | 229 | p_handler = stats_HandlerGet( p_this ); |
|---|
| 210 | 230 | if( !p_handler ) return NULL; |
|---|
| 211 | 231 | |
|---|
| r2cb472d |
r5827c89 |
|
| 582 | 582 | mtime_t i_sout_destroyed_date = 0; |
|---|
| 583 | 583 | |
|---|
| 584 | | int i_loops; |
|---|
| | 584 | int i_loops = 0; |
|---|
| 585 | 585 | |
|---|
| 586 | 586 | playlist_item_t *p_autodelete_item = NULL; |
|---|
| … | … | |
| 626 | 626 | stats_ComputeInputStats( p_playlist->p_input, |
|---|
| 627 | 627 | p_playlist->p_input->input.p_item->p_stats ); |
|---|
| 628 | | // stats_DumpInputStats( |
|---|
| 629 | | // p_playlist->p_input->input.p_item->p_stats ); |
|---|
| | 628 | // stats_DumpInputStats( |
|---|
| | 629 | // p_playlist->p_input->input.p_item->p_stats ); |
|---|
| 630 | 630 | } |
|---|
| 631 | 631 | |
|---|