summaryrefslogtreecommitdiff
path: root/libavformat/hlsplaylist.h
diff options
context:
space:
mode:
authorKarthick J <kjeyapal@akamai.com>2017-11-29 19:44:15 +0800
committerSteven Liu <lq@chinaffmpeg.org>2017-11-29 19:44:15 +0800
commitda49cdf6401ea3caa616c226f24dfb407633acd0 (patch)
treec4838536c106475d00b264834d77113e636d49ee /libavformat/hlsplaylist.h
parenteb69e7bed80a1c8afee9acf9f8daff6be5e9ea62 (diff)
avformat/hlsenc: Modularized playlist creation to allow reuse
Diffstat (limited to 'libavformat/hlsplaylist.h')
-rw-r--r--libavformat/hlsplaylist.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/libavformat/hlsplaylist.h b/libavformat/hlsplaylist.h
new file mode 100644
index 0000000000..fd36c7e6c2
--- /dev/null
+++ b/libavformat/hlsplaylist.h
@@ -0,0 +1,51 @@
+/*
+ * Apple HTTP Live Streaming segmenter
+ * Copyright (c) 2012, Luca Barbato
+ * Copyright (c) 2017 Akamai Technologies, Inc.
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVFORMAT_HLSPLAYLIST_H_
+#define AVFORMAT_HLSPLAYLIST_H_
+
+#include "libavutil/common.h"
+
+typedef enum {
+ PLAYLIST_TYPE_NONE,
+ PLAYLIST_TYPE_EVENT,
+ PLAYLIST_TYPE_VOD,
+ PLAYLIST_TYPE_NB,
+} PlaylistType;
+
+void ff_hls_write_playlist_version(AVIOContext *out, int version);
+void ff_hls_write_stream_info(AVStream *st, AVIOContext *out,
+ int bandwidth, char *filename);
+void ff_hls_write_playlist_header(AVIOContext *out, int version, int allowcache,
+ int target_duration, int64_t sequence,
+ uint32_t playlist_type);
+void ff_hls_write_init_file(AVIOContext *out, char *filename,
+ int byterange_mode, int64_t size, int64_t pos);
+void ff_hls_write_file_entry(AVIOContext *out, int insert_discont,
+ int byterange_mode,
+ double duration, int round_duration,
+ int64_t size, int64_t pos, //Used only if HLS_SINGLE_FILE flag is set
+ char *baseurl, //Ignored if NULL
+ char *filename, double *prog_date_time);
+void ff_hls_write_end_list (AVIOContext *out);
+
+#endif /* AVFORMAT_HLSPLAYLIST_H_ */