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
9e25fe42
Commit
9e25fe42
authored
Dec 29, 2017
by
Karthick Jeyapal
Committed by
Steven Liu
Dec 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hlsenc: Modularized audio rendition playlist write to allow reuse
Reviewed-by:
Steven Liu
<
lq@chinaffmpeg.org
>
parent
d01eeef4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
hlsenc.c
libavformat/hlsenc.c
+2
-4
hlsplaylist.c
libavformat/hlsplaylist.c
+9
-0
hlsplaylist.h
libavformat/hlsplaylist.h
+1
-0
No files found.
libavformat/hlsenc.c
View file @
9e25fe42
...
...
@@ -1169,10 +1169,8 @@ static int create_master_playlist(AVFormatContext *s,
goto
fail
;
}
avio_printf
(
hls
->
m3u8_out
,
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=
\"
group_%s
\"
"
,
vs
->
agroup
);
avio_printf
(
hls
->
m3u8_out
,
",NAME=
\"
audio_0
\"
,DEFAULT=YES,URI=
\"
%s
\"\n
"
,
m3u8_rel_name
);
ff_hls_write_audio_rendition
(
hls
->
m3u8_out
,
vs
->
agroup
,
m3u8_rel_name
);
av_freep
(
&
m3u8_rel_name
);
}
...
...
libavformat/hlsplaylist.c
View file @
9e25fe42
...
...
@@ -35,6 +35,15 @@ void ff_hls_write_playlist_version(AVIOContext *out, int version) {
avio_printf
(
out
,
"#EXT-X-VERSION:%d
\n
"
,
version
);
}
void
ff_hls_write_audio_rendition
(
AVIOContext
*
out
,
char
*
agroup
,
char
*
filename
)
{
if
(
!
out
||
!
agroup
||
!
filename
)
return
;
avio_printf
(
out
,
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=
\"
group_%s
\"
"
,
agroup
);
avio_printf
(
out
,
",NAME=
\"
audio_0
\"
,DEFAULT=YES,URI=
\"
%s
\"\n
"
,
filename
);
}
void
ff_hls_write_stream_info
(
AVStream
*
st
,
AVIOContext
*
out
,
int
bandwidth
,
char
*
filename
,
char
*
agroup
)
{
if
(
!
out
||
!
filename
)
...
...
libavformat/hlsplaylist.h
View file @
9e25fe42
...
...
@@ -37,6 +37,7 @@ typedef enum {
}
PlaylistType
;
void
ff_hls_write_playlist_version
(
AVIOContext
*
out
,
int
version
);
void
ff_hls_write_audio_rendition
(
AVIOContext
*
out
,
char
*
agroup
,
char
*
filename
);
void
ff_hls_write_stream_info
(
AVStream
*
st
,
AVIOContext
*
out
,
int
bandwidth
,
char
*
filename
,
char
*
agroup
);
void
ff_hls_write_playlist_header
(
AVIOContext
*
out
,
int
version
,
int
allowcache
,
...
...
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