Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
9dbf95f2
Commit
9dbf95f2
authored
Aug 05, 2021
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/f_graphmonitor: use sample_count_in/out
parent
c317862c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
filters.texi
doc/filters.texi
+6
-0
f_graphmonitor.c
libavfilter/f_graphmonitor.c
+14
-0
No files found.
doc/filters.texi
View file @
9dbf95f2
...
...
@@ -13020,6 +13020,12 @@ Display video frame rate or sample rate in case of audio used by filter link.
@item eof
Display link output status.
@item sample_count_in
Display number of samples taken from filter.
@item sample_count_out
Display number of samples given out from filter.
@end table
@item rate, r
...
...
libavfilter/f_graphmonitor.c
View file @
9dbf95f2
...
...
@@ -62,6 +62,8 @@ enum {
MODE_SIZE
=
1
<<
7
,
MODE_RATE
=
1
<<
8
,
MODE_EOF
=
1
<<
9
,
MODE_SCIN
=
1
<<
10
,
MODE_SCOUT
=
1
<<
11
,
};
#define OFFSET(x) offsetof(GraphMonitorContext, x)
...
...
@@ -88,6 +90,8 @@ static const AVOption graphmonitor_options[] = {
{
"size"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MODE_SIZE
},
0
,
0
,
VF
,
"flags"
},
{
"rate"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MODE_RATE
},
0
,
0
,
VF
,
"flags"
},
{
"eof"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MODE_EOF
},
0
,
0
,
VF
,
"flags"
},
{
"sample_count_in"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MODE_SCOUT
},
0
,
0
,
VF
,
"flags"
},
{
"sample_count_out"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
MODE_SCIN
},
0
,
0
,
VF
,
"flags"
},
{
"rate"
,
"set video rate"
,
OFFSET
(
frame_rate
),
AV_OPT_TYPE_VIDEO_RATE
,
{.
str
=
"25"
},
0
,
INT_MAX
,
VF
},
{
"r"
,
"set video rate"
,
OFFSET
(
frame_rate
),
AV_OPT_TYPE_VIDEO_RATE
,
{.
str
=
"25"
},
0
,
INT_MAX
,
VF
},
{
NULL
}
...
...
@@ -229,6 +233,16 @@ static void draw_items(AVFilterContext *ctx, AVFrame *out,
drawtext
(
out
,
xpos
,
ypos
,
buffer
,
s
->
white
);
xpos
+=
strlen
(
buffer
)
*
8
;
}
if
(
s
->
flags
&
MODE_SCIN
)
{
snprintf
(
buffer
,
sizeof
(
buffer
)
-
1
,
" | sin: %"
PRId64
,
l
->
sample_count_in
);
drawtext
(
out
,
xpos
,
ypos
,
buffer
,
s
->
white
);
xpos
+=
strlen
(
buffer
)
*
8
;
}
if
(
s
->
flags
&
MODE_SCOUT
)
{
snprintf
(
buffer
,
sizeof
(
buffer
)
-
1
,
" | sout: %"
PRId64
,
l
->
sample_count_out
);
drawtext
(
out
,
xpos
,
ypos
,
buffer
,
s
->
white
);
xpos
+=
strlen
(
buffer
)
*
8
;
}
if
(
s
->
flags
&
MODE_PTS
)
{
snprintf
(
buffer
,
sizeof
(
buffer
)
-
1
,
" | pts: %s"
,
av_ts2str
(
l
->
current_pts_us
));
drawtext
(
out
,
xpos
,
ypos
,
buffer
,
s
->
white
);
...
...
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