FFmpeg
hlsplaylist.h
Go to the documentation of this file.
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 "libavutil/common.h"
29 #include "avformat.h"
30 #include "avio.h"
31 
32 typedef enum {
37 } PlaylistType;
38 
40 void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup,
41  const char *filename, const char *language,
42  int name_id, int is_default);
43 void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup,
44  const char *filename, const char *language,
45  int name_id, int is_default);
46 void ff_hls_write_stream_info(AVStream *st, AVIOContext *out, int bandwidth,
47  const char *filename, const char *agroup,
48  const char *codecs, const char *ccgroup,
49  const char *sgroup);
50 void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache,
51  int target_duration, int64_t sequence,
52  uint32_t playlist_type, int iframe_mode);
53 void ff_hls_write_init_file(AVIOContext *out, const char *filename,
54  int byterange_mode, int64_t size, int64_t pos);
55 int ff_hls_write_file_entry(AVIOContext *out, int insert_discont,
56  int byterange_mode, double duration,
57  int round_duration, int64_t size,
58  int64_t pos /* Used only if HLS_SINGLE_FILE flag is set */,
59  const char *baseurl /* Ignored if NULL */,
60  const char *filename, double *prog_date_time,
61  int64_t video_keyframe_size, int64_t video_keyframe_pos,
62  int iframe_mode);
64 
65 #endif /* AVFORMAT_HLSPLAYLIST_H_ */
out
FILE * out
Definition: movenc.c:54
ff_hls_write_playlist_version
void ff_hls_write_playlist_version(AVIOContext *out, int version)
Definition: hlsplaylist.c:31
PLAYLIST_TYPE_VOD
@ PLAYLIST_TYPE_VOD
Definition: hlsplaylist.h:35
codecs
static struct codec_string codecs[]
ff_hls_write_end_list
void ff_hls_write_end_list(AVIOContext *out)
Definition: hlsplaylist.c:189
PLAYLIST_TYPE_EVENT
@ PLAYLIST_TYPE_EVENT
Definition: hlsplaylist.h:34
PLAYLIST_TYPE_NONE
@ PLAYLIST_TYPE_NONE
Definition: hlsplaylist.h:33
ff_hls_write_init_file
void ff_hls_write_init_file(AVIOContext *out, const char *filename, int byterange_mode, int64_t size, int64_t pos)
Definition: hlsplaylist.c:122
duration
int64_t duration
Definition: movenc.c:64
PlaylistType
PlaylistType
Definition: hlsplaylist.h:32
PLAYLIST_TYPE_NB
@ PLAYLIST_TYPE_NB
Definition: hlsplaylist.h:36
ff_hls_write_file_entry
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)
Definition: hlsplaylist.c:132
ff_hls_write_stream_info
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)
Definition: hlsplaylist.c:69
AVIOContext
Bytestream IO Context.
Definition: avio.h:161
ff_hls_write_subtitle_rendition
void ff_hls_write_subtitle_rendition(AVIOContext *out, const char *sgroup, const char *filename, const char *language, int name_id, int is_default)
Definition: hlsplaylist.c:54
size
int size
Definition: twinvq_data.h:10344
avio.h
version
version
Definition: libkvazaar.c:326
common.h
language
Undefined Behavior In the C language
Definition: undefined.txt:3
AVStream
Stream structure.
Definition: avformat.h:873
pos
unsigned int pos
Definition: spdifenc.c:412
avformat.h
ff_hls_write_playlist_header
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)
Definition: hlsplaylist.c:98
ff_hls_write_audio_rendition
void ff_hls_write_audio_rendition(AVIOContext *out, const char *agroup, const char *filename, const char *language, int name_id, int is_default)
Definition: hlsplaylist.c:39