xine-lib 1.2.13-20230125hg15249
Typedefs | Functions
mfrag.h File Reference
#include <stdint.h>
#include <xine/attributes.h>
#include <xine/compat.h>

Go to the source code of this file.

Typedefs

typedef int32_t xine_mfrag_index_t
 
typedef struct xine_mfrag_list_s xine_mfrag_list_t
 

Functions

void xine_mfrag_list_open (xine_mfrag_list_t **plist)
 
int32_t xine_mfrag_get_frag_count (xine_mfrag_list_t *list)
 
xine_mfrag_index_t xine_mfrag_find_time (xine_mfrag_list_t *list, int64_t timepos)
 
xine_mfrag_index_t xine_mfrag_find_pos (xine_mfrag_list_t *list, off_t offs)
 
int xine_mfrag_set_index_frag (xine_mfrag_list_t *list, xine_mfrag_index_t index, int64_t dur, off_t len)
 
int xine_mfrag_get_index_frag (xine_mfrag_list_t *list, xine_mfrag_index_t index, int64_t *dur, off_t *len)
 
int xine_mfrag_get_index_start (xine_mfrag_list_t *list, xine_mfrag_index_t index, int64_t *timepos, off_t *offs)
 
void xine_mfrag_list_close (xine_mfrag_list_t **plist)
 

Typedef Documentation

◆ xine_mfrag_index_t

typedef int32_t xine_mfrag_index_t

-1: error. 0: the stream head. dur = timebase. len = byte offset of first media fragment or 0. 1..n: a media fragment. dur = duration in timebase units or -1 (no change). len = length in bytes or -1 (unknown/no change). n + 1: append this one (set) or the stream total (get/find).

◆ xine_mfrag_list_t

Function Documentation

◆ xine_mfrag_find_pos()

xine_mfrag_index_t xine_mfrag_find_pos ( xine_mfrag_list_t * list,
off_t offs )

◆ xine_mfrag_find_time()

xine_mfrag_index_t xine_mfrag_find_time ( xine_mfrag_list_t * list,
int64_t timepos )

find the media fragment that contains the specified timepos or offs.

References _xine_mfrag_test(), xine_mfrag_list_s::frags, xine_mfrag_frag_t::t, and xine_mfrag_list_s::used.

Referenced by hls_input_time_seek(), mpd_input_time_seek(), and rip_plugin_seek_time().

◆ xine_mfrag_get_frag_count()

int32_t xine_mfrag_get_frag_count ( xine_mfrag_list_t * list)

◆ xine_mfrag_get_index_frag()

int xine_mfrag_get_index_frag ( xine_mfrag_list_t * list,
xine_mfrag_index_t index,
int64_t * dur,
off_t * len )

◆ xine_mfrag_get_index_start()

int xine_mfrag_get_index_start ( xine_mfrag_list_t * list,
xine_mfrag_index_t index,
int64_t * timepos,
off_t * offs )

index 0: timepos = 0. offs = 0. these values will be estimated if some previous fragment has an "unknown" setting: 1..n: timepos = fragment start time in timebase units. offs = fragment start offs in bytes. n + 1: timepos = total time in timebase units. offs = total size in bytes.

References _xine_mfrag_test(), xine_mfrag_list_s::frags, xine_mfrag_list_s::have, xine_mfrag_frag_t::p, and xine_mfrag_frag_t::t.

Referenced by demux_qt_load_fragment_index(), hls_get_duration(), hls_get_size(), hls_input_seek(), hls_input_time_seek(), mpd_input_get_length(), mpd_input_get_optional_data(), mpd_input_seek(), mpd_input_time_seek(), rip_plugin_get_current_time(), and rip_plugin_seek_time().

◆ xine_mfrag_list_close()

void xine_mfrag_list_close ( xine_mfrag_list_t ** plist)

◆ xine_mfrag_list_open()

void xine_mfrag_list_open ( xine_mfrag_list_t ** plist)

◆ xine_mfrag_set_index_frag()

int xine_mfrag_set_index_frag ( xine_mfrag_list_t * list,
xine_mfrag_index_t index,
int64_t dur,
off_t len )

index 0: dur = timebase or -1 (no change). len = head size in bytes or -1 (no change). 1..n: dur = fragment duration in timebase units or 0 (unknown), -1 (no change). len = fragment size or 0 (unknown), -1 (no change). n + 1: dur = set: new fragment duration in timebase units or 0/-1 (unknown). get: 0. len = set: new fragment size or 0/-1 (unknown). get: 0.

References xine_mfrag_frag_t::d, xine_mfrag_list_s::dirty_from, xine_mfrag_list_s::frags, xine_mfrag_list_s::have, xine_mfrag_list_s::known_d, xine_mfrag_list_s::known_l, xine_mfrag_list_s::known_nd, xine_mfrag_list_s::known_nl, xine_mfrag_frag_t::l, MFRAG_STEP, and xine_mfrag_list_s::used.

Referenced by demux_qt_load_fragment_index(), hls_frag_end(), hls_frag_start(), hls_input_load_list(), mpd_frag_end(), mpd_frag_seen(), and mpd_input_open().