Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
abaf4245
Commit
abaf4245
authored
10 years ago
by
Clément Bœsch
Committed by
Clément Bœsch
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
avfilter: add w/h parameters in timeline
Fixes Ticket #4008.
parent
158b3fb5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/filters.texi
+4
-0
4 additions, 0 deletions
doc/filters.texi
libavfilter/avfilter.c
+19
-2
19 additions, 2 deletions
libavfilter/avfilter.c
libavfilter/version.h
+1
-1
1 addition, 1 deletion
libavfilter/version.h
with
24 additions
and
3 deletions
doc/filters.texi
+
4
−
0
View file @
abaf4245
...
@@ -282,6 +282,10 @@ sequential number of the input frame, starting from 0
...
@@ -282,6 +282,10 @@ sequential number of the input frame, starting from 0
@item pos
@item pos
the position in the file of the input frame, NAN if unknown
the position in the file of the input frame, NAN if unknown
@item w
@item h
width and height of the input frame if video
@end table
@end table
Additionally, these filters support an @option{enable} command that can be used
Additionally, these filters support an @option{enable} command that can be used
...
...
This diff is collapsed.
Click to expand it.
libavfilter/avfilter.c
+
19
−
2
View file @
abaf4245
...
@@ -381,8 +381,23 @@ int ff_poll_frame(AVFilterLink *link)
...
@@ -381,8 +381,23 @@ int ff_poll_frame(AVFilterLink *link)
return
min
;
return
min
;
}
}
static
const
char
*
const
var_names
[]
=
{
"t"
,
"n"
,
"pos"
,
NULL
};
static
const
char
*
const
var_names
[]
=
{
enum
{
VAR_T
,
VAR_N
,
VAR_POS
,
VAR_VARS_NB
};
"t"
,
"n"
,
"pos"
,
"w"
,
"h"
,
NULL
};
enum
{
VAR_T
,
VAR_N
,
VAR_POS
,
VAR_W
,
VAR_H
,
VAR_VARS_NB
};
static
int
set_enable_expr
(
AVFilterContext
*
ctx
,
const
char
*
expr
)
static
int
set_enable_expr
(
AVFilterContext
*
ctx
,
const
char
*
expr
)
{
{
...
@@ -1071,6 +1086,8 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
...
@@ -1071,6 +1086,8 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
int64_t
pos
=
av_frame_get_pkt_pos
(
out
);
int64_t
pos
=
av_frame_get_pkt_pos
(
out
);
dstctx
->
var_values
[
VAR_N
]
=
link
->
frame_count
;
dstctx
->
var_values
[
VAR_N
]
=
link
->
frame_count
;
dstctx
->
var_values
[
VAR_T
]
=
pts
==
AV_NOPTS_VALUE
?
NAN
:
pts
*
av_q2d
(
link
->
time_base
);
dstctx
->
var_values
[
VAR_T
]
=
pts
==
AV_NOPTS_VALUE
?
NAN
:
pts
*
av_q2d
(
link
->
time_base
);
dstctx
->
var_values
[
VAR_W
]
=
link
->
w
;
dstctx
->
var_values
[
VAR_H
]
=
link
->
h
;
dstctx
->
var_values
[
VAR_POS
]
=
pos
==
-
1
?
NAN
:
pos
;
dstctx
->
var_values
[
VAR_POS
]
=
pos
==
-
1
?
NAN
:
pos
;
dstctx
->
is_disabled
=
fabs
(
av_expr_eval
(
dstctx
->
enable
,
dstctx
->
var_values
,
NULL
))
<
0
.
5
;
dstctx
->
is_disabled
=
fabs
(
av_expr_eval
(
dstctx
->
enable
,
dstctx
->
var_values
,
NULL
))
<
0
.
5
;
...
...
This diff is collapsed.
Click to expand it.
libavfilter/version.h
+
1
−
1
View file @
abaf4245
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 1
#define LIBAVFILTER_VERSION_MINOR 1
#define LIBAVFILTER_VERSION_MICRO 10
2
#define LIBAVFILTER_VERSION_MICRO 10
3
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment