FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
hls.c File Reference

Apple HTTP Live Streaming demuxer http://tools.ietf.org/html/draft-pantos-http-live-streaming. More...

#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "libavutil/time.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
#include "url.h"

Go to the source code of this file.

Data Structures

struct  segment
 
struct  variant
 
struct  HLSContext
 
struct  variant_info
 
struct  key_info
 

Macros

#define INITIAL_BUFFER_SIZE   32768
 

Enumerations

enum  KeyType { KEY_NONE, KEY_AES_128 }
 

Functions

static int read_chomp_line (AVIOContext *s, char *buf, int maxlen)
 
static void free_segment_list (struct variant *var)
 
static void free_variant_list (HLSContext *c)
 
static void reset_packet (AVPacket *pkt)
 
static struct variantnew_variant (HLSContext *c, int bandwidth, const char *url, const char *base)
 
static void handle_variant_args (struct variant_info *info, const char *key, int key_len, char **dest, int *dest_len)
 
static void handle_key_args (struct key_info *info, const char *key, int key_len, char **dest, int *dest_len)
 
static int parse_playlist (HLSContext *c, const char *url, struct variant *var, AVIOContext *in)
 
static int open_input (HLSContext *c, struct variant *var)
 
static int read_data (void *opaque, uint8_t *buf, int buf_size)
 
static int hls_read_header (AVFormatContext *s)
 
static int recheck_discard_flags (AVFormatContext *s, int first)
 
static int hls_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int hls_close (AVFormatContext *s)
 
static int hls_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 
static int hls_probe (AVProbeData *p)
 

Variables

AVInputFormat ff_hls_demuxer
 

Detailed Description

Apple HTTP Live Streaming demuxer http://tools.ietf.org/html/draft-pantos-http-live-streaming.

Definition in file hls.c.

Macro Definition Documentation

#define INITIAL_BUFFER_SIZE   32768

Definition at line 39 of file hls.c.

Referenced by hls_read_header().

Enumeration Type Documentation

enum KeyType
Enumerator:
KEY_NONE 
KEY_AES_128 

Definition at line 53 of file hls.c.

Function Documentation

static int read_chomp_line ( AVIOContext s,
char *  buf,
int  maxlen 
)
static

Definition at line 110 of file hls.c.

Referenced by parse_playlist().

static void free_segment_list ( struct variant var)
static

Definition at line 118 of file hls.c.

Referenced by free_variant_list(), and parse_playlist().

static void free_variant_list ( HLSContext c)
static

Definition at line 127 of file hls.c.

Referenced by hls_close(), and hls_read_header().

static void reset_packet ( AVPacket pkt)
static

Definition at line 153 of file hls.c.

Referenced by hls_read_packet(), hls_read_seek(), and new_variant().

static struct variant* new_variant ( HLSContext c,
int  bandwidth,
const char *  url,
const char *  base 
)
staticread

Definition at line 159 of file hls.c.

Referenced by parse_playlist().

static void handle_variant_args ( struct variant_info info,
const char *  key,
int  key_len,
char **  dest,
int *  dest_len 
)
static

Definition at line 176 of file hls.c.

Referenced by parse_playlist().

static void handle_key_args ( struct key_info info,
const char *  key,
int  key_len,
char **  dest,
int *  dest_len 
)
static

Definition at line 191 of file hls.c.

Referenced by parse_playlist().

static int parse_playlist ( HLSContext c,
const char *  url,
struct variant var,
AVIOContext in 
)
static

Definition at line 206 of file hls.c.

Referenced by hls_read_header(), and read_data().

static int open_input ( HLSContext c,
struct variant var 
)
static

Definition at line 341 of file hls.c.

Referenced by read_data().

static int read_data ( void opaque,
uint8_t buf,
int  buf_size 
)
static

Definition at line 404 of file hls.c.

Referenced by hls_read_header().

static int hls_read_header ( AVFormatContext s)
static

Definition at line 477 of file hls.c.

static int recheck_discard_flags ( AVFormatContext s,
int  first 
)
static

Definition at line 620 of file hls.c.

Referenced by hls_read_packet().

static int hls_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 655 of file hls.c.

static int hls_close ( AVFormatContext s)
static

Definition at line 751 of file hls.c.

static int hls_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 759 of file hls.c.

static int hls_probe ( AVProbeData p)
static

Definition at line 817 of file hls.c.

Variable Documentation

AVInputFormat ff_hls_demuxer
Initial value:
= {
.name = "hls,applehttp",
.long_name = NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming"),
.priv_data_size = sizeof(HLSContext),
}

Definition at line 830 of file hls.c.