Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
1c522e38
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,发现更多精彩内容 >>
提交
1c522e38
编写于
8月 16, 2012
作者:
S
Stefano Sabatini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavf/segment: guess list type from list filename suffix
上级
dc7e4d68
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
6 deletion
+17
-6
doc/muxers.texi
doc/muxers.texi
+7
-3
libavformat/segment.c
libavformat/segment.c
+9
-2
libavformat/version.h
libavformat/version.h
+1
-1
未找到文件。
doc/muxers.texi
浏览文件 @
1c522e38
...
...
@@ -466,8 +466,9 @@ time.
The segment muxer works best with a single constant frame rate video.
Optionally it can generate a flat list of the created segments, one segment
per line, by setting the option @var{segment_list}.
Optionally it can generate a list of the created segments, by setting
the option @var{segment_list}. The list type is specified by the
@var{segment_list_type} option.
The segment muxer supports the following options:
...
...
@@ -503,12 +504,15 @@ muxer according to the provided pattern, and should not contain the
@var{segment_start_time} and @var{segment_end_time} specify
the segment start and end time expressed in seconds.
A list file with the suffix @code{".ext"} will auto-select this format.
@item m3u8
Generate an extended M3U8 file, version 4, compliant with
@url{http://tools.ietf.org/id/draft-pantos-http-live-streaming-08.txt}.
A list file with the suffix @code{".m3u8"} will auto-select this format.
@end table
Default value is "flat"
.
If not specified the type is guessed from the list file name suffix
.
@item segment_time @var{time}
Set segment duration to @var{time}. Default value is "2".
@item segment_time_delta @var{delta}
...
...
libavformat/segment.c
浏览文件 @
1c522e38
...
...
@@ -37,6 +37,7 @@
#include "libavutil/mathematics.h"
typedef
enum
{
LIST_TYPE_UNDEFINED
=
-
1
,
LIST_TYPE_FLAT
=
0
,
LIST_TYPE_EXT
,
LIST_TYPE_M3U8
,
...
...
@@ -282,9 +283,15 @@ static int seg_write_header(AVFormatContext *s)
if
(
!
oc
)
return
AVERROR
(
ENOMEM
);
if
(
seg
->
list
)
if
(
seg
->
list
)
{
if
(
seg
->
list_type
==
LIST_TYPE_UNDEFINED
)
{
if
(
av_match_ext
(
seg
->
list
,
"ext"
))
seg
->
list_type
=
LIST_TYPE_EXT
;
else
if
(
av_match_ext
(
seg
->
list
,
"m3u8"
))
seg
->
list_type
=
LIST_TYPE_M3U8
;
else
seg
->
list_type
=
LIST_TYPE_FLAT
;
}
if
((
ret
=
segment_list_open
(
s
))
<
0
)
goto
fail
;
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
seg
->
has_video
+=
...
...
@@ -411,7 +418,7 @@ static const AVOption options[] = {
{
"segment_format"
,
"set container format used for the segments"
,
OFFSET
(
format
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
E
},
{
"segment_list"
,
"set the segment list filename"
,
OFFSET
(
list
),
AV_OPT_TYPE_STRING
,
{.
str
=
NULL
},
0
,
0
,
E
},
{
"segment_list_size"
,
"set the maximum number of playlist entries"
,
OFFSET
(
list_size
),
AV_OPT_TYPE_INT
,
{.
dbl
=
5
},
0
,
INT_MAX
,
E
},
{
"segment_list_type"
,
"set the segment list type"
,
OFFSET
(
list_type
),
AV_OPT_TYPE_INT
,
{.
dbl
=
LIST_TYPE_
FLAT
},
0
,
LIST_TYPE_NB
-
1
,
E
,
"list_type"
},
{
"segment_list_type"
,
"set the segment list type"
,
OFFSET
(
list_type
),
AV_OPT_TYPE_INT
,
{.
dbl
=
LIST_TYPE_
UNDEFINED
},
-
1
,
LIST_TYPE_NB
-
1
,
E
,
"list_type"
},
{
"flat"
,
"flat format"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
LIST_TYPE_FLAT
},
INT_MIN
,
INT_MAX
,
0
,
"list_type"
},
{
"ext"
,
"extended format"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
LIST_TYPE_EXT
},
INT_MIN
,
INT_MAX
,
0
,
"list_type"
},
{
"m3u8"
,
"M3U8 format"
,
0
,
AV_OPT_TYPE_CONST
,
{.
dbl
=
LIST_TYPE_M3U8
},
INT_MIN
,
INT_MAX
,
0
,
"list_type"
},
...
...
libavformat/version.h
浏览文件 @
1c522e38
...
...
@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 54
#define LIBAVFORMAT_VERSION_MINOR 25
#define LIBAVFORMAT_VERSION_MICRO 10
2
#define LIBAVFORMAT_VERSION_MICRO 10
3
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录