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  playlist
 
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 playlist *pls)
 
static void free_playlist_list (HLSContext *c)
 
static void free_variant_list (HLSContext *c)
 
static void reset_packet (AVPacket *pkt)
 
static struct playlistnew_playlist (HLSContext *c, const char *url, const char *base)
 
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 playlist *pls, AVIOContext *in)
 
static int open_input (HLSContext *c, struct playlist *pls)
 
static int read_data (void *opaque, uint8_t *buf, int buf_size)
 
static int playlist_in_multiple_variants (HLSContext *c, struct playlist *pls)
 
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 119 of file hls.c.

Referenced by parse_playlist().

static void free_segment_list ( struct playlist pls)
static

Definition at line 127 of file hls.c.

Referenced by free_playlist_list(), and parse_playlist().

static void free_playlist_list ( HLSContext c)
static

Definition at line 136 of file hls.c.

Referenced by hls_close(), and hls_read_header().

static void free_variant_list ( HLSContext c)
static

Definition at line 158 of file hls.c.

Referenced by hls_close(), and hls_read_header().

static void reset_packet ( AVPacket pkt)
static

Definition at line 174 of file hls.c.

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

static struct playlist* new_playlist ( HLSContext c,
const char *  url,
const char *  base 
)
staticread

Definition at line 180 of file hls.c.

Referenced by new_variant().

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

Definition at line 192 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 216 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 231 of file hls.c.

Referenced by parse_playlist().

static int parse_playlist ( HLSContext c,
const char *  url,
struct playlist pls,
AVIOContext in 
)
static

Definition at line 246 of file hls.c.

Referenced by hls_read_header(), and read_data().

static int open_input ( HLSContext c,
struct playlist pls 
)
static

Definition at line 387 of file hls.c.

Referenced by read_data().

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

Definition at line 454 of file hls.c.

Referenced by hls_read_header().

static int playlist_in_multiple_variants ( HLSContext c,
struct playlist pls 
)
static

Definition at line 527 of file hls.c.

Referenced by hls_read_header().

static int hls_read_header ( AVFormatContext s)
static

Definition at line 546 of file hls.c.

static int recheck_discard_flags ( AVFormatContext s,
int  first 
)
static

Definition at line 715 of file hls.c.

Referenced by hls_read_packet().

static int hls_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 750 of file hls.c.

static int hls_close ( AVFormatContext s)
static

Definition at line 847 of file hls.c.

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

Definition at line 856 of file hls.c.

static int hls_probe ( AVProbeData p)
static

Definition at line 914 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 927 of file hls.c.