Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
72e28abd
Commit
72e28abd
authored
Jan 15, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix calculation for demux bitrate (Refs:#473)
parent
31e0a13e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
src/input/input.c
src/input/input.c
+3
-0
src/misc/stats.c
src/misc/stats.c
+9
-5
No files found.
src/input/input.c
View file @
72e28abd
...
...
@@ -685,6 +685,9 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick )
p_counter
=
stats_CounterGet
(
p_input
,
p_input
->
i_object_id
,
"input_bitrate"
);
if
(
p_counter
)
p_counter
->
update_interval
=
1000000
;
p_counter
=
stats_CounterGet
(
p_input
,
p_input
->
i_object_id
,
"demux_bitrate"
);
if
(
p_counter
)
p_counter
->
update_interval
=
1000000
;
psz
=
var_GetString
(
p_input
,
"sout"
);
if
(
*
psz
&&
strncasecmp
(
p_input
->
input
.
p_item
->
psz_uri
,
"vlc:"
,
4
)
)
...
...
src/misc/stats.c
View file @
72e28abd
...
...
@@ -200,7 +200,6 @@ int __stats_Get( vlc_object_t *p_this, int i_object_id, char *psz_name, vlc_valu
p_counter
->
pp_samples
[
1
]
->
value
.
f_float
)
/
(
float
)(
p_counter
->
pp_samples
[
0
]
->
date
-
p_counter
->
pp_samples
[
1
]
->
date
);
val
->
i_int
=
(
int
)
f
;
val
->
f_float
=
f
;
}
break
;
...
...
@@ -293,9 +292,11 @@ void stats_ComputeInputStats( input_thread_t *p_input,
void
stats_ReinitInputStats
(
input_stats_t
*
p_stats
)
{
p_stats
->
i_read_packets
=
p_stats
->
i_read_bytes
=
p_stats
->
f_input_bitrate
=
p_stats
->
f_average_input_bitrate
=
p_stats
->
i_displayed_pictures
=
p_stats
->
i_lost_pictures
=
p_stats
->
i_decoded_video
=
p_stats
->
i_decoded_audio
=
0
;
p_stats
->
f_input_bitrate
=
p_stats
->
f_average_input_bitrate
=
p_stats
->
i_demux_read_packets
=
p_stats
->
i_demux_read_bytes
=
p_stats
->
f_demux_bitrate
=
p_stats
->
f_average_demux_bitrate
=
p_stats
->
i_displayed_pictures
=
p_stats
->
i_lost_pictures
=
p_stats
->
i_decoded_video
=
p_stats
->
i_decoded_audio
=
0
;
}
void
stats_DumpInputStats
(
input_stats_t
*
p_stats
)
...
...
@@ -303,9 +304,12 @@ void stats_DumpInputStats( input_stats_t *p_stats )
vlc_mutex_lock
(
&
p_stats
->
lock
);
/* f_bitrate is in bytes / microsecond
* *1000 => bytes / millisecond => kbytes / seconds */
fprintf
(
stderr
,
"Input : %i (%i bytes) - %f kB/s - Vout : %i/%i
\n
"
,
fprintf
(
stderr
,
"Input : %i (%i bytes) - %f kB/s - "
"Demux : %i (%i bytes) - %f kB/s - Vout : %i/%i
\n
"
,
p_stats
->
i_read_packets
,
p_stats
->
i_read_bytes
,
p_stats
->
f_input_bitrate
*
1000
,
p_stats
->
i_demux_read_packets
,
p_stats
->
i_demux_read_bytes
,
p_stats
->
f_demux_bitrate
*
1000
,
p_stats
->
i_displayed_pictures
,
p_stats
->
i_lost_pictures
);
vlc_mutex_unlock
(
&
p_stats
->
lock
);
}
...
...
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