Go to the documentation of this file.
   40                                   const char *filename, 
const char *
language,
 
   41                                   int name_id, 
int is_default)
 
   43     if (!
out || !agroup || !filename)
 
   46     avio_printf(
out, 
"#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID=\"group_%s\"", agroup);
 
   47     avio_printf(
out, 
",NAME=\"audio_%d\",DEFAULT=%s,", name_id, is_default ? 
"YES" : 
"NO");
 
   55                                      const char *filename, 
const char *
language,
 
   56                                      int name_id, 
int is_default)
 
   58     if (!
out || !filename)
 
   61     avio_printf(
out, 
"#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"%s\"", sgroup);
 
   62     avio_printf(
out, 
",NAME=\"subtitle_%d\",DEFAULT=%s,", name_id, is_default ? 
"YES" : 
"NO");
 
   70                               const char *filename, 
const char *agroup,
 
   71                               const char *
codecs, 
const char *ccgroup,
 
   74     if (!
out || !filename)
 
   79                 "Bandwidth info not available, set audio and video bitrates\n");
 
   89     if (agroup && agroup[0])
 
   91     if (ccgroup && ccgroup[0])
 
   93     if (sgroup && sgroup[0])
 
   99                                   int target_duration, int64_t sequence,
 
  100                                   uint32_t playlist_type, 
int iframe_mode)
 
  105     if (allowcache == 0 || allowcache == 1) {
 
  106         avio_printf(
out, 
"#EXT-X-ALLOW-CACHE:%s\n", allowcache == 0 ? 
"NO" : 
"YES");
 
  123                             int byterange_mode, int64_t 
size, int64_t 
pos)
 
  126     if (byterange_mode) {
 
  133                             int byterange_mode, 
double duration,
 
  134                             int round_duration, int64_t 
size,
 
  136                             const char *baseurl ,
 
  137                             const char *filename, 
double *prog_date_time,
 
  138                             int64_t video_keyframe_size, int64_t video_keyframe_pos,
 
  141     if (!
out || !filename)
 
  144     if (insert_discont) {
 
  152         avio_printf(
out, 
"#EXT-X-BYTERANGE:%"PRId64
"@%"PRId64
"\n", iframe_mode ? video_keyframe_size : 
size,
 
  153                     iframe_mode ? video_keyframe_pos : 
pos);
 
  155     if (prog_date_time) {
 
  156         time_t tt, wrongsecs;
 
  158         struct tm *tm, tmpbuf;
 
  159         char buf0[128], buf1[128];
 
  160         tt = (int64_t)*prog_date_time;
 
  161         milli = 
av_clip(
lrint(1000*(*prog_date_time - tt)), 0, 999);
 
  163         if (!strftime(buf0, 
sizeof(buf0), 
"%Y-%m-%dT%H:%M:%S", tm)) {
 
  167         if (!strftime(buf1, 
sizeof(buf1), 
"%z", tm) || buf1[1]<
'0' ||buf1[1]>
'2') {
 
  168             int tz_min, dst = tm->tm_isdst;
 
  171             wrongsecs = mktime(tm);
 
  172             tz_min = (
FFABS(wrongsecs - tt) + 30) / 60;
 
  175                      wrongsecs <= tt ? 
'+' : 
'-',
 
  179         avio_printf(
out, 
"#EXT-X-PROGRAM-DATE-TIME:%s.%03d%s\n", buf0, milli, buf1);
 
  
#define AV_LOG_WARNING
Something somehow does not look correct.
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
 
void ff_hls_write_end_list(AVIOContext *out)
 
static struct codec_string codecs[]
 
#define AV_LOG_VERBOSE
Detailed information.
 
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
 
void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache, int target_duration, int64_t sequence, uint32_t playlist_type, int iframe_mode)
 
void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, const char *filename, const char *language, int name_id, int is_default)
 
void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, const char *filename, const char *language, int name_id, int is_default)
 
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
 
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
 
AVCodecParameters * codecpar
Codec parameters associated with this stream.
 
void ff_hls_write_playlist_version(AVIOContext *out, int version)
 
void ff_hls_write_init_file(AVIOContext *out, const char *filename, int byterange_mode, int64_t size, int64_t pos)
 
Undefined Behavior In the C language
 
int ff_hls_write_file_entry(AVIOContext *out, int insert_discont, int byterange_mode, double duration, int round_duration, int64_t size, int64_t pos, const char *baseurl, const char *filename, double *prog_date_time, int64_t video_keyframe_size, int64_t video_keyframe_pos, int iframe_mode)
 
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Writes a formatted string to the context.
 
void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, int bandwidth, const char *filename, const char *agroup, const char *codecs, const char *ccgroup, const char *sgroup)