FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
hlsenc.c File Reference
#include <float.h>
#include <stdint.h>
#include "libavutil/mathematics.h"
#include "libavutil/parseutils.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/log.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ListEntry
 
struct  HLSContext
 

Macros

#define OFFSET(x)   offsetof(HLSContext, x)
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static int hls_mux_init (AVFormatContext *s)
 
static int append_entry (HLSContext *hls, double duration)
 
static void free_entries (HLSContext *hls)
 
static int hls_window (AVFormatContext *s, int last)
 
static int hls_start (AVFormatContext *s)
 
static int hls_write_header (AVFormatContext *s)
 
static int hls_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int hls_write_trailer (struct AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass hls_class
 
AVOutputFormat ff_hls_muxer
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(HLSContext, x)

Definition at line 327 of file hlsenc.c.

Definition at line 328 of file hlsenc.c.

Function Documentation

static int hls_mux_init ( AVFormatContext s)
static

Definition at line 63 of file hlsenc.c.

Referenced by hls_write_header().

static int append_entry ( HLSContext hls,
double  duration 
)
static

Definition at line 88 of file hlsenc.c.

Referenced by hls_write_packet(), and hls_write_trailer().

static void free_entries ( HLSContext hls)
static

Definition at line 119 of file hlsenc.c.

Referenced by hls_write_trailer().

static int hls_window ( AVFormatContext s,
int  last 
)
static

Definition at line 130 of file hlsenc.c.

Referenced by hls_write_packet(), and hls_write_trailer().

static int hls_start ( AVFormatContext s)
static

Definition at line 170 of file hlsenc.c.

Referenced by hls_write_header(), and hls_write_packet().

static int hls_write_header ( AVFormatContext s)
static

Definition at line 193 of file hlsenc.c.

static int hls_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 256 of file hlsenc.c.

static int hls_write_trailer ( struct AVFormatContext s)
static

Definition at line 310 of file hlsenc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"start_number", "set first number in the sequence", OFFSET(start_sequence),AV_OPT_TYPE_INT64, {.i64 = 0}, 0, INT64_MAX, E},
{"hls_time", "set segment length in seconds", OFFSET(time), AV_OPT_TYPE_FLOAT, {.dbl = 2}, 0, FLT_MAX, E},
{"hls_list_size", "set maximum number of playlist entries", OFFSET(size), AV_OPT_TYPE_INT, {.i64 = 5}, 0, INT_MAX, E},
{"hls_wrap", "set number after which the index wraps", OFFSET(wrap), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, E},
{"hls_base_url", "url to prepend to each playlist entry", OFFSET(baseurl), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E},
{ NULL },
}

Definition at line 329 of file hlsenc.c.

const AVClass hls_class
static
Initial value:
= {
.class_name = "hls muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 338 of file hlsenc.c.

AVOutputFormat ff_hls_muxer
Initial value:
= {
.name = "hls",
.long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"),
.extensions = "m3u8",
.priv_data_size = sizeof(HLSContext),
.audio_codec = AV_CODEC_ID_AAC,
.video_codec = AV_CODEC_ID_H264,
.priv_class = &hls_class,
}

Definition at line 346 of file hlsenc.c.