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
8fd2bdd0
Commit
8fd2bdd0
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/hlsplaylist: Audio rendition's name and defaultness made configurable
Reviewed-by:
Steven Liu
<
lq@chinaffmpeg.org
>
parent
9e25fe42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
hlsenc.c
libavformat/hlsenc.c
+1
-1
hlsplaylist.c
libavformat/hlsplaylist.c
+3
-2
hlsplaylist.h
libavformat/hlsplaylist.h
+2
-1
No files found.
libavformat/hlsenc.c
View file @
8fd2bdd0
...
@@ -1169,7 +1169,7 @@ static int create_master_playlist(AVFormatContext *s,
...
@@ -1169,7 +1169,7 @@ static int create_master_playlist(AVFormatContext *s,
goto
fail
;
goto
fail
;
}
}
ff_hls_write_audio_rendition
(
hls
->
m3u8_out
,
vs
->
agroup
,
m3u8_rel_name
);
ff_hls_write_audio_rendition
(
hls
->
m3u8_out
,
vs
->
agroup
,
m3u8_rel_name
,
0
,
1
);
av_freep
(
&
m3u8_rel_name
);
av_freep
(
&
m3u8_rel_name
);
}
}
...
...
libavformat/hlsplaylist.c
View file @
8fd2bdd0
...
@@ -36,12 +36,13 @@ void ff_hls_write_playlist_version(AVIOContext *out, int version) {
...
@@ -36,12 +36,13 @@ void ff_hls_write_playlist_version(AVIOContext *out, int version) {
}
}
void
ff_hls_write_audio_rendition
(
AVIOContext
*
out
,
char
*
agroup
,
void
ff_hls_write_audio_rendition
(
AVIOContext
*
out
,
char
*
agroup
,
char
*
filename
)
{
char
*
filename
,
int
name_id
,
int
is_default
)
{
if
(
!
out
||
!
agroup
||
!
filename
)
if
(
!
out
||
!
agroup
||
!
filename
)
return
;
return
;
avio_printf
(
out
,
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=
\"
group_%s
\"
"
,
agroup
);
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
);
avio_printf
(
out
,
",NAME=
\"
audio_%d
\"
,DEFAULT=%s,URI=
\"
%s
\"\n
"
,
name_id
,
is_default
?
"YES"
:
"NO"
,
filename
);
}
}
void
ff_hls_write_stream_info
(
AVStream
*
st
,
AVIOContext
*
out
,
void
ff_hls_write_stream_info
(
AVStream
*
st
,
AVIOContext
*
out
,
...
...
libavformat/hlsplaylist.h
View file @
8fd2bdd0
...
@@ -37,7 +37,8 @@ typedef enum {
...
@@ -37,7 +37,8 @@ typedef enum {
}
PlaylistType
;
}
PlaylistType
;
void
ff_hls_write_playlist_version
(
AVIOContext
*
out
,
int
version
);
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_audio_rendition
(
AVIOContext
*
out
,
char
*
agroup
,
char
*
filename
,
int
name_id
,
int
is_default
);
void
ff_hls_write_stream_info
(
AVStream
*
st
,
AVIOContext
*
out
,
void
ff_hls_write_stream_info
(
AVStream
*
st
,
AVIOContext
*
out
,
int
bandwidth
,
char
*
filename
,
char
*
agroup
);
int
bandwidth
,
char
*
filename
,
char
*
agroup
);
void
ff_hls_write_playlist_header
(
AVIOContext
*
out
,
int
version
,
int
allowcache
,
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