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
440af105
Commit
440af105
authored
Apr 27, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi: add avfilter_graph_set_auto_convert().
parent
7e944159
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
avfiltergraph.c
libavfilter/avfiltergraph.c
+13
-0
avfiltergraph.h
libavfilter/avfiltergraph.h
+17
-0
version.h
libavfilter/version.h
+2
-2
No files found.
libavfilter/avfiltergraph.c
View file @
440af105
...
...
@@ -95,6 +95,11 @@ fail:
return
ret
;
}
void
avfilter_graph_set_auto_convert
(
AVFilterGraph
*
graph
,
unsigned
flags
)
{
graph
->
disable_auto_convert
=
flags
;
}
int
ff_avfilter_graph_check_validity
(
AVFilterGraph
*
graph
,
AVClass
*
log_ctx
)
{
AVFilterContext
*
filt
;
...
...
@@ -160,6 +165,14 @@ static int insert_conv_filter(AVFilterGraph *graph, AVFilterLink *link,
char
inst_name
[
32
];
AVFilterContext
*
filt_ctx
;
if
(
graph
->
disable_auto_convert
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"The filters '%s' and '%s' do not have a common format "
"and automatic conversion is disabled.
\n
"
,
link
->
src
->
name
,
link
->
dst
->
name
);
return
AVERROR
(
EINVAL
);
}
snprintf
(
inst_name
,
sizeof
(
inst_name
),
"auto-inserted %s %d"
,
filt_name
,
auto_count
++
);
...
...
libavfilter/avfiltergraph.h
View file @
440af105
...
...
@@ -43,6 +43,8 @@ typedef struct AVFilterGraph {
AVFilterLink
**
sink_links
;
int
sink_links_count
;
unsigned
disable_auto_convert
;
}
AVFilterGraph
;
/**
...
...
@@ -83,6 +85,21 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt,
const
char
*
name
,
const
char
*
args
,
void
*
opaque
,
AVFilterGraph
*
graph_ctx
);
/**
* Enable or disable automatic format conversion inside the graph.
*
* Note that format conversion can still happen inside explicitly inserted
* scale and aconvert filters.
*
* @param flags any of the AVFILTER_AUTO_CONVERT_* constants
*/
void
avfilter_graph_set_auto_convert
(
AVFilterGraph
*
graph
,
unsigned
flags
);
enum
{
AVFILTER_AUTO_CONVERT_ALL
=
0
,
/**< all automatic conversions enabled */
AVFILTER_AUTO_CONVERT_NONE
=
-
1
,
/**< all automatic conversions disabled */
};
/**
* Check validity and configure all the links and formats in the graph.
*
...
...
libavfilter/version.h
View file @
440af105
...
...
@@ -29,8 +29,8 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 7
2
#define LIBAVFILTER_VERSION_MICRO 10
5
#define LIBAVFILTER_VERSION_MINOR 7
3
#define LIBAVFILTER_VERSION_MICRO 10
0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
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