Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
19d7667a
Commit
19d7667a
authored
Apr 09, 2016
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi_encode: Add support for writing arbitrary additional packed headers
parent
081961f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
vaapi_encode.c
libavcodec/vaapi_encode.c
+21
-0
vaapi_encode.h
libavcodec/vaapi_encode.h
+4
-0
No files found.
libavcodec/vaapi_encode.c
View file @
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
View file @
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment