diff options
Diffstat (limited to 'libavformat/hlsplaylist.c')
-rw-r--r-- | libavformat/hlsplaylist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/hlsplaylist.c b/libavformat/hlsplaylist.c index 42f059a..a065eda 100644 --- a/libavformat/hlsplaylist.c +++ b/libavformat/hlsplaylist.c @@ -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) |