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
4efb2911
Commit
4efb2911
authored
Feb 04, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AccessOutWrite is called very often, especially for TS. Don't store stats on each call
parent
8d995e6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
include/stream_output.h
include/stream_output.h
+4
-0
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+15
-7
No files found.
include/stream_output.h
View file @
4efb2911
...
...
@@ -106,6 +106,10 @@ struct sout_access_out_t
char
*
psz_access
;
sout_cfg_t
*
p_cfg
;
int
i_writes
;
int64_t
i_sent_bytes
;
///< This is a "local" counter that is reset each
// time it is transferred to stats
char
*
psz_name
;
sout_access_out_sys_t
*
p_sys
;
int
(
*
pf_seek
)(
sout_access_out_t
*
,
off_t
);
...
...
src/stream_output/stream_output.c
View file @
4efb2911
...
...
@@ -309,6 +309,10 @@ sout_access_out_t *sout_AccessOutNew( sout_instance_t *p_sout,
p_access
->
pf_read
=
NULL
;
p_access
->
pf_write
=
NULL
;
p_access
->
p_module
=
NULL
;
p_access
->
i_writes
=
0
;
p_access
->
i_sent_bytes
=
0
;
vlc_object_attach
(
p_access
,
p_sout
);
p_access
->
p_module
=
...
...
@@ -367,21 +371,25 @@ int sout_AccessOutRead( sout_access_out_t *p_access, block_t *p_buffer )
int
sout_AccessOutWrite
(
sout_access_out_t
*
p_access
,
block_t
*
p_buffer
)
{
int
i_total
;
if
(
p_access
->
p_libvlc
->
b_stats
)
p_access
->
i_writes
++
;
p_access
->
i_sent_bytes
+=
p_buffer
->
i_buffer
;
if
(
p_access
->
p_libvlc
->
b_stats
&&
p_access
->
i_writes
%
10
==
0
)
{
/* Access_out -> sout_instance -> input_thread_t */
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_access
,
VLC_OBJECT_INPUT
,
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_access
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
{
stats_UpdateInteger
(
p_input
,
"sout_sent_packets"
,
1
);
stats_UpdateInteger
(
p_input
,
"sout_sent_bytes"
,
p_
buffer
->
i_buffer
);
stats_GetInteger
(
p_input
,
stats_UpdateInteger
(
p_input
,
"sout_sent_packets"
,
1
0
);
stats_UpdateInteger
(
p_input
,
"sout_sent_bytes"
,
p_
access
->
i_sent_bytes
);
stats_GetInteger
(
p_input
,
p_access
->
p_parent
->
p_parent
->
i_object_id
,
"sout_sent_bytes"
,
&
i_total
);
stats_UpdateFloat
(
p_input
,
"sout_send_bitrate"
,
(
float
)
i_total
);
p_access
->
i_sent_bytes
=
0
;
vlc_object_release
(
p_input
);
}
}
...
...
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