1 /* 2 * Apple HTTP Live Streaming segmenter 3 * Copyright (c) 2012, Luca Barbato 4 * Copyright (c) 2017 Akamai Technologies, Inc. 5 * 6 * This file is part of FFmpeg. 7 * 8 * FFmpeg is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * FFmpeg is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with FFmpeg; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 */ 22 23 #ifndef AVFORMAT_HLSPLAYLIST_H 24 #define AVFORMAT_HLSPLAYLIST_H 25 26 #include <stdint.h> 27 28 #include "avformat.h" 29 #include "avio.h" 30 31 typedef enum { 32 PLAYLIST_TYPE_NONE, 33 PLAYLIST_TYPE_EVENT, 34 PLAYLIST_TYPE_VOD, 35 PLAYLIST_TYPE_NB, 36 } PlaylistType; 37 38 void ff_hls_write_playlist_version(AVIOContext *out, int version); 39 void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, 40 const char *filename, const char *language, 41 int name_id, int is_default); 42 void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, 43 const char *filename, const char *language, 44 int name_id, int is_default); 45 void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, int bandwidth, 46 const char *filename, const char *agroup, 47 const char *codecs, const char *ccgroup, 48 const char *sgroup); 49 void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache, 50 int target_duration, int64_t sequence, 51 uint32_t playlist_type, int iframe_mode); 52 void ff_hls_write_init_file(AVIOContext *out, const char *filename, 53 int byterange_mode, int64_t size, int64_t pos); 54 int ff_hls_write_file_entry(AVIOContext *out, int insert_discont, 55 int byterange_mode, double duration, 56 int round_duration, int64_t size, 57 int64_t pos /* Used only if HLS_SINGLE_FILE flag is set */, 58 const char *baseurl /* Ignored if NULL */, 59 const char *filename, double *prog_date_time, 60 int64_t video_keyframe_size, int64_t video_keyframe_pos, 61 int iframe_mode); 62 void ff_hls_write_end_list (AVIOContext *out); 63 64 #endif /* AVFORMAT_HLSPLAYLIST_H_ */ 65