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
025fcee6
Commit
025fcee6
authored
Jun 21, 2019
by
Derek Buitenhuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlsenc: Add option to set custom HTTP headers
Signed-off-by:
Derek Buitenhuis
<
derek.buitenhuis@gmail.com
>
parent
d33414d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
muxers.texi
doc/muxers.texi
+3
-0
hlsenc.c
libavformat/hlsenc.c
+4
-0
No files found.
doc/muxers.texi
View file @
025fcee6
...
...
@@ -1089,6 +1089,9 @@ Set timeout for socket I/O operations. Applicable only for HTTP output.
@item -ignore_io_errors
Ignore IO errors during open, write and delete. Useful for long-duration runs with network output.
@item headers
Set custom HTTP headers, can override built in default headers. Applicable only for HTTP output.
@end table
@anchor{ico}
...
...
libavformat/hlsenc.c
View file @
025fcee6
...
...
@@ -237,6 +237,7 @@ typedef struct HLSContext {
AVIOContext
*
sub_m3u8_out
;
int64_t
timeout
;
int
ignore_io_errors
;
char
*
headers
;
int
has_default_key
;
/* has DEFAULT field of var_stream_map */
int
has_video_m3u8
;
/* has video stream m3u8 list */
}
HLSContext
;
...
...
@@ -294,6 +295,8 @@ static void set_http_options(AVFormatContext *s, AVDictionary **options, HLSCont
av_dict_set_int
(
options
,
"multiple_requests"
,
1
,
0
);
if
(
c
->
timeout
>=
0
)
av_dict_set_int
(
options
,
"timeout"
,
c
->
timeout
,
0
);
if
(
c
->
headers
)
av_dict_set
(
options
,
"headers"
,
c
->
headers
,
0
);
}
static
void
write_codec_attr
(
AVStream
*
st
,
VariantStream
*
vs
)
{
...
...
@@ -3029,6 +3032,7 @@ static const AVOption options[] = {
{
"http_persistent"
,
"Use persistent HTTP connections"
,
OFFSET
(
http_persistent
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
E
},
{
"timeout"
,
"set timeout for socket I/O operations"
,
OFFSET
(
timeout
),
AV_OPT_TYPE_DURATION
,
{
.
i64
=
-
1
},
-
1
,
INT_MAX
,
.
flags
=
E
},
{
"ignore_io_errors"
,
"Ignore IO errors for stable long-duration runs with network output"
,
OFFSET
(
ignore_io_errors
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
E
},
{
"headers"
,
"set custom HTTP headers, can override built in default headers"
,
OFFSET
(
headers
),
AV_OPT_TYPE_STRING
,
{
.
str
=
NULL
},
0
,
0
,
E
},
{
NULL
},
};
...
...
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