xine-lib 1.2.12
Data Structures | Macros | Functions | Variables
input_hls.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/input_plugin.h>
#include <xine/mfrag.h>
#include "http_helper.h"
#include "input_helper.h"
#include "group_network.h"
#include "multirate_pref.c"

Data Structures

struct  hls_input_class_t
 
struct  hls_input_plugin_t
 

Macros

#define LOG_MODULE   "input_hls"
 
#define LOG_VERBOSE
 
#define HLS_MAX_MRL   4096
 

Functions

static int xine_gettime (struct timespec *ts)
 
static int hls_get_duration (hls_input_plugin_t *this)
 
static off_t hls_get_size (hls_input_plugin_t *this)
 
static uint32_t hls_frag_start (hls_input_plugin_t *this)
 
static void hls_frag_end (hls_input_plugin_t *this)
 
static int hls_bump_find (hls_input_plugin_t *this, const char *item1, const char *seq)
 
static int hls_bump_guess (hls_input_plugin_t *this, const char *item1, const char *item2)
 
static void hls_bump_inc (hls_input_plugin_t *this)
 
static int hls_input_switch_mrl (hls_input_plugin_t *this)
 
static int hls_input_open_bump (hls_input_plugin_t *this)
 
static int hls_input_open_item (hls_input_plugin_t *this, uint32_t n)
 
static int hls_input_get_mrl_ext (const char *mrl, const char **ext)
 
static int hls_input_is_hls (const char *mrl)
 
static void hls_skip_spc (char **s)
 
static void hls_skip_newline_spc (char **s)
 
static void hls_skip_line (char **s)
 
static uint32_t str2uint32 (char **s)
 
static uint64_t str2uint64 (char **s)
 
static uint32_t str2usec (char **s)
 
static int hls_input_load_list (hls_input_plugin_t *this)
 
static uint32_t hls_input_get_capabilities (input_plugin_t *this_gen)
 
static void hls_live_start (hls_input_plugin_t *this)
 
static int hls_live_wait (hls_input_plugin_t *this)
 
static off_t hls_input_read (input_plugin_t *this_gen, void *buf, off_t len)
 
static buf_element_thls_input_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t todo)
 
static off_t hls_input_time_seek (input_plugin_t *this_gen, int time_offs, int origin)
 
static off_t hls_input_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t hls_input_get_current_pos (input_plugin_t *this_gen)
 
static off_t hls_input_get_length (input_plugin_t *this_gen)
 
static const char * hls_input_get_mrl (input_plugin_t *this_gen)
 
static void hls_input_dispose (input_plugin_t *this_gen)
 
static int hls_input_open (input_plugin_t *this_gen)
 
static int hls_input_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static input_plugin_thls_input_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
 
static void hls_input_class_dispose (input_class_t *this_gen)
 
void * input_hls_init_class (xine_t *xine, const void *data)
 

Variables

static const uint8_t hls_tab_char [256]
 

Macro Definition Documentation

◆ HLS_MAX_MRL

#define HLS_MAX_MRL   4096

◆ LOG_MODULE

#define LOG_MODULE   "input_hls"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Function Documentation

◆ hls_bump_find()

static int hls_bump_find ( hls_input_plugin_t this,
const char *  item1,
const char *  seq 
)
static

References v, and z.

Referenced by hls_input_open().

◆ hls_bump_guess()

static int hls_bump_guess ( hls_input_plugin_t this,
const char *  item1,
const char *  item2 
)
static

References z.

Referenced by hls_input_open().

◆ hls_bump_inc()

static void hls_bump_inc ( hls_input_plugin_t this)
static

References z.

Referenced by hls_input_read().

◆ hls_frag_end()

static void hls_frag_end ( hls_input_plugin_t this)
static

References xine_mfrag_set_index_frag().

Referenced by hls_input_read().

◆ hls_frag_start()

static uint32_t hls_frag_start ( hls_input_plugin_t this)
static

◆ hls_get_duration()

static int hls_get_duration ( hls_input_plugin_t this)
static

◆ hls_get_size()

static off_t hls_get_size ( hls_input_plugin_t this)
static

◆ hls_input_class_dispose()

static void hls_input_class_dispose ( input_class_t this_gen)
static

◆ hls_input_dispose()

static void hls_input_dispose ( input_plugin_t this_gen)
static

◆ hls_input_get_capabilities()

static uint32_t hls_input_get_capabilities ( input_plugin_t this_gen)
static

◆ hls_input_get_current_pos()

static off_t hls_input_get_current_pos ( input_plugin_t this_gen)
static

Referenced by hls_input_get_instance().

◆ hls_input_get_instance()

static input_plugin_t * hls_input_get_instance ( input_class_t cls_gen,
xine_stream_t stream,
const char *  mrl 
)
static

◆ hls_input_get_length()

static off_t hls_input_get_length ( input_plugin_t this_gen)
static

References hls_get_size().

Referenced by hls_input_get_instance().

◆ hls_input_get_mrl()

static const char * hls_input_get_mrl ( input_plugin_t this_gen)
static

References NULL.

Referenced by hls_input_get_instance().

◆ hls_input_get_mrl_ext()

static int hls_input_get_mrl_ext ( const char *  mrl,
const char **  ext 
)
static

Referenced by hls_input_is_hls().

◆ hls_input_get_optional_data()

static int hls_input_get_optional_data ( input_plugin_t this_gen,
void *  data,
int  data_type 
)
static

◆ hls_input_is_hls()

static int hls_input_is_hls ( const char *  mrl)
static

◆ hls_input_load_list()

static int hls_input_load_list ( hls_input_plugin_t this)
static

◆ hls_input_open()

static int hls_input_open ( input_plugin_t this_gen)
static

◆ hls_input_open_bump()

static int hls_input_open_bump ( hls_input_plugin_t this)
static

◆ hls_input_open_item()

static int hls_input_open_item ( hls_input_plugin_t this,
uint32_t  n 
)
static

◆ hls_input_read()

static off_t hls_input_read ( input_plugin_t this_gen,
void *  buf,
off_t  len 
)
static

◆ hls_input_read_block()

static buf_element_t * hls_input_read_block ( input_plugin_t this_gen,
fifo_buffer_t fifo,
off_t  todo 
)
static

References NULL.

Referenced by hls_input_get_instance().

◆ hls_input_seek()

static off_t hls_input_seek ( input_plugin_t this_gen,
off_t  offset,
int  origin 
)
static

◆ hls_input_switch_mrl()

static int hls_input_switch_mrl ( hls_input_plugin_t this)
static

◆ hls_input_time_seek()

static off_t hls_input_time_seek ( input_plugin_t this_gen,
int  time_offs,
int  origin 
)
static

◆ hls_live_start()

static void hls_live_start ( hls_input_plugin_t this)
static

References xine_gettime(), and xine_nbc_get_pos_pts().

Referenced by hls_input_open().

◆ hls_live_wait()

static int hls_live_wait ( hls_input_plugin_t this)
static

◆ hls_skip_line()

static void hls_skip_line ( char **  s)
static

References hls_tab_char.

Referenced by hls_input_load_list().

◆ hls_skip_newline_spc()

static void hls_skip_newline_spc ( char **  s)
static

References hls_tab_char.

Referenced by hls_input_load_list().

◆ hls_skip_spc()

static void hls_skip_spc ( char **  s)
static

References hls_tab_char.

Referenced by hls_input_load_list().

◆ input_hls_init_class()

void * input_hls_init_class ( xine_t xine,
const void *  data 
)

◆ str2uint32()

static uint32_t str2uint32 ( char **  s)
static

References v, and z.

Referenced by hls_input_load_list().

◆ str2uint64()

static uint64_t str2uint64 ( char **  s)
static

References v, and z.

Referenced by hls_input_load_list().

◆ str2usec()

static uint32_t str2usec ( char **  s)
static

References v, and z.

Referenced by hls_input_load_list().

◆ xine_gettime()

static int xine_gettime ( struct timespec *  ts)
inlinestatic

Variable Documentation

◆ hls_tab_char

const uint8_t hls_tab_char[256]
static
Initial value:
= {
['\t'] = 1,
[' '] = 1,
['\r'] = 2,
['\n'] = 2,
[0] = 128
}

Referenced by hls_skip_line(), hls_skip_newline_spc(), and hls_skip_spc().