mirror of https://git.ffmpeg.org/ffmpeg.git
Cosmetics: change function order
Commited in SoC by Vitor Sessak on 2008-05-24 12:46:27 Originally committed as revision 13340 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
74c2f1fbcb
commit
8e74c889bc
|
@ -27,41 +27,6 @@
|
||||||
#include "avfilter.h"
|
#include "avfilter.h"
|
||||||
#include "avfiltergraph.h"
|
#include "avfiltergraph.h"
|
||||||
|
|
||||||
static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
|
|
||||||
const char *name, const char *args,
|
|
||||||
AVClass *log_ctx)
|
|
||||||
{
|
|
||||||
AVFilterContext *filt;
|
|
||||||
|
|
||||||
AVFilter *filterdef;
|
|
||||||
char inst_name[30];
|
|
||||||
|
|
||||||
snprintf(inst_name, sizeof(inst_name), "Parsed filter %d", index);
|
|
||||||
|
|
||||||
if(!(filterdef = avfilter_get_by_name(name))) {
|
|
||||||
av_log(log_ctx, AV_LOG_ERROR,
|
|
||||||
"no such filter: '%s'\n", name);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!(filt = avfilter_open(filterdef, inst_name))) {
|
|
||||||
av_log(log_ctx, AV_LOG_ERROR,
|
|
||||||
"error creating filter '%s'\n", name);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(avfilter_graph_add_filter(ctx, filt) < 0)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if(avfilter_init_filter(filt, args, NULL)) {
|
|
||||||
av_log(log_ctx, AV_LOG_ERROR,
|
|
||||||
"error initializing filter '%s' with args '%s'\n", name, args);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return filt;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int link_filter(AVFilterContext *src, int srcpad,
|
static int link_filter(AVFilterContext *src, int srcpad,
|
||||||
AVFilterContext *dst, int dstpad,
|
AVFilterContext *dst, int dstpad,
|
||||||
AVClass *log_ctx)
|
AVClass *log_ctx)
|
||||||
|
@ -150,6 +115,41 @@ static void parse_link_name(const char **buf, char **name, AVClass *log_ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static AVFilterContext *create_filter(AVFilterGraph *ctx, int index,
|
||||||
|
const char *name, const char *args,
|
||||||
|
AVClass *log_ctx)
|
||||||
|
{
|
||||||
|
AVFilterContext *filt;
|
||||||
|
|
||||||
|
AVFilter *filterdef;
|
||||||
|
char inst_name[30];
|
||||||
|
|
||||||
|
snprintf(inst_name, sizeof(inst_name), "Parsed filter %d", index);
|
||||||
|
|
||||||
|
if(!(filterdef = avfilter_get_by_name(name))) {
|
||||||
|
av_log(log_ctx, AV_LOG_ERROR,
|
||||||
|
"no such filter: '%s'\n", name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(filt = avfilter_open(filterdef, inst_name))) {
|
||||||
|
av_log(log_ctx, AV_LOG_ERROR,
|
||||||
|
"error creating filter '%s'\n", name);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(avfilter_graph_add_filter(ctx, filt) < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if(avfilter_init_filter(filt, args, NULL)) {
|
||||||
|
av_log(log_ctx, AV_LOG_ERROR,
|
||||||
|
"error initializing filter '%s' with args '%s'\n", name, args);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return filt;
|
||||||
|
}
|
||||||
|
|
||||||
static void free_inout(AVFilterInOut *head)
|
static void free_inout(AVFilterInOut *head)
|
||||||
{
|
{
|
||||||
while(head) {
|
while(head) {
|
||||||
|
|
|
@ -46,9 +46,7 @@ typedef struct AVFilterInOut {
|
||||||
* Add to a graph a graph described by a string.
|
* Add to a graph a graph described by a string.
|
||||||
* @param graph the filter graph where to link the parsed graph context
|
* @param graph the filter graph where to link the parsed graph context
|
||||||
* @param filters string to be parsed
|
* @param filters string to be parsed
|
||||||
* @param in input to the graph to be parsed (TODO: allow several)
|
* @param inouts linked list to the inputs and outputs of the graph
|
||||||
* @param inpad pad index of the input
|
|
||||||
* @param out output to the graph to be parsed (TODO: allow several)
|
|
||||||
* @param outpad pad index of the output
|
* @param outpad pad index of the output
|
||||||
* @return zero on success, -1 on error
|
* @return zero on success, -1 on error
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue