Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
42c7c61a
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
42c7c61a
编写于
2月 25, 2013
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avfiltergraph: replace AVFilterGraph.filter_count with nb_filters
This is more consistent with the naming in the rest of Libav.
上级
556aab8f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
20 deletion
+32
-20
doc/APIchanges
doc/APIchanges
+3
-0
libavfilter/avfiltergraph.c
libavfilter/avfiltergraph.c
+15
-15
libavfilter/avfiltergraph.h
libavfilter/avfiltergraph.h
+9
-0
libavfilter/graphparser.c
libavfilter/graphparser.c
+4
-4
libavfilter/version.h
libavfilter/version.h
+1
-1
未找到文件。
doc/APIchanges
浏览文件 @
42c7c61a
...
...
@@ -13,6 +13,9 @@ libavutil: 2012-10-22
API changes, most recent first:
2013-xx-xx - lavfi 3.6.0
Add AVFilterGraph.nb_filters, deprecate AVFilterGraph.filter_count.
2013-03-xx - Reference counted buffers - lavu 52.8.0, lavc 55.0.0, lavf 55.0.0,
lavd 54.0.0, lavfi 3.5.0
xxxxxxx, xxxxxxx - add a new API for reference counted buffers and buffer
...
...
libavfilter/avfiltergraph.c
浏览文件 @
42c7c61a
...
...
@@ -50,8 +50,8 @@ void avfilter_graph_free(AVFilterGraph **graph)
{
if
(
!*
graph
)
return
;
for
(;
(
*
graph
)
->
filter_count
>
0
;
(
*
graph
)
->
filter_count
--
)
avfilter_free
((
*
graph
)
->
filters
[(
*
graph
)
->
filter_count
-
1
]);
for
(;
(
*
graph
)
->
nb_filters
>
0
;
(
*
graph
)
->
nb_filters
--
)
avfilter_free
((
*
graph
)
->
filters
[(
*
graph
)
->
nb_filters
-
1
]);
av_freep
(
&
(
*
graph
)
->
scale_sws_opts
);
av_freep
(
&
(
*
graph
)
->
resample_lavr_opts
);
av_freep
(
&
(
*
graph
)
->
filters
);
...
...
@@ -61,12 +61,12 @@ void avfilter_graph_free(AVFilterGraph **graph)
int
avfilter_graph_add_filter
(
AVFilterGraph
*
graph
,
AVFilterContext
*
filter
)
{
AVFilterContext
**
filters
=
av_realloc
(
graph
->
filters
,
sizeof
(
AVFilterContext
*
)
*
(
graph
->
filter_count
+
1
));
sizeof
(
AVFilterContext
*
)
*
(
graph
->
nb_filters
+
1
));
if
(
!
filters
)
return
AVERROR
(
ENOMEM
);
graph
->
filters
=
filters
;
graph
->
filters
[
graph
->
filter_count
++
]
=
filter
;
graph
->
filters
[
graph
->
nb_filters
++
]
=
filter
;
return
0
;
}
...
...
@@ -105,7 +105,7 @@ static int graph_check_validity(AVFilterGraph *graph, AVClass *log_ctx)
AVFilterContext
*
filt
;
int
i
,
j
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
{
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
filt
=
graph
->
filters
[
i
];
for
(
j
=
0
;
j
<
filt
->
nb_inputs
;
j
++
)
{
...
...
@@ -140,7 +140,7 @@ static int graph_config_links(AVFilterGraph *graph, AVClass *log_ctx)
AVFilterContext
*
filt
;
int
i
,
ret
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
{
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
filt
=
graph
->
filters
[
i
];
if
(
!
filt
->
nb_outputs
)
{
...
...
@@ -156,7 +156,7 @@ AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name)
{
int
i
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
if
(
graph
->
filters
[
i
]
->
name
&&
!
strcmp
(
name
,
graph
->
filters
[
i
]
->
name
))
return
graph
->
filters
[
i
];
...
...
@@ -169,7 +169,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
int
scaler_count
=
0
,
resampler_count
=
0
;
/* ask all the sub-filters for their supported media formats */
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
{
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
if
(
graph
->
filters
[
i
]
->
filter
->
query_formats
)
graph
->
filters
[
i
]
->
filter
->
query_formats
(
graph
->
filters
[
i
]);
else
...
...
@@ -177,7 +177,7 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
}
/* go through and merge as many format lists as possible */
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
{
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
AVFilterContext
*
filter
=
graph
->
filters
[
i
];
for
(
j
=
0
;
j
<
filter
->
nb_inputs
;
j
++
)
{
...
...
@@ -377,7 +377,7 @@ static void reduce_formats(AVFilterGraph *graph)
do
{
reduced
=
0
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
reduced
|=
reduce_formats_on_filter
(
graph
->
filters
[
i
]);
}
while
(
reduced
);
}
...
...
@@ -425,7 +425,7 @@ static void swap_samplerates(AVFilterGraph *graph)
{
int
i
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
swap_samplerates_on_filter
(
graph
->
filters
[
i
]);
}
...
...
@@ -540,7 +540,7 @@ static void swap_channel_layouts(AVFilterGraph *graph)
{
int
i
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
swap_channel_layouts_on_filter
(
graph
->
filters
[
i
]);
}
...
...
@@ -608,7 +608,7 @@ static void swap_sample_fmts(AVFilterGraph *graph)
{
int
i
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
swap_sample_fmts_on_filter
(
graph
->
filters
[
i
]);
}
...
...
@@ -617,7 +617,7 @@ static int pick_formats(AVFilterGraph *graph)
{
int
i
,
j
,
ret
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
{
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
AVFilterContext
*
filter
=
graph
->
filters
[
i
];
for
(
j
=
0
;
j
<
filter
->
nb_inputs
;
j
++
)
...
...
@@ -664,7 +664,7 @@ static int graph_insert_fifos(AVFilterGraph *graph, AVClass *log_ctx)
int
i
,
j
,
ret
;
int
fifo_count
=
0
;
for
(
i
=
0
;
i
<
graph
->
filter_count
;
i
++
)
{
for
(
i
=
0
;
i
<
graph
->
nb_filters
;
i
++
)
{
f
=
graph
->
filters
[
i
];
for
(
j
=
0
;
j
<
f
->
nb_inputs
;
j
++
)
{
...
...
libavfilter/avfiltergraph.h
浏览文件 @
42c7c61a
...
...
@@ -27,11 +27,20 @@
typedef
struct
AVFilterGraph
{
const
AVClass
*
av_class
;
#if FF_API_FOO_COUNT
attribute_deprecated
unsigned
filter_count
;
#endif
AVFilterContext
**
filters
;
#if !FF_API_FOO_COUNT
unsigned
nb_filters
;
#endif
char
*
scale_sws_opts
;
///< sws options to use for the auto-inserted scale filters
char
*
resample_lavr_opts
;
///< libavresample options to use for the auto-inserted resample filters
#if FF_API_FOO_COUNT
unsigned
nb_filters
;
#endif
}
AVFilterGraph
;
/**
...
...
libavfilter/graphparser.c
浏览文件 @
42c7c61a
...
...
@@ -435,8 +435,8 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
return
0
;
fail:
for
(;
graph
->
filter_count
>
0
;
graph
->
filter_count
--
)
avfilter_free
(
graph
->
filters
[
graph
->
filter_count
-
1
]);
for
(;
graph
->
nb_filters
>
0
;
graph
->
nb_filters
--
)
avfilter_free
(
graph
->
filters
[
graph
->
nb_filters
-
1
]);
av_freep
(
&
graph
->
filters
);
avfilter_inout_free
(
&
open_inputs
);
avfilter_inout_free
(
&
open_outputs
);
...
...
@@ -500,8 +500,8 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
fail:
if
(
ret
<
0
)
{
for
(;
graph
->
filter_count
>
0
;
graph
->
filter_count
--
)
avfilter_free
(
graph
->
filters
[
graph
->
filter_count
-
1
]);
for
(;
graph
->
nb_filters
>
0
;
graph
->
nb_filters
--
)
avfilter_free
(
graph
->
filters
[
graph
->
nb_filters
-
1
]);
av_freep
(
&
graph
->
filters
);
}
avfilter_inout_free
(
&
inputs
);
...
...
libavfilter/version.h
浏览文件 @
42c7c61a
...
...
@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR
5
#define LIBAVFILTER_VERSION_MINOR
6
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录