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
88fd836a
Commit
88fd836a
authored
Dec 05, 2016
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: Drop deprecated way of passing options for a few filters
Deprecated in 02/2013.
parent
07a2b155
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
148 deletions
+0
-148
af_channelmap.c
libavfilter/af_channelmap.c
+0
-7
af_join.c
libavfilter/af_join.c
+0
-8
avfilter.c
libavfilter/avfilter.c
+0
-76
buffersrc.c
libavfilter/buffersrc.c
+0
-8
version.h
libavfilter/version.h
+0
-3
vf_aspect.c
libavfilter/vf_aspect.c
+0
-46
No files found.
libavfilter/af_channelmap.c
View file @
88fd836a
...
...
@@ -150,13 +150,6 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
else
mode
=
MAP_PAIR_STR_STR
;
}
#if FF_API_OLD_FILTER_OPTS
if
(
strchr
(
mapping
,
','
))
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"This syntax is deprecated, use "
"'|' to separate the mappings.
\n
"
);
separator
=
','
;
}
#endif
}
if
(
mode
!=
MAP_NONE
)
{
...
...
libavfilter/af_join.c
View file @
88fd836a
...
...
@@ -104,14 +104,6 @@ static int parse_maps(AVFilterContext *ctx)
char
separator
=
'|'
;
char
*
cur
=
s
->
map
;
#if FF_API_OLD_FILTER_OPTS
if
(
cur
&&
strchr
(
cur
,
','
))
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"This syntax is deprecated, use '|' to "
"separate the mappings.
\n
"
);
separator
=
','
;
}
#endif
while
(
cur
&&
*
cur
)
{
char
*
sep
,
*
next
,
*
p
;
uint64_t
in_channel
=
0
,
out_channel
=
0
;
...
...
libavfilter/avfilter.c
View file @
88fd836a
...
...
@@ -624,87 +624,11 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
return
AVERROR
(
EINVAL
);
}
#if FF_API_OLD_FILTER_OPTS
if
(
!
strcmp
(
filter
->
filter
->
name
,
"scale"
)
&&
strchr
(
args
,
':'
)
&&
strchr
(
args
,
':'
)
<
strchr
(
args
,
'='
))
{
/* old w:h:flags=<flags> syntax */
char
*
copy
=
av_strdup
(
args
);
char
*
p
;
av_log
(
filter
,
AV_LOG_WARNING
,
"The <w>:<h>:flags=<flags> option "
"syntax is deprecated. Use either <w>:<h>:<flags> or "
"w=<w>:h=<h>:flags=<flags>.
\n
"
);
if
(
!
copy
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
p
=
strrchr
(
copy
,
':'
);
if
(
p
)
{
*
p
++
=
0
;
ret
=
av_dict_parse_string
(
&
options
,
p
,
"="
,
":"
,
0
);
}
if
(
ret
>=
0
)
ret
=
process_unnamed_options
(
filter
,
&
options
,
copy
);
av_freep
(
&
copy
);
if
(
ret
<
0
)
goto
fail
;
}
else
#endif
if
(
strchr
(
args
,
'='
))
{
/* assume a list of key1=value1:key2=value2:... */
ret
=
av_dict_parse_string
(
&
options
,
args
,
"="
,
":"
,
0
);
if
(
ret
<
0
)
goto
fail
;
#if FF_API_OLD_FILTER_OPTS
}
else
if
(
!
strcmp
(
filter
->
filter
->
name
,
"format"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"noformat"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"frei0r"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"frei0r_src"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"ocv"
))
{
/* a hack for compatibility with the old syntax
* replace colons with |s */
char
*
copy
=
av_strdup
(
args
);
char
*
p
=
copy
;
int
nb_leading
=
0
;
// number of leading colons to skip
if
(
!
copy
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
if
(
!
strcmp
(
filter
->
filter
->
name
,
"frei0r"
)
||
!
strcmp
(
filter
->
filter
->
name
,
"ocv"
))
nb_leading
=
1
;
else
if
(
!
strcmp
(
filter
->
filter
->
name
,
"frei0r_src"
))
nb_leading
=
3
;
while
(
nb_leading
--
)
{
p
=
strchr
(
p
,
':'
);
if
(
!
p
)
{
p
=
copy
+
strlen
(
copy
);
break
;
}
p
++
;
}
if
(
strchr
(
p
,
':'
))
{
av_log
(
filter
,
AV_LOG_WARNING
,
"This syntax is deprecated. Use "
"'|' to separate the list items.
\n
"
);
}
while
((
p
=
strchr
(
p
,
':'
)))
*
p
++
=
'|'
;
ret
=
process_unnamed_options
(
filter
,
&
options
,
copy
);
av_freep
(
&
copy
);
if
(
ret
<
0
)
goto
fail
;
#endif
}
else
{
ret
=
process_unnamed_options
(
filter
,
&
options
,
args
);
if
(
ret
<
0
)
...
...
libavfilter/buffersrc.c
View file @
88fd836a
...
...
@@ -244,14 +244,6 @@ static const AVOption video_options[] = {
{
"width"
,
NULL
,
OFFSET
(
w
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
V
},
{
"height"
,
NULL
,
OFFSET
(
h
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
V
},
{
"pix_fmt"
,
NULL
,
OFFSET
(
pix_fmt_str
),
AV_OPT_TYPE_STRING
,
.
flags
=
V
},
#if FF_API_OLD_FILTER_OPTS
/* those 4 are for compatibility with the old option passing system where each filter
* did its own parsing */
{
"time_base_num"
,
"deprecated, do not use"
,
OFFSET
(
time_base
.
num
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
V
},
{
"time_base_den"
,
"deprecated, do not use"
,
OFFSET
(
time_base
.
den
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
V
},
{
"sar_num"
,
"deprecated, do not use"
,
OFFSET
(
pixel_aspect
.
num
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
V
},
{
"sar_den"
,
"deprecated, do not use"
,
OFFSET
(
pixel_aspect
.
den
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
V
},
#endif
{
"sar"
,
"sample aspect ratio"
,
OFFSET
(
pixel_aspect
),
AV_OPT_TYPE_RATIONAL
,
{
.
dbl
=
0
},
0
,
DBL_MAX
,
V
},
{
"time_base"
,
NULL
,
OFFSET
(
time_base
),
AV_OPT_TYPE_RATIONAL
,
{
.
dbl
=
0
},
0
,
DBL_MAX
,
V
},
{
"frame_rate"
,
NULL
,
OFFSET
(
frame_rate
),
AV_OPT_TYPE_RATIONAL
,
{
.
dbl
=
0
},
0
,
DBL_MAX
,
V
},
...
...
libavfilter/version.h
View file @
88fd836a
...
...
@@ -49,9 +49,6 @@
* the public API and may change, break or disappear at any time.
*/
#ifndef FF_API_OLD_FILTER_OPTS
#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 7)
#endif
#ifndef FF_API_AVFILTER_OPEN
#define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 7)
#endif
...
...
libavfilter/vf_aspect.c
View file @
88fd836a
...
...
@@ -66,27 +66,9 @@ typedef struct AspectContext {
const
AVClass
*
class
;
AVRational
dar
;
AVRational
sar
;
#if FF_API_OLD_FILTER_OPTS
float
aspect_num
,
aspect_den
;
#endif
char
*
ratio_expr
;
}
AspectContext
;
#if FF_API_OLD_FILTER_OPTS
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
{
AspectContext
*
s
=
ctx
->
priv
;
if
(
s
->
aspect_num
>
0
&&
s
->
aspect_den
>
0
)
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"This syntax is deprecated, use "
"dar=<number> or dar=num/den.
\n
"
);
s
->
sar
=
s
->
dar
=
av_d2q
(
s
->
aspect_num
/
s
->
aspect_den
,
INT_MAX
);
}
return
0
;
}
#endif
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFrame
*
frame
)
{
AspectContext
*
s
=
link
->
dst
->
priv
;
...
...
@@ -138,14 +120,8 @@ static int setdar_config_props(AVFilterLink *inlink)
AVRational
dar
;
int
ret
;
#if FF_API_OLD_FILTER_OPTS
if
(
!
(
s
->
aspect_num
>
0
&&
s
->
aspect_den
>
0
))
{
#endif
if
((
ret
=
get_aspect_ratio
(
inlink
,
&
s
->
dar
)))
return
ret
;
#if FF_API_OLD_FILTER_OPTS
}
#endif
if
(
s
->
dar
.
num
&&
s
->
dar
.
den
)
{
av_reduce
(
&
s
->
sar
.
num
,
&
s
->
sar
.
den
,
...
...
@@ -166,10 +142,6 @@ static int setdar_config_props(AVFilterLink *inlink)
}
static
const
AVOption
setdar_options
[]
=
{
#if FF_API_OLD_FILTER_OPTS
{
"dar_num"
,
NULL
,
OFFSET
(
aspect_num
),
AV_OPT_TYPE_FLOAT
,
{
.
dbl
=
0
},
0
,
FLT_MAX
,
FLAGS
},
{
"dar_den"
,
NULL
,
OFFSET
(
aspect_den
),
AV_OPT_TYPE_FLOAT
,
{
.
dbl
=
0
},
0
,
FLT_MAX
,
FLAGS
},
#endif
{
"dar"
,
"display aspect ratio"
,
OFFSET
(
ratio_expr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"1"
},
.
flags
=
FLAGS
},
{
NULL
},
};
...
...
@@ -204,10 +176,6 @@ AVFilter ff_vf_setdar = {
.
name
=
"setdar"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Set the frame display aspect ratio."
),
#if FF_API_OLD_FILTER_OPTS
.
init
=
init
,
#endif
.
priv_size
=
sizeof
(
AspectContext
),
.
priv_class
=
&
setdar_class
,
...
...
@@ -224,14 +192,8 @@ static int setsar_config_props(AVFilterLink *inlink)
AspectContext
*
s
=
inlink
->
dst
->
priv
;
int
ret
;
#if FF_API_OLD_FILTER_OPTS
if
(
!
(
s
->
aspect_num
>
0
&&
s
->
aspect_den
>
0
))
{
#endif
if
((
ret
=
get_aspect_ratio
(
inlink
,
&
s
->
sar
)))
return
ret
;
#if FF_API_OLD_FILTER_OPTS
}
#endif
inlink
->
sample_aspect_ratio
=
s
->
sar
;
...
...
@@ -239,10 +201,6 @@ static int setsar_config_props(AVFilterLink *inlink)
}
static
const
AVOption
setsar_options
[]
=
{
#if FF_API_OLD_FILTER_OPTS
{
"sar_num"
,
NULL
,
OFFSET
(
aspect_num
),
AV_OPT_TYPE_FLOAT
,
{
.
dbl
=
0
},
0
,
FLT_MAX
,
FLAGS
},
{
"sar_den"
,
NULL
,
OFFSET
(
aspect_den
),
AV_OPT_TYPE_FLOAT
,
{
.
dbl
=
0
},
0
,
FLT_MAX
,
FLAGS
},
#endif
{
"sar"
,
"sample (pixel) aspect ratio"
,
OFFSET
(
ratio_expr
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"1"
},
.
flags
=
FLAGS
},
{
NULL
},
};
...
...
@@ -277,10 +235,6 @@ AVFilter ff_vf_setsar = {
.
name
=
"setsar"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Set the pixel sample aspect ratio."
),
#if FF_API_OLD_FILTER_OPTS
.
init
=
init
,
#endif
.
priv_size
=
sizeof
(
AspectContext
),
.
priv_class
=
&
setsar_class
,
...
...
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