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
8d2b4b8c
Commit
8d2b4b8c
authored
Sep 02, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_drawgraph: add rscroll slide mode
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
81f7a257
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
filters.texi
doc/filters.texi
+3
-0
f_drawgraph.c
libavfilter/f_drawgraph.c
+13
-5
No files found.
doc/filters.texi
View file @
8d2b4b8c
...
...
@@ -4496,6 +4496,9 @@ Replace old columns with new ones.
@item scroll
Scroll from right to left.
@item rscroll
Scroll from left to right.
@end table
Default is @code{frame}.
...
...
libavfilter/f_drawgraph.c
View file @
8d2b4b8c
...
...
@@ -65,10 +65,11 @@ static const AVOption drawgraph_options[] = {
{
"bar"
,
"draw bars"
,
OFFSET
(
mode
),
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
FLAGS
,
"mode"
},
{
"dot"
,
"draw dots"
,
OFFSET
(
mode
),
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
FLAGS
,
"mode"
},
{
"line"
,
"draw lines"
,
OFFSET
(
mode
),
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
FLAGS
,
"mode"
},
{
"slide"
,
"set slide mode"
,
OFFSET
(
slide
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
2
,
FLAGS
,
"slide"
},
{
"slide"
,
"set slide mode"
,
OFFSET
(
slide
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
3
,
FLAGS
,
"slide"
},
{
"frame"
,
"draw new frames"
,
OFFSET
(
slide
),
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
FLAGS
,
"slide"
},
{
"replace"
,
"replace old columns with new"
,
OFFSET
(
slide
),
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
FLAGS
,
"slide"
},
{
"scroll"
,
"scroll from right to left"
,
OFFSET
(
slide
),
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
FLAGS
,
"slide"
},
{
"rscroll"
,
"scroll from left to right"
,
OFFSET
(
slide
),
AV_OPT_TYPE_CONST
,
{.
i64
=
3
},
0
,
0
,
FLAGS
,
"slide"
},
{
"size"
,
"set graph size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"900x256"
},
0
,
0
,
FLAGS
},
{
"s"
,
"set graph size"
,
OFFSET
(
w
),
AV_OPT_TYPE_IMAGE_SIZE
,
{.
str
=
"900x256"
},
0
,
0
,
FLAGS
},
{
NULL
}
...
...
@@ -181,7 +182,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
fg
=
av_expr_eval
(
s
->
fg_expr
[
i
],
values
,
NULL
);
bg
=
AV_RN32
(
s
->
bg
);
if
(
i
==
0
&&
s
->
x
>=
outlink
->
w
)
{
if
(
i
==
0
&&
(
s
->
x
>=
outlink
->
w
||
s
->
slide
==
3
)
)
{
if
(
s
->
slide
==
0
||
s
->
slide
==
1
)
s
->
x
=
0
;
...
...
@@ -192,6 +193,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
out
->
data
[
0
]
+
j
*
out
->
linesize
[
0
]
+
4
,
(
outlink
->
w
-
1
)
*
4
);
}
}
else
if
(
s
->
slide
==
3
)
{
s
->
x
=
0
;
for
(
j
=
0
;
j
<
outlink
->
h
;
j
++
)
{
memmove
(
out
->
data
[
0
]
+
j
*
out
->
linesize
[
0
]
+
4
,
out
->
data
[
0
]
+
j
*
out
->
linesize
[
0
],
(
outlink
->
w
-
1
)
*
4
);
}
}
else
if
(
s
->
slide
==
0
)
{
clear_image
(
s
,
out
,
outlink
);
}
...
...
@@ -202,7 +210,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
switch
(
s
->
mode
)
{
case
0
:
if
(
i
==
0
&&
(
s
->
slide
==
1
||
s
->
slide
==
2
))
if
(
i
==
0
&&
(
s
->
slide
>
0
))
for
(
j
=
0
;
j
<
outlink
->
h
;
j
++
)
draw_dot
(
bg
,
x
,
j
,
out
);
...
...
@@ -218,7 +226,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
break
;
case
1
:
if
(
i
==
0
&&
(
s
->
slide
==
1
||
s
->
slide
==
2
))
if
(
i
==
0
&&
(
s
->
slide
>
0
))
for
(
j
=
0
;
j
<
outlink
->
h
;
j
++
)
draw_dot
(
bg
,
x
,
j
,
out
);
draw_dot
(
fg
,
x
,
y
,
out
);
...
...
@@ -229,7 +237,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
s
->
prev_y
[
i
]
=
y
;
}
if
(
i
==
0
&&
(
s
->
slide
==
1
||
s
->
slide
==
2
))
{
if
(
i
==
0
&&
(
s
->
slide
>
0
))
{
for
(
j
=
0
;
j
<
y
;
j
++
)
draw_dot
(
bg
,
x
,
j
,
out
);
for
(
j
=
outlink
->
h
-
1
;
j
>
y
;
j
--
)
...
...
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