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
b21c8b2f
Commit
b21c8b2f
authored
Nov 29, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused min, max and last stats
parent
e3a897cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
58 deletions
+0
-58
include/vlc_messages.h
include/vlc_messages.h
+0
-3
src/misc/stats.c
src/misc/stats.c
+0
-55
No files found.
include/vlc_messages.h
View file @
b21c8b2f
...
...
@@ -110,10 +110,7 @@ VLC_API void vlc_Unsubscribe(msg_subscription_t *);
****************************/
enum
{
STATS_LAST
,
STATS_COUNTER
,
STATS_MAX
,
STATS_MIN
,
STATS_DERIVATIVE
,
};
...
...
src/misc/stats.c
View file @
b21c8b2f
...
...
@@ -107,9 +107,6 @@ int stats_Get( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val )
switch
(
p_counter
->
i_compute_type
)
{
case
STATS_LAST
:
case
STATS_MIN
:
case
STATS_MAX
:
case
STATS_COUNTER
:
*
val
=
p_counter
->
pp_samples
[
0
]
->
value
;
break
;
...
...
@@ -280,58 +277,6 @@ static int CounterUpdate( vlc_object_t *p_handler,
{
switch
(
p_counter
->
i_compute_type
)
{
case
STATS_LAST
:
case
STATS_MIN
:
case
STATS_MAX
:
if
(
p_counter
->
i_samples
>
1
)
{
msg_Err
(
p_handler
,
"LAST counter has several samples !"
);
return
VLC_EGENERIC
;
}
if
(
p_counter
->
i_type
!=
VLC_VAR_FLOAT
&&
p_counter
->
i_type
!=
VLC_VAR_INTEGER
&&
p_counter
->
i_compute_type
!=
STATS_LAST
)
{
msg_Err
(
p_handler
,
"unable to compute MIN or MAX for this type"
);
return
VLC_EGENERIC
;
}
if
(
p_counter
->
i_samples
==
0
)
{
counter_sample_t
*
p_new
=
(
counter_sample_t
*
)
malloc
(
sizeof
(
counter_sample_t
)
);
p_new
->
value
.
i_int
=
0
;
INSERT_ELEM
(
p_counter
->
pp_samples
,
p_counter
->
i_samples
,
p_counter
->
i_samples
,
p_new
);
}
if
(
p_counter
->
i_samples
==
1
)
{
/* Update if : LAST or (MAX and bigger) or (MIN and bigger) */
if
(
p_counter
->
i_compute_type
==
STATS_LAST
||
(
p_counter
->
i_compute_type
==
STATS_MAX
&&
(
(
p_counter
->
i_type
==
VLC_VAR_INTEGER
&&
p_counter
->
pp_samples
[
0
]
->
value
.
i_int
>
val
.
i_int
)
||
(
p_counter
->
i_type
==
VLC_VAR_FLOAT
&&
p_counter
->
pp_samples
[
0
]
->
value
.
f_float
>
val
.
f_float
)
)
)
||
(
p_counter
->
i_compute_type
==
STATS_MIN
&&
(
(
p_counter
->
i_type
==
VLC_VAR_INTEGER
&&
p_counter
->
pp_samples
[
0
]
->
value
.
i_int
<
val
.
i_int
)
||
(
p_counter
->
i_type
==
VLC_VAR_FLOAT
&&
p_counter
->
pp_samples
[
0
]
->
value
.
f_float
<
val
.
f_float
)
)
)
)
{
if
(
p_counter
->
i_type
==
VLC_VAR_STRING
&&
p_counter
->
pp_samples
[
0
]
->
value
.
psz_string
)
{
free
(
p_counter
->
pp_samples
[
0
]
->
value
.
psz_string
);
}
p_counter
->
pp_samples
[
0
]
->
value
=
val
;
*
new_val
=
p_counter
->
pp_samples
[
0
]
->
value
;
}
}
break
;
case
STATS_DERIVATIVE
:
{
counter_sample_t
*
p_new
,
*
p_old
;
...
...
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