Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
48a5adab
Commit
48a5adab
authored
Mar 17, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add avfilter_init_str() to replace avfilter_init_filter().
Drop the unused opaque parameter from its signature.
parent
1565cbc6
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
3 deletions
+33
-3
APIchanges
doc/APIchanges
+1
-0
avfilter.c
libavfilter/avfilter.c
+7
-0
avfilter.h
libavfilter/avfilter.h
+16
-0
avfiltergraph.c
libavfilter/avfiltergraph.c
+3
-1
filtfmts.c
libavfilter/filtfmts.c
+1
-1
graphparser.c
libavfilter/graphparser.c
+2
-1
version.h
libavfilter/version.h
+3
-0
No files found.
doc/APIchanges
View file @
48a5adab
...
...
@@ -20,6 +20,7 @@ API changes, most recent first:
avfilter_graph_add_filter().
Add AVFilterContext.graph pointing to the AVFilterGraph that contains the
filter.
Add avfilter_init_str(), deprecate avfilter_init_filter().
2013-xx-xx - lavfi 3.7.0 - avfilter.h
Add AVFilter.priv_class for exporting filter options through the AVOptions API
...
...
libavfilter/avfilter.c
View file @
48a5adab
...
...
@@ -508,7 +508,14 @@ static int process_unnamed_options(AVFilterContext *ctx, AVDictionary **options,
return
0
;
}
#if FF_API_AVFILTER_INIT_FILTER
int
avfilter_init_filter
(
AVFilterContext
*
filter
,
const
char
*
args
,
void
*
opaque
)
{
return
avfilter_init_str
(
filter
,
args
);
}
#endif
int
avfilter_init_str
(
AVFilterContext
*
filter
,
const
char
*
args
)
{
AVDictionary
*
options
=
NULL
;
AVDictionaryEntry
*
e
;
...
...
libavfilter/avfilter.h
View file @
48a5adab
...
...
@@ -645,6 +645,8 @@ attribute_deprecated
int
avfilter_open
(
AVFilterContext
**
filter_ctx
,
AVFilter
*
filter
,
const
char
*
inst_name
);
#endif
#if FF_API_AVFILTER_INIT_FILTER
/**
* Initialize a filter.
*
...
...
@@ -655,7 +657,21 @@ int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *in
* of this parameter varies by filter.
* @return zero on success
*/
attribute_deprecated
int
avfilter_init_filter
(
AVFilterContext
*
filter
,
const
char
*
args
,
void
*
opaque
);
#endif
/**
* Initialize a filter with the supplied parameters.
*
* @param ctx uninitialized filter context to initialize
* @param args Options to initialize the filter with. This must be a
* ':'-separated list of options in the 'key=value' form.
* May be NULL if the options have been set directly using the
* AVOptions API or there are no options that need to be set.
* @return 0 on success, a negative AVERROR on failure
*/
int
avfilter_init_str
(
AVFilterContext
*
ctx
,
const
char
*
args
);
/**
* Free a filter context. This will also remove the filter from its
...
...
libavfilter/avfiltergraph.c
View file @
48a5adab
...
...
@@ -103,7 +103,9 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,
*
filt_ctx
=
avfilter_graph_alloc_filter
(
graph_ctx
,
filt
,
name
);
if
(
!*
filt_ctx
)
return
AVERROR
(
ENOMEM
);
if
((
ret
=
avfilter_init_filter
(
*
filt_ctx
,
args
,
opaque
))
<
0
)
ret
=
avfilter_init_str
(
*
filt_ctx
,
args
);
if
(
ret
<
0
)
goto
fail
;
return
0
;
...
...
libavfilter/filtfmts.c
View file @
48a5adab
...
...
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
filter_name
);
return
1
;
}
if
(
avfilter_init_
filter
(
filter_ctx
,
filter_args
,
NULL
)
<
0
)
{
if
(
avfilter_init_
str
(
filter_ctx
,
filter_args
)
<
0
)
{
fprintf
(
stderr
,
"Impossible to init filter '%s' with arguments '%s'
\n
"
,
filter_name
,
filter_args
);
return
1
;
...
...
libavfilter/graphparser.c
View file @
48a5adab
...
...
@@ -123,7 +123,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
args
=
tmp_args
;
}
if
((
ret
=
avfilter_init_filter
(
*
filt_ctx
,
args
,
NULL
))
<
0
)
{
ret
=
avfilter_init_str
(
*
filt_ctx
,
args
);
if
(
ret
<
0
)
{
av_log
(
log_ctx
,
AV_LOG_ERROR
,
"Error initializing filter '%s' with args '%s'
\n
"
,
filt_name
,
args
);
return
ret
;
...
...
libavfilter/version.h
View file @
48a5adab
...
...
@@ -61,5 +61,8 @@
#ifndef FF_API_AVFILTER_OPEN
#define FF_API_AVFILTER_OPEN (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_AVFILTER_INIT_FILTER
#define FF_API_AVFILTER_INIT_FILTER (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#endif
/* AVFILTER_VERSION_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