Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ad6a50c0
Commit
ad6a50c0
authored
Apr 08, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat: add writeout_count statistic
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0138fe56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
avio.h
libavformat/avio.h
+6
-0
aviobuf.c
libavformat/aviobuf.c
+4
-1
No files found.
libavformat/avio.h
View file @
ad6a50c0
...
...
@@ -140,6 +140,12 @@ typedef struct AVIOContext {
* This field is internal to libavformat and access from outside is not allowed.
*/
int
seek_count
;
/**
* writeout statistic
* This field is internal to libavformat and access from outside is not allowed.
*/
int
writeout_count
;
}
AVIOContext
;
/* unbuffered I/O */
...
...
libavformat/aviobuf.c
View file @
ad6a50c0
...
...
@@ -131,6 +131,7 @@ static void writeout(AVIOContext *s, const uint8_t *data, int len)
s
->
error
=
ret
;
}
}
s
->
writeout_count
++
;
s
->
pos
+=
len
;
}
...
...
@@ -827,7 +828,9 @@ int avio_close(AVIOContext *s)
avio_flush
(
s
);
h
=
s
->
opaque
;
av_freep
(
&
s
->
buffer
);
if
(
!
s
->
write_flag
)
if
(
s
->
write_flag
)
av_log
(
s
,
AV_LOG_DEBUG
,
"Statistics: %d seeks, %d writeouts
\n
"
,
s
->
seek_count
,
s
->
writeout_count
);
else
av_log
(
s
,
AV_LOG_DEBUG
,
"Statistics: %"
PRId64
" bytes read, %d seeks
\n
"
,
s
->
bytes_read
,
s
->
seek_count
);
av_free
(
s
);
return
ffurl_close
(
h
);
...
...
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