Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
a42d6e6c
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,发现更多精彩内容 >>
提交
a42d6e6c
编写于
2月 25, 2013
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vsrc_movie: switch to an AVOptions-based system.
上级
b7b3302f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
29 deletion
+15
-29
doc/filters.texi
doc/filters.texi
+5
-7
libavfilter/vsrc_movie.c
libavfilter/vsrc_movie.c
+10
-22
未找到文件。
doc/filters.texi
浏览文件 @
a42d6e6c
...
@@ -2355,16 +2355,14 @@ useful in applications that do not support arbitrary filter graphs, but its use
...
@@ -2355,16 +2355,14 @@ useful in applications that do not support arbitrary filter graphs, but its use
is discouraged in those that do. Specifically in @command{avconv} this filter
is discouraged in those that do. Specifically in @command{avconv} this filter
should never be used, the @option{-filter_complex} option fully replaces it.
should never be used, the @option{-filter_complex} option fully replaces it.
It accepts the syntax: @var{movie_name}[:@var{options}] where
This filter accepts the following options:
@var{movie_name} is the name of the resource to read (not necessarily
a file but also a device or a stream accessed through some protocol),
and @var{options} is an optional sequence of @var{key}=@var{value}
pairs, separated by ":".
The description of the accepted options follows.
@table @option
@table @option
@item filename
The name of the resource to read (not necessarily a file but also a device or a
stream accessed through some protocol).
@item format_name, f
@item format_name, f
Specifies the format assumed for the movie to read, and can be either
Specifies the format assumed for the movie to read, and can be either
the name of a container or an input device. If not specified the
the name of a container or an input device. If not specified the
...
...
libavfilter/vsrc_movie.c
浏览文件 @
a42d6e6c
...
@@ -57,15 +57,17 @@ typedef struct {
...
@@ -57,15 +57,17 @@ typedef struct {
}
MovieContext
;
}
MovieContext
;
#define OFFSET(x) offsetof(MovieContext, x)
#define OFFSET(x) offsetof(MovieContext, x)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM
static
const
AVOption
movie_options
[]
=
{
static
const
AVOption
movie_options
[]
=
{
{
"format_name"
,
"set format name"
,
OFFSET
(
format_name
),
AV_OPT_TYPE_STRING
,
{.
str
=
0
},
CHAR_MIN
,
CHAR_MAX
},
{
"filename"
,
NULL
,
OFFSET
(
file_name
),
AV_OPT_TYPE_STRING
,
.
flags
=
FLAGS
},
{
"f"
,
"set format name"
,
OFFSET
(
format_name
),
AV_OPT_TYPE_STRING
,
{.
str
=
0
},
CHAR_MIN
,
CHAR_MAX
},
{
"format_name"
,
"set format name"
,
OFFSET
(
format_name
),
AV_OPT_TYPE_STRING
,
.
flags
=
FLAGS
},
{
"stream_index"
,
"set stream index"
,
OFFSET
(
stream_index
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
INT_MAX
},
{
"f"
,
"set format name"
,
OFFSET
(
format_name
),
AV_OPT_TYPE_STRING
,
.
flags
=
FLAGS
},
{
"si"
,
"set stream index"
,
OFFSET
(
stream_index
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
INT_MAX
},
{
"stream_index"
,
"set stream index"
,
OFFSET
(
stream_index
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
FLAGS
},
{
"seek_point"
,
"set seekpoint (seconds)"
,
OFFSET
(
seek_point_d
),
AV_OPT_TYPE_DOUBLE
,
{.
dbl
=
0
},
0
,
(
INT64_MAX
-
1
)
/
1000000
},
{
"si"
,
"set stream index"
,
OFFSET
(
stream_index
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
FLAGS
},
{
"sp"
,
"set seekpoint (seconds)"
,
OFFSET
(
seek_point_d
),
AV_OPT_TYPE_DOUBLE
,
{.
dbl
=
0
},
0
,
(
INT64_MAX
-
1
)
/
1000000
},
{
"seek_point"
,
"set seekpoint (seconds)"
,
OFFSET
(
seek_point_d
),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
0
},
0
,
(
INT64_MAX
-
1
)
/
1000000
,
FLAGS
},
{
NULL
},
{
"sp"
,
"set seekpoint (seconds)"
,
OFFSET
(
seek_point_d
),
AV_OPT_TYPE_DOUBLE
,
{
.
dbl
=
0
},
0
,
(
INT64_MAX
-
1
)
/
1000000
,
FLAGS
},
{
NULL
},
};
};
static
const
char
*
movie_get_name
(
void
*
ctx
)
static
const
char
*
movie_get_name
(
void
*
ctx
)
...
@@ -161,21 +163,6 @@ static int movie_init(AVFilterContext *ctx)
...
@@ -161,21 +163,6 @@ static int movie_init(AVFilterContext *ctx)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
{
MovieContext
*
movie
=
ctx
->
priv
;
MovieContext
*
movie
=
ctx
->
priv
;
int
ret
;
movie
->
class
=
&
movie_class
;
av_opt_set_defaults
(
movie
);
if
(
args
)
movie
->
file_name
=
av_get_token
(
&
args
,
":"
);
if
(
!
movie
->
file_name
||
!*
movie
->
file_name
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"No filename provided!
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
*
args
++
==
':'
&&
(
ret
=
av_set_options_string
(
movie
,
args
,
"="
,
":"
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing options string: '%s'
\n
"
,
args
);
return
ret
;
}
movie
->
seek_point
=
movie
->
seek_point_d
*
1000000
+
0
.
5
;
movie
->
seek_point
=
movie
->
seek_point_d
*
1000000
+
0
.
5
;
...
@@ -290,6 +277,7 @@ AVFilter avfilter_vsrc_movie = {
...
@@ -290,6 +277,7 @@ AVFilter avfilter_vsrc_movie = {
.
name
=
"movie"
,
.
name
=
"movie"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Read from a movie source."
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Read from a movie source."
),
.
priv_size
=
sizeof
(
MovieContext
),
.
priv_size
=
sizeof
(
MovieContext
),
.
priv_class
=
&
movie_class
,
.
init
=
init
,
.
init
=
init
,
.
uninit
=
uninit
,
.
uninit
=
uninit
,
.
query_formats
=
query_formats
,
.
query_formats
=
query_formats
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录