Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
B1ack1e
FFmpeg
提交
19d7667a
F
FFmpeg
项目概览
B1ack1e
/
FFmpeg
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FFmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
19d7667a
编写于
4月 09, 2016
作者:
M
Mark Thompson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vaapi_encode: Add support for writing arbitrary additional packed headers
上级
081961f8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
0 deletion
+25
-0
libavcodec/vaapi_encode.c
libavcodec/vaapi_encode.c
+21
-0
libavcodec/vaapi_encode.h
libavcodec/vaapi_encode.h
+4
-0
未找到文件。
libavcodec/vaapi_encode.c
浏览文件 @
19d7667a
...
...
@@ -293,6 +293,27 @@ static int vaapi_encode_issue(AVCodecContext *avctx,
}
}
if
(
ctx
->
codec
->
write_extra_header
)
{
for
(
i
=
0
;;
i
++
)
{
int
type
;
bit_len
=
8
*
sizeof
(
data
);
err
=
ctx
->
codec
->
write_extra_header
(
avctx
,
pic
,
i
,
&
type
,
data
,
&
bit_len
);
if
(
err
==
AVERROR_EOF
)
break
;
if
(
err
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to write extra "
"header %d: %d.
\n
"
,
i
,
err
);
goto
fail
;
}
err
=
vaapi_encode_make_packed_header
(
avctx
,
pic
,
type
,
data
,
bit_len
);
if
(
err
<
0
)
goto
fail
;
}
}
av_assert0
(
pic
->
nb_slices
<=
MAX_PICTURE_SLICES
);
for
(
i
=
0
;
i
<
pic
->
nb_slices
;
i
++
)
{
slice
=
av_mallocz
(
sizeof
(
*
slice
));
...
...
libavcodec/vaapi_encode.h
浏览文件 @
19d7667a
...
...
@@ -215,6 +215,10 @@ typedef struct VAAPIEncodeType {
VAAPIEncodePicture
*
pic
,
int
index
,
int
*
type
,
char
*
data
,
size_t
*
data_len
);
int
(
*
write_extra_header
)(
AVCodecContext
*
avctx
,
VAAPIEncodePicture
*
pic
,
int
index
,
int
*
type
,
char
*
data
,
size_t
*
data_len
);
}
VAAPIEncodeType
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录