Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
4f5440ad
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,发现更多精彩内容 >>
提交
4f5440ad
编写于
12月 18, 2012
作者:
P
Paul B Mahol
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NIST SPHERE demuxer
Signed-off-by:
N
Paul B Mahol
<
onemda@gmail.com
>
上级
98fed176
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
134 addition
and
1 deletion
+134
-1
Changelog
Changelog
+1
-0
MAINTAINERS
MAINTAINERS
+1
-0
doc/general.texi
doc/general.texi
+1
-0
libavformat/Makefile
libavformat/Makefile
+1
-0
libavformat/allformats.c
libavformat/allformats.c
+1
-0
libavformat/nistspheredec.c
libavformat/nistspheredec.c
+128
-0
libavformat/version.h
libavformat/version.h
+1
-1
未找到文件。
Changelog
浏览文件 @
4f5440ad
...
...
@@ -49,6 +49,7 @@ version <next>:
- adaptive frame-level multithreading for H.264
- documentation split into per-component manuals
- pp (postproc) filter ported from MPlayer
- NIST Sphere demuxer
version 1.0:
...
...
MAINTAINERS
浏览文件 @
4f5440ad
...
...
@@ -362,6 +362,7 @@ Muxers/Demuxers:
mtv.c Reynaldo H. Verdejo Pinochet
mxf* Baptiste Coudurier
mxfdec.c Tomas Härdin
nistspheredec.c Paul B Mahol
nsvdec.c Francois Revol
nut.c Michael Niedermayer
nuv.c Reimar Doeffinger
...
...
doc/general.texi
浏览文件 @
4f5440ad
...
...
@@ -280,6 +280,7 @@ library:
@tab SMPTE 386M, D-10/IMX Mapping.
@item NC camera feed @tab @tab X
@tab NC (AVIP NC4600) camera streams
@item NIST SPeech HEader REsources @tab @tab X
@item NTT TwinVQ (VQF) @tab @tab X
@tab Nippon Telegraph and Telephone Corporation TwinVQ.
@item Nullsoft Streaming Video @tab @tab X
...
...
libavformat/Makefile
浏览文件 @
4f5440ad
...
...
@@ -227,6 +227,7 @@ OBJS-$(CONFIG_MXF_DEMUXER) += mxfdec.o mxf.o
OBJS-$(CONFIG_MXF_MUXER)
+=
mxfenc.o mxf.o audiointerleave.o
OBJS-$(CONFIG_MXG_DEMUXER)
+=
mxg.o
OBJS-$(CONFIG_NC_DEMUXER)
+=
ncdec.o
OBJS-$(CONFIG_NISTSPHERE_DEMUXER)
+=
nistspheredec.o pcm.o
OBJS-$(CONFIG_NSV_DEMUXER)
+=
nsvdec.o
OBJS-$(CONFIG_NULL_MUXER)
+=
nullenc.o
OBJS-$(CONFIG_NUT_DEMUXER)
+=
nutdec.o nut.o
...
...
libavformat/allformats.c
浏览文件 @
4f5440ad
...
...
@@ -178,6 +178,7 @@ void av_register_all(void)
REGISTER_MUXER
(
MXF_D10
,
mxf_d10
);
REGISTER_DEMUXER
(
MXG
,
mxg
);
REGISTER_DEMUXER
(
NC
,
nc
);
REGISTER_DEMUXER
(
NISTSPHERE
,
nistsphere
);
REGISTER_DEMUXER
(
NSV
,
nsv
);
REGISTER_MUXER
(
NULL
,
null
);
REGISTER_MUXDEMUX
(
NUT
,
nut
);
...
...
libavformat/nistspheredec.c
0 → 100644
浏览文件 @
4f5440ad
/*
* NIST Sphere demuxer
* Copyright (c) 2012 Paul B Mahol
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
#include "pcm.h"
static
int
nist_probe
(
AVProbeData
*
p
)
{
if
(
AV_RL64
(
p
->
buf
)
==
AV_RL64
(
"NIST_1A
\x0a
"
))
return
AVPROBE_SCORE_MAX
;
return
0
;
}
static
int
nist_read_header
(
AVFormatContext
*
s
)
{
char
buffer
[
32
],
coding
[
32
]
=
"pcm"
,
format
[
32
]
=
"01"
;
int
bps
=
0
,
be
=
0
;
int32_t
header_size
;
AVStream
*
st
;
st
=
avformat_new_stream
(
s
,
NULL
);
if
(
!
st
)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_AUDIO
;
ff_get_line
(
s
->
pb
,
buffer
,
sizeof
(
buffer
));
ff_get_line
(
s
->
pb
,
buffer
,
sizeof
(
buffer
));
sscanf
(
buffer
,
"%"
SCNd32
,
&
header_size
);
if
(
header_size
<=
0
)
return
AVERROR_INVALIDDATA
;
while
(
!
url_feof
(
s
->
pb
))
{
ff_get_line
(
s
->
pb
,
buffer
,
sizeof
(
buffer
));
if
(
avio_tell
(
s
->
pb
)
>=
header_size
)
return
AVERROR_INVALIDDATA
;
if
(
!
memcmp
(
buffer
,
"end_head"
,
8
))
{
if
(
!
st
->
codec
->
bits_per_coded_sample
)
st
->
codec
->
bits_per_coded_sample
=
bps
<<
3
;
if
(
!
av_strcasecmp
(
coding
,
"pcm"
))
{
st
->
codec
->
codec_id
=
ff_get_pcm_codec_id
(
st
->
codec
->
bits_per_coded_sample
,
0
,
be
,
0xFFFF
);
}
else
if
(
!
av_strcasecmp
(
coding
,
"alaw"
))
{
st
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_ALAW
;
}
else
if
(
!
av_strcasecmp
(
coding
,
"ulaw"
)
||
!
av_strcasecmp
(
coding
,
"mu-law"
))
{
st
->
codec
->
codec_id
=
AV_CODEC_ID_PCM_MULAW
;
}
else
{
av_log_ask_for_sample
(
s
,
"unsupported coding: %s
\n
"
,
coding
);
}
avpriv_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
sample_rate
);
st
->
codec
->
block_align
=
st
->
codec
->
bits_per_coded_sample
*
st
->
codec
->
channels
/
8
;
if
(
avio_tell
(
s
->
pb
)
>
header_size
)
return
AVERROR_INVALIDDATA
;
avio_skip
(
s
->
pb
,
header_size
-
avio_tell
(
s
->
pb
));
return
0
;
}
else
if
(
!
memcmp
(
buffer
,
"channel_count"
,
13
))
{
sscanf
(
buffer
,
"%*s %*s %"
SCNd32
,
&
st
->
codec
->
channels
);
}
else
if
(
!
memcmp
(
buffer
,
"sample_byte_format"
,
18
))
{
sscanf
(
buffer
,
"%*s %*s %31s"
,
format
);
if
(
!
av_strcasecmp
(
format
,
"01"
))
{
be
=
0
;
}
else
if
(
!
av_strcasecmp
(
format
,
"10"
))
{
be
=
1
;
}
else
if
(
av_strcasecmp
(
format
,
"1"
))
{
av_log_ask_for_sample
(
s
,
"unsupported sample byte format: %s
\n
"
,
format
);
return
AVERROR_PATCHWELCOME
;
}
}
else
if
(
!
memcmp
(
buffer
,
"sample_coding"
,
13
))
{
sscanf
(
buffer
,
"%*s %*s %31s"
,
coding
);
}
else
if
(
!
memcmp
(
buffer
,
"sample_count"
,
12
))
{
sscanf
(
buffer
,
"%*s %*s %"
SCNd64
,
&
st
->
duration
);
}
else
if
(
!
memcmp
(
buffer
,
"sample_n_bytes"
,
14
))
{
sscanf
(
buffer
,
"%*s %*s %"
SCNd32
,
&
bps
);
}
else
if
(
!
memcmp
(
buffer
,
"sample_rate"
,
11
))
{
sscanf
(
buffer
,
"%*s %*s %"
SCNd32
,
&
st
->
codec
->
sample_rate
);
}
else
if
(
!
memcmp
(
buffer
,
"sample_sig_bits"
,
15
))
{
sscanf
(
buffer
,
"%*s %*s %"
SCNd32
,
&
st
->
codec
->
bits_per_coded_sample
);
}
else
{
char
key
[
32
],
value
[
32
];
sscanf
(
buffer
,
"%31s %*s %31s"
,
key
,
value
);
av_dict_set
(
&
s
->
metadata
,
key
,
value
,
AV_DICT_APPEND
);
}
}
return
AVERROR_EOF
;
}
AVInputFormat
ff_nistsphere_demuxer
=
{
.
name
=
"nistsphere"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"NIST SPeech HEader REsources"
),
.
read_probe
=
nist_probe
,
.
read_header
=
nist_read_header
,
.
read_packet
=
ff_pcm_read_packet
,
.
read_seek
=
ff_pcm_read_seek
,
.
extensions
=
"nist,sph"
,
.
flags
=
AVFMT_GENERIC_INDEX
,
};
libavformat/version.h
浏览文件 @
4f5440ad
...
...
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 54
#define LIBAVFORMAT_VERSION_MINOR
49
#define LIBAVFORMAT_VERSION_MINOR
50
#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录