Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
20b40a59
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,发现更多精彩内容 >>
提交
20b40a59
编写于
3月 03, 2014
作者:
T
Tim Walker
提交者:
Vittorio Giovara
3月 09, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
movenc: write hvcC tag for HEVC.
上级
1d9014f0
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
1140 addition
and
1 deletion
+1140
-1
libavformat/Makefile
libavformat/Makefile
+1
-1
libavformat/hevc.c
libavformat/hevc.c
+1076
-0
libavformat/hevc.h
libavformat/hevc.h
+50
-0
libavformat/movenc.c
libavformat/movenc.c
+13
-0
未找到文件。
libavformat/Makefile
浏览文件 @
20b40a59
...
...
@@ -179,7 +179,7 @@ OBJS-$(CONFIG_MM_DEMUXER) += mm.o
OBJS-$(CONFIG_MMF_DEMUXER)
+=
mmf.o pcm.o
OBJS-$(CONFIG_MMF_MUXER)
+=
mmf.o
OBJS-$(CONFIG_MOV_DEMUXER)
+=
mov.o isom.o mov_chan.o
OBJS-$(CONFIG_MOV_MUXER)
+=
movenc.o isom.o avc.o
\
OBJS-$(CONFIG_MOV_MUXER)
+=
movenc.o isom.o avc.o
hevc.o
\
movenchint.o mov_chan.o
OBJS-$(CONFIG_MP2_MUXER)
+=
mp3enc.o rawenc.o id3v2enc.o
OBJS-$(CONFIG_MP3_DEMUXER)
+=
mp3dec.o
...
...
libavformat/hevc.c
0 → 100644
浏览文件 @
20b40a59
此差异已折叠。
点击以展开。
libavformat/hevc.h
0 → 100644
浏览文件 @
20b40a59
/*
* Copyright (c) 2014 Tim Walker <tdskywalker@gmail.com>
*
* This file is part of Libav.
*
* Libav 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.
*
* Libav 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 Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* internal header for HEVC (de)muxer utilities
*/
#ifndef AVFORMAT_HEVC_H
#define AVFORMAT_HEVC_H
#include <stdint.h>
#include "avio.h"
/**
* Writes HEVC extradata (parameter sets, declarative SEI NAL units) to the
* provided AVIOContext.
*
* If the extradata is Annex B format, it gets converted to hvcC format before
* writing.
*
* @param pb address of the AVIOContext where the hvcC shall be written
* @param data address of the buffer holding the data needed to write the hvcC
* @param size size (in bytes) of the data buffer
* @param ps_array_completeness whether all parameter sets are in the hvcC (1)
* or there may be additional parameter sets in the bitstream (0)
* @return 0 in case of success, a negative value corresponding to an AVERROR
* code in case of failure
*/
int
ff_isom_write_hvcc
(
AVIOContext
*
pb
,
const
uint8_t
*
data
,
int
size
,
int
ps_array_completeness
);
#endif
/* AVFORMAT_HEVC_H */
libavformat/movenc.c
浏览文件 @
20b40a59
...
...
@@ -39,6 +39,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "hevc.h"
#include "rtpenc.h"
#include "mov_chan.h"
...
...
@@ -685,6 +686,16 @@ static int mov_write_avcc_tag(AVIOContext *pb, MOVTrack *track)
return
update_size
(
pb
,
pos
);
}
static
int
mov_write_hvcc_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
)
{
int64_t
pos
=
avio_tell
(
pb
);
avio_wb32
(
pb
,
0
);
ffio_wfourcc
(
pb
,
"hvcC"
);
ff_isom_write_hvcc
(
pb
,
track
->
vos_data
,
track
->
vos_len
,
0
);
return
update_size
(
pb
,
pos
);
}
/* also used by all avid codecs (dv, imx, meridien) and their variants */
static
int
mov_write_avid_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
)
{
...
...
@@ -1035,6 +1046,8 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
mov_write_svq3_tag
(
pb
);
else
if
(
track
->
enc
->
codec_id
==
AV_CODEC_ID_DNXHD
)
mov_write_avid_tag
(
pb
,
track
);
else
if
(
track
->
enc
->
codec_id
==
AV_CODEC_ID_HEVC
)
mov_write_hvcc_tag
(
pb
,
track
);
else
if
(
track
->
enc
->
codec_id
==
AV_CODEC_ID_H264
)
{
mov_write_avcc_tag
(
pb
,
track
);
if
(
track
->
mode
==
MODE_IPOD
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录