xine-lib: xine-lib-1.2.13/src/xine-utils/list.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions
list.c File Reference
`#include <stdlib.h>`
`#include <xine/attributes.h>`
`#include <xine/list.h>`
`#include <xine/xineutils.h>`

## Data Structures
struct | xine_list_elem_s
struct | _xine_list_chunk_s
struct | xine_list_s

## Macros
#define | MIN_CHUNK_SIZE 32
#define | MAX_CHUNK_SIZE 65536

## Typedefs
typedef struct xine_list_elem_s | xine_list_elem_t
typedef struct _xine_list_chunk_s | _xine_list_chunk_t

## Functions
static _xine_list_chunk_t * | _xine_list_chunk_new (xine_list_t *list, uint32_t size)
xine_list_t * | xine_list_new (void)
static void | _xine_list_reset (xine_list_t *list)
void | xine_list_clear (xine_list_t *list)
void | xine_list_delete (xine_list_t *list)
static xine_list_elem_t * | _xine_list_elem_new (xine_list_t *list)
unsigned int | xine_list_size (xine_list_t *list)
unsigned int | xine_list_empty (xine_list_t *list)
xine_list_iterator_t | xine_list_front (xine_list_t *list)
xine_list_iterator_t | xine_list_back (xine_list_t *list)
void | xine_list_push_back (xine_list_t *list, void *value)
void | xine_list_push_front (xine_list_t *list, void *value)
xine_list_iterator_t | xine_list_next (xine_list_t *list, xine_list_iterator_t ite)
void * | xine_list_next_value (xine_list_t *list, xine_list_iterator_t *ite)
xine_list_iterator_t | xine_list_prev (xine_list_t *list, xine_list_iterator_t ite)
void * | xine_list_prev_value (xine_list_t *list, xine_list_iterator_t *ite)
void * | xine_list_get_value (xine_list_t *list, xine_list_iterator_t ite)
void | xine_list_remove (xine_list_t *list, xine_list_iterator_t position)
xine_list_iterator_t | xine_list_insert (xine_list_t *list, xine_list_iterator_t position, void *value)
xine_list_iterator_t | xine_list_find (xine_list_t *list, void *value)

## Macro Definition Documentation

## ◆ MAX_CHUNK_SIZE

#define MAX_CHUNK_SIZE 65536

Referenced by _xine_list_elem_new().

## ◆ MIN_CHUNK_SIZE

#define MIN_CHUNK_SIZE 32

Referenced by xine_list_new().

## Typedef Documentation

## ◆ _xine_list_chunk_t

typedef struct _xine_list_chunk_s _xine_list_chunk_t

## ◆ xine_list_elem_t

typedef struct xine_list_elem_s xine_list_elem_t

## Function Documentation

## ◆ _xine_list_chunk_new()

static _xine_list_chunk_t * _xine_list_chunk_new | ( | xine_list_t * | list,
|  | uint32_t | size )
| static

References xine_list_s::chunks, _xine_list_chunk_s::first_unused, _xine_list_chunk_s::max_elems, _xine_list_chunk_s::next, and NULL.

Referenced by _xine_list_elem_new().

## ◆ _xine_list_elem_new()

static xine_list_elem_t * _xine_list_elem_new | ( | xine_list_t * | list | ) |
| static

References _xine_list_chunk_new(), xine_list_s::chunks, DLIST_IS_EMPTY, DLIST_REMOVE, _xine_list_chunk_s::elems, _xine_list_chunk_s::first_unused, xine_list_s::free, dlist_t::head, MAX_CHUNK_SIZE, _xine_list_chunk_s::max_elems, xine_list_elem_s::node, and NULL.

Referenced by xine_list_insert(), xine_list_push_back(), and xine_list_push_front().

## ◆ _xine_list_reset()

static void _xine_list_reset | ( | xine_list_t * | list | ) |
| static

References xine_list_s::chunks, DLIST_INIT, xine_list_s::first_chunk, _xine_list_chunk_s::first_unused, xine_list_s::free, _xine_list_chunk_s::next, xine_list_s::size, and xine_list_s::used.

Referenced by xine_list_clear(), and xine_list_delete().

## ◆ xine_list_back()

xine_list_iterator_t xine_list_back | ( | xine_list_t * | list | ) |

References NULL, xine_list_s::size, dlist_t::tail, and xine_list_s::used.

## ◆ xine_list_clear()

void xine_list_clear | ( | xine_list_t * | list | ) |

References _xine_list_reset().

Referenced by xine_event_dispose_queue().

## ◆ xine_list_delete()

void xine_list_delete | ( | xine_list_t * | list | ) |

References _xine_list_reset().

Referenced by _new_catalog(), _x_close_broadcaster(), _x_post_dispose(), demux_slave_dispose(), dispose_plugin_file_list(), dispose_plugin_list(), pvr_plugin_dispose(), release_dpb(), xine_dispose_internal(), xine_event_new_queue(), xine_event_queue_unref_unlock(), xine_exit(), xine_ring_buffer_delete(), and xine_stream_new().

## ◆ xine_list_empty()

unsigned int xine_list_empty | ( | xine_list_t * | list | ) |

References xine_list_s::size.

## ◆ xine_list_find()

xine_list_iterator_t xine_list_find | ( | xine_list_t * | list,
|  | void * | value )

References dlist_t::head, dnode_st::next, xine_list_elem_s::node, NULL, xine_list_s::used, and xine_list_elem_s::value.

Referenced by _new_entry_cb(), dpb_total_frames(), dpb_unmark_picture_delayed(), dpb_unmark_reference_picture(), load_plugin_list(), xine_dispose_internal(), and xine_event_dispose_queue().

## ◆ xine_list_front()

xine_list_iterator_t xine_list_front | ( | xine_list_t * | list | ) |

References dlist_t::head, NULL, xine_list_s::size, and xine_list_s::used.

Referenced by calculate_pic_nums(), dpb_add_picture(), dpb_clear_all_pts(), dpb_flush(), dpb_free_all(), dpb_get_picture(), dpb_get_picture_by_ltidx(), dpb_get_picture_by_ltpn(), dpb_set_unused_ref_picture_bylidx(), dpb_set_unused_ref_picture_byltpn(), dpb_set_unused_ref_picture_lidx_gt(), dpb_total_frames(), pvr_event_handler(), pvr_plugin_dispose(), xine_ring_buffer_put(), and xine_ring_buffer_release().

## ◆ xine_list_get_value()

void * xine_list_get_value | ( | xine_list_t * | list,
|  | xine_list_iterator_t | ite )

References NULL, and xine_list_elem_s::value.

Referenced by calculate_pic_nums(), dpb_add_picture(), dpb_clear_all_pts(), dpb_flush(), dpb_free_all(), dpb_get_picture(), dpb_get_picture_by_ltidx(), dpb_get_picture_by_ltpn(), dpb_set_unused_ref_picture_bylidx(), dpb_set_unused_ref_picture_byltpn(), dpb_set_unused_ref_picture_lidx_gt(), dpb_total_frames(), pvr_event_handler(), pvr_plugin_dispose(), xine_ring_buffer_put(), and xine_ring_buffer_release().

## ◆ xine_list_insert()

xine_list_iterator_t xine_list_insert | ( | xine_list_t * | list,
|  | xine_list_iterator_t | position,
|  | void * | value )

References _xine_list_elem_new(), DLIST_ADD_TAIL, DLIST_INSERT, xine_list_elem_s::node, NULL, xine_list_s::size, xine_list_s::used, and xine_list_elem_s::value.

## ◆ xine_list_new()

xine_list_t * xine_list_new | ( | void |  | ) |

References xine_list_s::chunks, DLIST_INIT, xine_list_s::first_chunk, _xine_list_chunk_s::first_unused, xine_list_s::free, _xine_list_chunk_s::max_elems, MIN_CHUNK_SIZE, _xine_list_chunk_s::next, NULL, xine_list_s::size, and xine_list_s::used.

Referenced by _new_catalog(), _new_entry_cb(), _x_init_broadcaster(), _x_post_init(), create_dpb(), load_plugin_list(), open_plugin(), pvr_class_get_instance(), xine_event_new_queue(), xine_init(), xine_ring_buffer_new(), and xine_stream_new().

## ◆ xine_list_next()

xine_list_iterator_t xine_list_next | ( | xine_list_t * | list,
|  | xine_list_iterator_t | ite )

References dlist_t::head, dnode_st::next, xine_list_elem_s::node, NULL, and xine_list_s::used.

Referenced by calculate_pic_nums(), dpb_clear_all_pts(), dpb_get_picture(), dpb_get_picture_by_ltidx(), dpb_get_picture_by_ltpn(), dpb_set_unused_ref_picture_bylidx(), dpb_set_unused_ref_picture_byltpn(), dpb_set_unused_ref_picture_lidx_gt(), dpb_total_frames(), pvr_event_handler(), pvr_plugin_dispose(), xine_ring_buffer_put(), and xine_ring_buffer_release().

## ◆ xine_list_next_value()

void * xine_list_next_value | ( | xine_list_t * | list,
|  | xine_list_iterator_t * | ite )

References dlist_t::head, dnode_st::next, xine_list_elem_s::node, NULL, xine_list_s::used, and xine_list_elem_s::value.

Referenced by __xine_pa_sink_info_callback(), _x_close_broadcaster(), _x_flush_events_queues(), _x_post_dispose(), ao_alsa_handle_event_thread(), broadcaster_data_write(), config_save_cb(), demux_slave_dispose(), dispose_plugin_file_list(), save_plugin_list(), xine_event_dispose_queue(), xine_event_get(), xine_event_next(), xine_event_send(), xine_event_wait_locked(), xine_exit(), xine_post_init(), xine_post_input(), and xine_post_output().

## ◆ xine_list_prev()

xine_list_iterator_t xine_list_prev | ( | xine_list_t * | list,
|  | xine_list_iterator_t | ite )

References xine_list_elem_s::node, NULL, dnode_st::prev, dlist_t::tail, and xine_list_s::used.

## ◆ xine_list_prev_value()

void * xine_list_prev_value | ( | xine_list_t * | list,
|  | xine_list_iterator_t * | ite )

References xine_list_elem_s::node, NULL, dnode_st::prev, dlist_t::tail, xine_list_s::used, and xine_list_elem_s::value.

Referenced by dpb_get_next_out_picture(), fill_vdpau_reference_list(), and xine_event_send().

## ◆ xine_list_push_back()

void xine_list_push_back | ( | xine_list_t * | list,
|  | void * | value )

References _xine_list_elem_new(), DLIST_ADD_TAIL, xine_list_elem_s::node, xine_list_s::size, xine_list_s::used, and xine_list_elem_s::value.

Referenced by _insert_file(), _new_entry_cb(), _x_post_intercept_audio_port(), _x_post_intercept_video_port(), boxblur_open_plugin(), deinterlace_open_plugin(), demux_slave_next(), denoise3d_open_plugin(), dpb_add_picture(), eq2_open_plugin(), eq_open_plugin(), expand_open_plugin(), fftgraph_open_plugin(), fftscope_open_plugin(), fooviz_open_plugin(), goom_open_plugin(), listener_loop(), load_plugin_list(), manager_loop(), mosaico_open_plugin(), noise_open_plugin(), oscope_open_plugin(), pp_open_plugin(), pvr_finish_recording(), stretch_open_plugin(), switch_open_plugin(), tdaan_open_plugin(), unsharp_open_plugin(), upmix_mono_open_plugin(), upmix_open_plugin(), volnorm_open_plugin(), xine_event_dispose_queue(), xine_event_free(), xine_event_new_queue(), xine_event_next(), xine_event_send(), xine_ring_buffer_alloc(), xine_ring_buffer_get(), and xine_stream_new().

## ◆ xine_list_push_front()

void xine_list_push_front | ( | xine_list_t * | list,
|  | void * | value )

References _xine_list_elem_new(), DLIST_ADD_HEAD, xine_list_elem_s::node, xine_list_s::size, xine_list_s::used, and xine_list_elem_s::value.

## ◆ xine_list_remove()

void xine_list_remove | ( | xine_list_t * | list,
|  | xine_list_iterator_t | position )

References DLIST_ADD_TAIL, DLIST_REMOVE, xine_list_s::free, xine_list_elem_s::node, and xine_list_s::size.

Referenced by broadcaster_data_write(), dpb_unmark_picture_delayed(), dpb_unmark_reference_picture(), pvr_event_handler(), xine_dispose_internal(), xine_event_dispose_queue(), xine_event_get(), xine_event_next(), xine_event_send(), xine_event_wait_locked(), xine_ring_buffer_put(), and xine_ring_buffer_release().

## ◆ xine_list_size()

unsigned int xine_list_size | ( | xine_list_t * | list | ) |

References xine_list_s::size.

Referenced by dpb_add_picture(), dpb_get_next_out_picture(), dpb_total_frames(), xine_event_dispose_queue(), xine_event_get(), xine_event_next(), xine_event_send(), xine_event_wait_locked(), and xine_post_init().