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"
Include dependency graph for hls.c:

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
 

Typedefs

typedef struct HLSContext HLSContext
 

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().

Typedef Documentation

typedef struct HLSContext HLSContext

Enumeration Type Documentation

enum KeyType
Enumerator
KEY_NONE 
KEY_AES_128 

Definition at line 53 of file hls.c.

Function Documentation

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 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 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 int hls_close ( AVFormatContext s)
static

Definition at line 737 of file hls.c.

static int hls_probe ( AVProbeData p)
static

Definition at line 806 of file hls.c.

static int hls_read_header ( AVFormatContext s)
static

Definition at line 476 of file hls.c.

static int hls_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 654 of file hls.c.

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

Definition at line 745 of file hls.c.

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

Definition at line 159 of file hls.c.

Referenced by parse_playlist().

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

Definition at line 340 of file hls.c.

Referenced by read_data().

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 read_chomp_line ( AVIOContext s,
char *  buf,
int  maxlen 
)
static

Definition at line 110 of file hls.c.

Referenced by parse_playlist().

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

Definition at line 403 of file hls.c.

Referenced by hls_read_header().

static int recheck_discard_flags ( AVFormatContext s,
int  first 
)
static

Definition at line 619 of file hls.c.

Referenced by hls_read_packet().

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().

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),
}
struct HLSContext HLSContext
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int read_probe(AVProbeData *pd)
static int hls_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: hls.c:654
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:517
static int hls_read_header(AVFormatContext *s)
Definition: hls.c:476
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
static int hls_probe(AVProbeData *p)
Definition: hls.c:806
static int hls_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: hls.c:745
static int hls_close(AVFormatContext *s)
Definition: hls.c:737

Definition at line 819 of file hls.c.