xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
input_mpegdash.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/input_plugin.h>
#include <xine/stree.h>
#include <xine/mfrag.h>
#include <xine/io_helper.h>
#include "http_helper.h"
#include "input_helper.h"
#include "group_network.h"
#include "multirate_pref.c"

Data Structures

struct  mpd_input_class_t
 
struct  mpd_stream_info_t
 
struct  mpd_input_plugin_s
 

Macros

#define LOG_MODULE   "input_mpegdash"
 
#define LOG_VERBOSE
 
#define MPD_TYPE_AUDIO   1
 
#define MPD_TYPE_VIDEO   2
 
#define MPD_TYPE_SUBT   4
 
#define MPD_IS_LIVE(this)   ((this->mode == MPD_LIVE) || (this->mode == MPD_SINGLE_LIVE) || (this->mode == MPD_INIT_LIVE))
 
#define MPD_MAX_SIDES   4
 
#define MPD_MAX_REPR   16
 
#define MPD_MAX_STREAMS   32
 
#define MPD_MAX_MRL   4096
 
#define MPD_PREVIEW_SIZE   (32 << 10)
 

Typedefs

typedef struct mpd_input_plugin_s mpd_input_plugin_t
 

Enumerations

enum  mpd_mode_t {
  MPD_LIVE = 0 , MPD_SINGLE_LIVE , MPD_INIT_LIVE , MPD_VOD ,
  MPD_SINGLE_VOD , MPD_INIT_VOD , MPD_MODE_LAST
}
 

Functions

static int xine_gettime (struct timespec *ts)
 
static uint32_t str2uint32 (char **s)
 
static char * mpd_strcasestr (const char *haystack, const char *needle)
 
static int mpd_build_mrl (mpd_input_plugin_t *this, const char *name)
 
static void mpd_prepare_fragnum (mpd_input_plugin_t *this)
 
static void mpd_apply_fragnum (mpd_input_plugin_t *this)
 
static int mpd_input_switch_mrl (mpd_input_plugin_t *this)
 
static int mpd_set_start_time (mpd_input_plugin_t *this)
 
static int mpd_set_frag_index (mpd_input_plugin_t *this, uint32_t index, int wait)
 
static void mpd_frag_seen (mpd_input_plugin_t *this)
 
static void mpd_frag_end (mpd_input_plugin_t *this)
 
static ssize_t mpd_read_int (mpd_input_plugin_t *this, void *buf, size_t len, int wait)
 
static int mpd_input_get_mrl_ext (const char *mrl, const char **ext)
 
static int mpd_input_is_mpd (const char *mrl)
 
static uint32_t mpd_stree_find (mpd_input_plugin_t *this, const char *path, uint32_t base)
 
static int mpd_input_load_manifest (mpd_input_plugin_t *this)
 
static uint32_t mpd_input_get_capabilities (input_plugin_t *this_gen)
 
static off_t mpd_input_read (input_plugin_t *this_gen, void *buf, off_t len)
 
static buf_element_tmpd_input_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t todo)
 
static off_t mpd_input_time_seek (input_plugin_t *this_gen, int time_offs, int origin)
 
static off_t mpd_input_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t mpd_input_get_current_pos (input_plugin_t *this_gen)
 
static off_t mpd_input_get_length (input_plugin_t *this_gen)
 
static const char * mpd_input_get_mrl (input_plugin_t *this_gen)
 
static void mpd_input_dispose (input_plugin_t *this_gen)
 
static int mpd_input_open (input_plugin_t *this_gen)
 
static input_plugin_tmpd_get_side (mpd_input_plugin_t *this, int side_index)
 
static int mpd_input_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static input_plugin_tmpd_input_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
 
static void mpd_input_class_dispose (input_class_t *this_gen)
 
void * input_mpegdash_init_class (xine_t *xine, const void *data)
 

Variables

static const char * mpd_mode_names [MPD_MODE_LAST]
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "input_mpegdash"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MPD_IS_LIVE

#define MPD_IS_LIVE ( this)    ((this->mode == MPD_LIVE) || (this->mode == MPD_SINGLE_LIVE) || (this->mode == MPD_INIT_LIVE))

◆ MPD_MAX_MRL

#define MPD_MAX_MRL   4096

◆ MPD_MAX_REPR

#define MPD_MAX_REPR   16

◆ MPD_MAX_SIDES

#define MPD_MAX_SIDES   4

<< foo/ber_12345[.mp4]

Referenced by mpd_input_load_manifest().

◆ MPD_MAX_STREAMS

#define MPD_MAX_STREAMS   32

Referenced by mpd_input_load_manifest().

◆ MPD_PREVIEW_SIZE

#define MPD_PREVIEW_SIZE   (32 << 10)

◆ MPD_TYPE_AUDIO

#define MPD_TYPE_AUDIO   1

<< offs into stree buf

Referenced by mpd_input_load_manifest().

◆ MPD_TYPE_SUBT

#define MPD_TYPE_SUBT   4

Referenced by mpd_input_load_manifest().

◆ MPD_TYPE_VIDEO

#define MPD_TYPE_VIDEO   2

Typedef Documentation

◆ mpd_input_plugin_t

Enumeration Type Documentation

◆ mpd_mode_t

enum mpd_mode_t
Enumerator
MPD_LIVE 
MPD_SINGLE_LIVE 
MPD_INIT_LIVE 
MPD_VOD 
MPD_SINGLE_VOD 
MPD_INIT_VOD 
MPD_MODE_LAST 

Function Documentation

◆ input_mpegdash_init_class()

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

◆ mpd_apply_fragnum()

static void mpd_apply_fragnum ( mpd_input_plugin_t * this)
static

Referenced by mpd_read_int(), and mpd_set_frag_index().

◆ mpd_build_mrl()

static int mpd_build_mrl ( mpd_input_plugin_t * this,
const char * name )
static

◆ mpd_frag_end()

static void mpd_frag_end ( mpd_input_plugin_t * this)
static

◆ mpd_frag_seen()

static void mpd_frag_seen ( mpd_input_plugin_t * this)
static

◆ mpd_get_side()

static input_plugin_t * mpd_get_side ( mpd_input_plugin_t * this,
int side_index )
static

◆ mpd_input_class_dispose()

static void mpd_input_class_dispose ( input_class_t * this_gen)
static

◆ mpd_input_dispose()

static void mpd_input_dispose ( input_plugin_t * this_gen)
static

◆ mpd_input_get_capabilities()

static uint32_t mpd_input_get_capabilities ( input_plugin_t * this_gen)
static

◆ mpd_input_get_current_pos()

static off_t mpd_input_get_current_pos ( input_plugin_t * this_gen)
static

Referenced by mpd_input_get_instance().

◆ mpd_input_get_instance()

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

◆ mpd_input_get_length()

static off_t mpd_input_get_length ( input_plugin_t * this_gen)
static

◆ mpd_input_get_mrl()

static const char * mpd_input_get_mrl ( input_plugin_t * this_gen)
static

References NULL.

Referenced by mpd_input_get_instance().

◆ mpd_input_get_mrl_ext()

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

Referenced by mpd_input_is_mpd().

◆ mpd_input_get_optional_data()

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

◆ mpd_input_is_mpd()

static int mpd_input_is_mpd ( const char * mrl)
static

◆ mpd_input_load_manifest()

static int mpd_input_load_manifest ( mpd_input_plugin_t * this)
static

◆ mpd_input_open()

static int mpd_input_open ( input_plugin_t * this_gen)
static

◆ mpd_input_read()

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

References mpd_read_int().

Referenced by mpd_input_get_instance().

◆ mpd_input_read_block()

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

References NULL.

Referenced by mpd_input_get_instance().

◆ mpd_input_seek()

static off_t mpd_input_seek ( input_plugin_t * this_gen,
off_t offset,
int origin )
static

◆ mpd_input_switch_mrl()

static int mpd_input_switch_mrl ( mpd_input_plugin_t * this)
static

◆ mpd_input_time_seek()

static off_t mpd_input_time_seek ( input_plugin_t * this_gen,
int time_offs,
int origin )
static

◆ mpd_prepare_fragnum()

static void mpd_prepare_fragnum ( mpd_input_plugin_t * this)
static

References mpd_strcasestr().

Referenced by mpd_set_start_time().

◆ mpd_read_int()

static ssize_t mpd_read_int ( mpd_input_plugin_t * this,
void * buf,
size_t len,
int wait )
static

◆ mpd_set_frag_index()

static int mpd_set_frag_index ( mpd_input_plugin_t * this,
uint32_t index,
int wait )
static

◆ mpd_set_start_time()

static int mpd_set_start_time ( mpd_input_plugin_t * this)
static

◆ mpd_strcasestr()

static char * mpd_strcasestr ( const char * haystack,
const char * needle )
static

◆ mpd_stree_find()

static uint32_t mpd_stree_find ( mpd_input_plugin_t * this,
const char * path,
uint32_t base )
static

References xine_stree_find().

Referenced by mpd_input_load_manifest().

◆ str2uint32()

static uint32_t str2uint32 ( char ** s)
static

References v, and z.

Referenced by mpd_input_load_manifest().

◆ xine_gettime()

static int xine_gettime ( struct timespec * ts)
inlinestatic

References NULL.

Referenced by mpd_set_frag_index(), and mpd_set_start_time().

Variable Documentation

◆ mpd_mode_names

const char* mpd_mode_names[MPD_MODE_LAST]
static
Initial value:
= {
[MPD_LIVE] = "non seekable live mode",
[MPD_SINGLE_LIVE] = "non seekable single file live mode",
[MPD_INIT_LIVE] = "non seekable live mode with init fragment",
[MPD_VOD] = "seekable VOD mode",
[MPD_SINGLE_VOD] = "seekable single file VOD mode",
[MPD_INIT_VOD] = "seekable VOD mode with init fragment"
}
@ MPD_VOD
Definition input_mpegdash.c:81
@ MPD_INIT_VOD
Definition input_mpegdash.c:83
@ MPD_SINGLE_VOD
Definition input_mpegdash.c:82
@ MPD_INIT_LIVE
Definition input_mpegdash.c:80
@ MPD_SINGLE_LIVE
Definition input_mpegdash.c:79
@ MPD_LIVE
Definition input_mpegdash.c:78

Referenced by mpd_input_open().